Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(Zelig)
- set.seed(1000)
- x <- runif(1000, -1, 1)
- y <- x + rnorm(1000)
- wt <- rexp(1000)
- id <- rep(1:20, times = 50)
- d <- as.data.frame(cbind(y, x, wt, id))
- m1 <- zelig(y ~ x + tag(1|id), model = "ls.mixed", weights = "wt", data = d)
- m2 <- lmer(y ~ x + (1|id), weights = wt, data = d)
Add Comment
Please, Sign In to add comment