Displaying 1 result from an estimated 1 matches for "lstpshat".
2013 Apr 13
1
how to add a row vector in a dataframe
...<- -0.4
>b5 <- -0.8
>b6 <- -0.5
>b7 <- 0.7
>a0 <- -3.85
>a1 <- 0.3
>a2 <- -0.36
>a3 <- -0.73
>a4 <- -0.2
>a5 <- 0.71
>a6 <- -0.19
>a7 <- 0.26
>g1 <- -0.4
>simdata <- replicate(S, generate(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,...