Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. lmm1 <- lmer((total) ~ DISTANCE+POS + (1|NO_UNIT),data=TURN)
  2. TURN$POS<-as.factor(TURN$POS)#Change position and distance to factors
  3. TURN$DISTANCE<-as.factor(TURN$DISTANCE)
  4. TURN$NO_UNIT <- as.factor(TURN$NO_UNIT)
  5.  
  6. mySumm <- function(.) { s <- sigma(.)
  7. c(beta =getME(., "beta"), sigma = s, sig01 = unname(s * getME(., "theta"))) }
  8.  
  9. # run bootstrap analysis for calculation of confidence intervals of parameter estimates
  10. mod_lmm1_boot <- bootMer(lmm1,mySumm, nsim=300)
  11. boot.ci(mod_lmm1_boot,type="perc",conf=.95,index=1)
  12. boot.ci(mod_lmm1_boot,type="perc",conf=.95,index=2)
  13. boot.ci(mod_lmm1_boot,type="perc",conf=.95,index=3)#I want to plot these 3 indexes with the mean!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement