-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cv.treat option/error AND comparison to gsynth #19
Comments
Could you email Ziyi and CC me. That may be easier.
…On Wed, May 26, 2021 at 9:08 AM pbritteon ***@***.***> wrote:
Hi Yiqing. Thanks for referring me to the fect package earlier. It looks
like another great resource!
I have two questions about the fect and gsynth packages...
xxxxxxxxxxxxxxxxxxxxxxxx
The first is about an error message that I get when running the ife model
using the fect package on a balanced panel of 10 treatment units (all
treated in the same month), 150+ control units, 108 time points (60 pre, 48
post)...
The code that I run is...
out.ife <- fect(ddays_social ~ D_gm, data = data, method = "ife", index =
c("id","time"), force = "two-way", CV = TRUE, r = c(0, 5), se = TRUE,
nboots = 100, parallel = TRUE, seed = 1234)
The error reads...
Error in cv.sample(II, D, rm.count, cv.nobs, cv.treat, cv.donut) :
Too few observations are valid for cross-validation. Try setting the
option cv.treat to FALSE.
What does the cv.treat option specify? When I specify cv.treat = FALSE the
model runs but I am not sure what this is doing and why I need to specify
the option.
xxxxxxxxxxxxxxxxxxxxxxx
Secondly, I have tried running the same model using the gsynth command...
out.gsynth <- gsynth(ddays_social ~ D_gm, data = data, index =
c("id","time"), EM = TRUE, force = "two-way", CV = TRUE, r = c(0, 5), se =
TRUE, inference = "parametric", nboots = 100, parallel =TRUE, seed = 1234)
The gsynth model identifies 2 factors from the cross-validation process.
In comparison, the fect ife model above (with cv.treat = FALSE) identifies
3 factors from the cross-validation process.
Do you know why the two packages identify a different number of factors in
this scenario? All I can think of is that it is to do with the cv.treat
option as discussed above... but I am probably missing something.
P.S. The models estimate the same results when fixing the number of
factors (e.g. specifying CV = FALSE and r=c(2) )
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2PKGDERFDADF4G4464WITTPUMGBANCNFSM45SMNZCA>
.
|
Thanks Yiqing. Will do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Yiqing. Thanks for referring me to the fect package earlier. It looks like another great resource!
I have two questions about the fect and gsynth packages...
xxxxxxxxxxxxxxxxxxxxxxxx
The first is about an error message that I get when running the ife model using the fect package on a balanced panel of 10 treatment units (all treated in the same month), 150+ control units, 108 time points (60 pre, 48 post)...
The code that I run is...
out.ife <- fect(ddays_social ~ D_gm, data = data, method = "ife", index = c("id","time"), force = "two-way", CV = TRUE, r = c(0, 5), se = TRUE, nboots = 100, parallel = TRUE, seed = 1234)
The error reads...
Error in cv.sample(II, D, rm.count, cv.nobs, cv.treat, cv.donut) :
Too few observations are valid for cross-validation. Try setting the option cv.treat to FALSE.
What does the cv.treat option specify? When I specify cv.treat = FALSE the model runs but I am not sure what this is doing and why I need to specify the option.
xxxxxxxxxxxxxxxxxxxxxxx
Secondly, I have tried running the same model using the gsynth command...
out.gsynth <- gsynth(ddays_social ~ D_gm, data = data, index = c("id","time"), EM = TRUE, force = "two-way", CV = TRUE, r = c(0, 5), se = TRUE, inference = "parametric", nboots = 100, parallel =TRUE, seed = 1234)
The gsynth model identifies 2 factors from the cross-validation process.
In comparison, the fect ife model above (with cv.treat = FALSE) identifies 3 factors from the cross-validation process.
Do you know why the two packages identify a different number of factors in this scenario? All I can think of is that it is to do with the cv.treat option as discussed above... but I am probably missing something.
P.S. The models estimate the same results when fixing the number of factors (e.g. specifying CV = FALSE and r=c(2) )
The text was updated successfully, but these errors were encountered: