Hello,
I'm having some trouble generating bootstrap standard errors for my
dataset. It works fine for the demo, but as soon as I use my data it
sticks and doesn't want to generate them. I think the offending piece
of code is in the VA function, probably this part:
while (!boot.good && boot.se) {
index.boot1 <- sample(1:p1, p1, replace = TRUE)
index.boot2 <- sample(1:p2, p2, replace = TRUE)
commD0 <- commD[index.boot1, ]
hospD0 <- hospD[index.boot2, ]
print(commD0)
boot.good <- !(any(colMeans(commD0[, -1]) ==
1) || any(colMeans(commD0[, -1]) == 0) ||
any(colMeans(hospD0[,
-1]) == 1) || any(colMeans(hospD0[, -1]) ==
0))
}
For whatever reason, I don't think it's ever setting boot.good to TRUE
and is stuck in an infinite loop. I'm not sure what conditions would
lead that to happen, especially since preprocessing takes out all the
invariant columns anyhow.
Any advice here would be very appreciated.
TIA,
- A
--
Alexander Hanna
PhD student, Department of Sociology
University of Wisconsin-Madison
http://alex-hanna.com