load("data.frame.rda")
library(sandwich)
library(pcse)
model <- lm(data.frame$Y ~ data.frame$X1 + data.frame$X2 + as.factor(data.frame$state) + as.factor(data.frame$year))
vcovHAC(model, prewhite = FALSE, adjust = FALSE, sandwich = TRUE, ar.method = "ols")
R will not return any results, yet acts as if it is computing the results. This goes on for 4 hours or more.
I wanted to run the following:
library(pcse)
model <- lm(data.frame$Y ~ data.frame$X1 + data.frame$X2 + as.factor(data.frame$state) + as.factor(data.frame$year))
model.pcse <- pcse(model, groupN = data.frame$state, groupT = data.frame$year)
Error in pcse(model, groupN = BRFSS_OBESEBALANCED$X_STATE, groupT = BRFSS_OBESEBALANCED$YEAR) :
There cannot be more than nCS*nTS rows in the using data!
If there are any workarounds for this problem, I would greatly appreciate learning about them.
Thanks,
Nicholas Pretnar
University of Missouri, Economics
npretnar at gmail.com