Guest User

Error with ls.mixed and weights

a guest
Feb 27th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.29 KB | None | 0 0
  1. library(Zelig)
  2. set.seed(1000)
  3.  
  4. x <- runif(1000, -1, 1)
  5. y <- x + rnorm(1000)
  6. wt <- rexp(1000)
  7. id <- rep(1:20, times = 50)
  8. d <- as.data.frame(cbind(y, x, wt, id))
  9.  
  10. m1 <- zelig(y ~ x + tag(1|id), model = "ls.mixed", weights = "wt", data = d)
  11. m2 <- lmer(y ~ x + (1|id), weights = wt, data = d)
Add Comment
Please, Sign In to add comment