similar to: filling in datasets of differing lengths

Displaying 20 results from an estimated 1000 matches similar to: "filling in datasets of differing lengths"

2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2018 May 28
3
How to generate a conditional dummy in R?
Hi everyone, I am trying to generate a conditional dummy variable ?X" with the following rules set X=1 if Y is =1, two years prior to the NA. [0,0,NA]. For example, if the pattern for Y is 0,0,NA then the X variable is =0 for all the two years prior to the NA. If the pattern for Y is 0,1,NA or 1,0,NA then the X =1 . To be clear, if 1,1,NA then the X=1 that first specific year, it
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) install.packages("systemfit")
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end. I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis. I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2018 May 15
0
Systemfit
... and the mailing list is picky about attachments... whatever you attached did not conform to the stringent requirements mentioned in the Posting Guide. Pasting the code right into the email is usually safest, though you DO have to post using plain text (as the Posting Guide indicates) or your code may get mangled by the automatic html format removal. On May 15, 2018 7:04:31 AM PDT, Bert Gunter
2018 May 15
1
Systemfit
Unless there is good reason not to, always cc the list -- there are lots of smarter folks than I on it who can help. I may or may not have time to look at this. Hopefully someone else will. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
2018 May 29
0
How to generate a conditional dummy in R?
Hi Faradj, What a problem! I think I have worked it out, but only because the result is the one you said you wanted. # the sample data frame is named fkdf Y2Xby3<-function(x) { nrows<-dim(x)[1] X<-rep(0,nrows) for(i in 1:(nrows-2)) { if(!is.na(x$Y[i])) { if(x$Y[i] == 1 && any(is.na(x$Y[(i+1):(i+2)]))) X[i]<-1 if(i > 1) { if(X[i-1] == 1) X[i]<-0 } }
2018 May 29
1
How to generate a conditional dummy in R?
Dear Jim, wow! It worked! Thanks a lot. I did as you suggested and it worked well with the real data. Although it gave me this error: Error in if (!is.na(x$Y[i])) { : argument is of length zero. For some reason the X1 produced less observations than it is in the data. But it's not a big deal - I identified those cases and simply deleted from the data (it was countries that only appeared
2005 Feb 09
2
gl and different number of replications
I am trying to use the function gl (generate levels), and would like to make levels with different number of replications. Does anyone know how to generate different number of replications in each level? Something like: [1] Site1 Site1 Site1 Site1 Site1 Site1 Site1 [8] Site2 Site2 Site2 Site2 Site2 Thanks in advance -- Rog?rio R. Silva MZUSP http://www.mz.usp.br Linux/Debian User # 354364
2012 Dec 29
3
Samba4 AD DC Sites / Rename Default-First-Site-Name and internal DNS
Hello, I'm running a few tests here with two locations. site1: server-site1.gsg.local subnet 192.168.200.0/24 site2: server-site2.gsg.local subnet 192.168.190.0/24 both are connected via VPN. I migrated an samba3 domain at server-site1 it gets Default-First-Site-Name assigned. Then I joined the new samba4 domain withe server-site2. Both servers work and i can join and access them with
2011 Feb 03
3
R Data Manipulation - Transposing Data by a Given Column, Like User_ID
Hello, I'd like to transpose data to create an analysis-friendly dataframe. See below for an example, I was unable to use t(x) and I couldn't find a function with options like PROC TRANSPOSE in SAS. The ideal solution handles variable quantities of SITE - but beggars can't be choosers. :-) Thank you in advance, Mike ## INPUT DATA USER_ID<-c(1,1,1,2,2,2,3,3,4) SITE
2014 Jan 21
1
DNS Setup
hii guys i have some issue with dns in samba 4 i have install and setup 2 samba dc in different Site site2 dc joint to site1 dc, with internal dns topology : site1 --- openvpn server --- firewall --- wan --- openvpn client --- site2 192.168.1.0/24 192.168.2.0/24 in site1 i have some application let say email server: mail.local.lan > 192.168.1.2 web server : web.local.lan > 192.168.1.3
2006 Aug 29
1
Bootstraping for groups and subgroups and joing with other table
Dear R-experts, I have a table with following collumns: State, SamplePlot, Species and BodySize. I sampled bird species at 34 SamplePlots and 5 States (regions) monthly during two years. On each bird record I measured bodysize and identified the species. So I have many records of each species (about 150 species) at each SamplePlot and each Region (State). Now I would like bootstrap
2008 May 02
3
data transformation
Dear all, how can I, with R, transform a presence-absence (0/1) matrix of species occurrences into a presence-only table (3 columns) with the names of the species (1st column), the lat information of the sites (2nd column) and the lon information of the sites (3rd column), as given in the below example? Thanks a lot for your help! Christian my dataframe: site lat lon spec1 spec2 spec3 spec4
2005 Feb 09
4
subset
Dear all, I am trying to extract rows from a data.frame based on the rowSums != 0. I want to preserve rownames in the first column in the subset. Does anyone know how to extract all species that don't have rowSums equal to zero? Here it is: # dataset x <- data.frame( species=c("sp.1","sp.2","sp.3","sp.4"), site1=c(2,3,0,0), site2=c(0,0,0,0),
2005 May 23
3
Betr.: VPN
IF you are not stuck to IPSec, you might want to take a look at OpenVPN (www.openvpn.org). I found OpenVPN easier to install than FreeSWAN (an IPSEC VPN) and have setup an OpenVPN solution between my German office and our mainoffice in a matter of hours. Thom van der Boon E-Mail: Thom.van.der.Boon at vdb.nl ===== Thom.H. van der Boon b.v. Havens 563 Jan Evertsenweg 2-4 NL-3115 JA Schiedam
2005 Oct 04
2
Joining Dataframes
I am attempting to join several dataframes that summarize sampling effort for different samples into one large data.frame/table. I have looked at the merge command, but have not been clever enough to figure out how to get it to do what I want. A simplified example of what I am trying to do: The dataframes I have look like this (they were generated using the table command) species1.effort
2012 Sep 04
3
Comparing Von Bertalanffy Growth Curves
I am trying to compare Vbert growth curves from several years of fish data. I am following the code provided by: http://www.ncfaculty.net/dogle/fishR/gnrlex/VonBertalanffy/VonBertalanffy.pdf. Specifically the section on VBGM Comparisons between groups. ? This code is pretty cut and dry. I am able to run it perfectly with the "fake" data that is provided. But when I run it with my own
2018 Apr 18
3
How to replace numeric value in the column contains Text (Factor)?
Hi R user, Would you mind to help me on how I can change a value in a specific column and row in a big table? but the column of the table is a factor (not numeric). Here is an example. I want to change dat[4:5,3]<-"20" but it generated NA> do you have any suggestions for me? dat<-structure(list(Sites = structure(1:5, .Label = c("Site1", "Site2",
2007 May 07
1
Predicted Cox survival curves - factor coding problems..
The combination of survfit, coxph, and factors is getting confused. It is not smart enough to match a new data frame that contains a numeric for sitenew to a fit that contained that variable as a factor. (Perhaps it should be smart enough to at least die gracefully -- but it's not). The simple solution is to not use factors. site1 <- 1*(coxsnps$sitenew==1) site2 <-