Open IdaHjermitslev opened 5 years ago
Hi, @IdaHjermitslev . I also had this issue. Depending on the covariates, it tended to occur with covariates in my model, but not without them.
I wanted to control for covariates. I found the error never appeared when I added the following argument to my gsynth function call:
EM = TRUE,
So perhaps see if this works?
out <- gsynth(Y ~ D + X1 + X2, data = data, index = c("id", "time"),
force = "two-way", EM = TRUE, CV = TRUE, r = c(0, 5), se = TRUE, inference = "parametric",
nboots = 1000, parallel = FALSE)
Dear @michaeldgarber. Yes, that resolved my issue. Thank you so much! Any idea why my particular data needs the Expectation Maximisation algorithm?
Great! No, I'm not sure why, unfortunately, so perhaps it can be left open with this as a noted workaround...
Hi, @IdaHjermitslev . I also had this issue. Depending on the covariates, it tended to occur with covariates in my model, but not without them.
I wanted to control for covariates. I found the error never appeared when I added the following argument to my gsynth function call:
EM = TRUE,
So perhaps see if this works?
out <- gsynth(Y ~ D + X1 + X2, data = data, index = c("id", "time"), force = "two-way", EM = TRUE, CV = TRUE, r = c(0, 5), se = TRUE, inference = "parametric", nboots = 1000, parallel = FALSE)
I experienced the same error code and EM = TRUE
resolved it. Thanks for the tip!
Hi could you try the "fect" package instead, and set
method = "gsynth"
We're in the process of merging these two package and will more actively maintain "fect".
Thanks!
On Wed, Sep 18, 2024 at 1:31 PM Patrick Chester @.***> wrote:
Hi, @IdaHjermitslev https://github.com/IdaHjermitslev . I also had this issue. Depending on the covariates, it tended to occur with covariates in my model, but not without them.
I wanted to control for covariates. I found the error never appeared when I added the following argument to my gsynth function call: EM = TRUE,
So perhaps see if this works?
out <- gsynth(Y ~ D + X1 + X2, data = data, index = c("id", "time"), force = "two-way", EM = TRUE, CV = TRUE, r = c(0, 5), se = TRUE, inference = "parametric", nboots = 1000, parallel = FALSE)
I experienced the same error code and EM = TRUE resolved it. Thanks for the tip!
— Reply to this email directly, view it on GitHub https://github.com/xuyiqing/gsynth/issues/32#issuecomment-2359351025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2PKGAI6MABHHB32X55UJDZXHPLVAVCNFSM6AAAAABOOPO53OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZGM2TCMBSGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Yiqing Xu
Assistant Professor Department of Political Science Stanford University https://yiqingxu.org/
@xuyiqing Thanks for the feedback! I'll give fect a try.
Dear Professor Xu
Thank you for your work on the generalised synthetic control method.
I am trying to use the gsynth package as specified in the examples, but I am running into an error that I cannot resolve. I have verified that my dataset matches the examples provided in the package.
I am providing the dataset, example code and the error I am getting.
I am using R version 3.4.0 and gsynth version 1.1.4.
Code:
Error:
Data: data.rds.zip
I would greatly appreciate your help.