Displaying 2 results from an estimated 2 matches for "vgrp".
Did you mean:
grp
2004 Oct 29
1
fitting linear mixed model for incomplete block design
Dear R developers and users:
I have the following data, x is the response vaiable, nsample(individual) nested within trt, and subsample nested within nsample, I want to fit trt as fixed effect, and block, nsample(trt) as random effects using lme, is the following coding correct?
dat$vgrp <- getGroups(dat, form = ~ 1|trt/nsample, level = 2)
ge.lme1 <- lme(fixed=x~trt, data=dat, random=~ block + nsample|vgrp)
x block trt nsample subsample
-0.68984 1 1 1 1
-0.2223 2 1 1 2
-1.00144 3 1 2 1
-2.59511 4 1 2 2
2.51573 5 1 3 1
-1.675...
2003 May 14
1
lme speedup question
...,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2)
rp <- c(1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3)
for (perm in 1:216){
vg <- vgAll[perm,]
for(j in 1:15000){
ge <- c(philmaanova.rloess$adjdata[j,1:24])
dat <- data.frame(ge,vg=factor(vg),ag=factor(ag),dy=factor(dy),rp=factor(rp))
dat$vgrp <- getGroups(dat, form = ~ 1|vg/rp, level = 2)
ge.lme <- lme(fixed=ge~vg+ag+dy, data=dat, random=~1|vgrp)
cp1[j,1] <- philmaanova.rloess$cloneid[j]
tmpInt <- intervals(ge.lme,level=0.95,which="fixed")
cp1[j,2] <- tmpInt$fixed[2,2]*2
cp1[j,3] <- tmpInt$fixed...