Open whatever opened 11 years ago
This may be related to issue #48, but I'm not sure.
The updated first differences appears to work for a single pair of observations, but not across a range:
obs <- 1000 dat <- data.frame(cbind(rnorm(obs), runif(obs))) names(dat) <- c("myX1", "myX2") grps <- c("g1", "g2", "g3") dat$grp <- as.factor(sample(grps, obs, replace = TRUE))
dat$myY <- dat$myX1 + 2_dat$myX2 - dat$myX1_dat$myX2 + rnorm(obs)
m1 <- zelig(myY ~ myX1 + myX2 + myX1:myX2 + grp, data = dat, model = "ls")
x.out <- setx(m1, myX1 = 1, myX2 = .4) x.out2 <- setx(m1, myX1 = 1, myX2 = .6) s.out <- sim(m1, x = x.out, x1 = x.out2)
test <- simulation.matrix(s.out, "First Differences") summary(test)
x.out <- setx(m1, myX1 = 1:2, myX2 = .4) x.out2 <- setx(m1, myX1 = 1:2, myX2 = .6) s.out <- sim(m1, x = x.out, x1 = x.out2)
test <- simulation.matrix(s.out, "First Differences") summary(test)
Pooled results work differently than in Zelig 3.5. This needs both a tweak and a documentation change