Displaying 1 result from an estimated 1 matches for "verrorf".
Did you mean:
perrorf
2010 Mar 22
0
using lmer weights argument to represent heteroskedasticity
...p,
each=npergroup), verror = sample(c(0.5, 1, 2, 4), size=n, replace=T),
x = 0.1*rnorm(n))
groupeffx <- data.frame(groupid = 1:ngroup, theta = rnorm(ngroup, sd = 0.25))
d <- merge(d, groupeffx)
d$etrue <- rnorm(n, sd = sqrt(d$verror))
d$y <- 5 + d$x + d$theta + d$etrue
d$verrorf <- factor(paste("v",d$verror,sep=""))
print(tapply(d$etrue, d$verrorf, var))
## function to collect pieces from lme() output
sumLME <- function(o){
tab <- summary(o)$tTable
r <- c(tab[1,1:2], tab[2,1:2], as.numeric(VarCorr(o))[3:4])
names(r) <- c("b...