Skip to content
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

Error in synth.core (object 'r.cv' not found) #57

Open
munshimdrasel opened this issue Mar 12, 2021 · 3 comments
Open

Error in synth.core (object 'r.cv' not found) #57

munshimdrasel opened this issue Mar 12, 2021 · 3 comments

Comments

@munshimdrasel
Copy link

Hy,

I'm getting the following error while running gsynth package.

Error in synth.core(Y = Y, X = X, D = D, I = I, W = W, r = r, r.end = r.end, :
object 'r.cv' not found
In addition: Warning messages:
1: In min(T0) : no non-missing arguments to min; returning Inf
2: In min(T0.ub) : no non-missing arguments to min; returning Inf
3: In min(T0.ub) : no non-missing arguments to min; returning Inf
4: In min(T0) : no non-missing arguments to min; returning Inf
5: In matrix(est.co$xi, TT, Ntr, byrow = FALSE) :
data length exceeds size of matrix

I'm using following datasets (showing first 6 lines):

      ID NOx..tons. HEAT.INPUT SUM_OP_TIME   time inputed

1: 10017-002 9.508 280816.9 744.00 201605 0
2: 10017-002 27.296 412025.3 744.00 201808 0
3: 10017-002 10.696 253168.6 743.98 201508 0
4: 10017-002 24.366 392890.2 720.00 201606 0
5: 10017-002 28.349 339108.0 720.00 202009 1
6: 10017-002 34.954 373253.5 744.00 201905 0

out <- gsynth(NOx..tons. ~ inputed+ HEAT.INPUT + SUM_OP_TIME, data=ampd_sy_va3,
index = c("ID","time"), force = "two-way",
CV = TRUE, r = c(0, 5), se = TRUE, inference = "parametric", nboots = 1000,
parallel = FALSE)

Can you please let me know how to resolve this?

@xuyiqing
Copy link
Owner

xuyiqing commented Mar 12, 2021 via email

@munshimdrasel
Copy link
Author

Hello Professor,

I'm using the version from Github. After looking into my data using panelView I'm seeing there are missing data in my datasets.
image

In such case what should I do? Do I need to remove missing data?

Regards,
Rasel

@liulch
Copy link
Collaborator

liulch commented Mar 16, 2021

Perhaps the problem may be that for post-treatment periods, you only have observations for treated units (which cannot be used for fitting the model)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants