search for: dummyid

Displaying 1 result from an estimated 1 matches for "dummyid".

Did you mean: dummy
2010 Oct 04
1
Ridge regression and mixed models
...### version$version.string # [1] "R version 2.11.1 (2010-05-31)" library(nlme) # DATA generation: dim <- 200 n <- 50 XX <- matrix(rnorm(dim*n, 0, 0.1), ncol=dim, nrow=n) beta <- matrix(c(rep(1, 40), rep(2,20), rep(0,140)), ncol=1) Y <- XX %*% beta + rnorm(n) # MODEL fit: dummyId <- factor(rep(1,n)) Z.block <- list(dummyId=pdIdent(~-1+XX)) data.fr <- data.frame(Y,XX) fit <- lme(Y~1, data=data.fr, random=Z.block) # ERROR: Warning message: In lme.formula(Y ~ 1, data = data.fr, random = Z.block) : Fewer observations than random effects in all le...