Displaying 2 results from an estimated 2 matches for "runnb".
Did you mean:
runn
2005 Jun 26
4
Mixed model
...ate mixed effects.
Following previous correspondence .
Dataset <- read.table("C:/Program Files/R/rw2011/data/miss/model1a.dat",
header=TRUE, sep="\t", na.strings="NA", dec=".", strip.white=TRUE)
attach(Dataset)
require (nlme)
with(Dataset, table(runnb, id, grp))
b.lvls <- table(Dataset$runnb)
nb <- length(b.lvls)
fit <- vector(mode="list", nb)
for(i in 1:nb)
fit[[i]]<- lme (trans1 ~ Index1 + grp,
random = ~ 1 | id / grp ,
data = Dataset,
na.action = "na.exclude"...
2005 May 25
4
mixed model
Hello all,
I have problem with setting up random effects.
I have a model:
y=x1+x2+x1*x2+z1+z1*x2
where x1, x2, x1*x2 are fixed effects
and z1, z1*x2 are random effects (crossed effects)
I use library(nlme) 'lme' function.
My question is: how I should set up random effects?
I did
lme(y~x1+x2+x1:x2, data=DATA, random=~z1+z1:x2, na.action='na.omit')
but it did not work.