search for: simdata1

Displaying 1 result from an estimated 1 matches for "simdata1".

Did you mean: simdata
2013 Apr 13
1
how to add a row vector in a dataframe
...e(3000)) > >lstpshat<-lapply(seq_len(ncol(simdata)),function(i) >{glm.t<-glm(t~x1+x2+x3+x4+x5+x6+x7+I(x2^2)+I(x4^2)+I(x7^2)+x1:x3+x2:x4+x3:x5+x4:x6+x5:x7+x1:x6+x2:x3+x3:x4+x4:x5+x5:x6,family=binomial,data=simdata[,i]); >pshat<- predict(glm.t,type="response")}) >simdata1<-rbind(simdata,pshat=lstpshat) > >simdata.ps1<- simdata1 >simdata.ps1[]<-do.call(c,lapply(seq_len(ncol(simdata1)),function(i) lapply(simdata1[,i],function(x) x[simdata1[,i]$t==1]))) >lstm1<- lapply(seq_len(ncol(simdata.ps1)),function(i) {dat<-do.call(data.frame,lapply...