insongkim / PanelMatch

113 stars 34 forks source link

New error message #41

Closed RobbyMax1999 closed 4 years ago

RobbyMax1999 commented 5 years ago

The package was working perfectly fine for me when I used a slightly outdated version, but since I installed the most recent version, I get the following error with PanelMatch: "Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels." However, nothing in my data has changed. I have missing values on some variables, but that should not cause the problem. What changed in the most recent package version that could cause this error?

adamrauh commented 5 years ago

We changed the syntax for including lagged covariates in refinement, which I suspect is what's causing your issue. Take a look at the discussion here, and I think that should help.

RobbyMax1999 commented 5 years ago

Thank you so much! This fixed the error with PanelMatch. However, I am now also getting a new error with PanelEstimate despite the syntax being the same as in the old package. It must be something concerning the new package as I had no problems before. The new error message reads: Error in .Call("_PanelMatch_handle_vits", PACKAGE = "PanelMatch", nrow_data, : "_PanelMatch_handle_vits" not available for .Call() for package "PanelMatch" Do you have any advice what's going on? Many thanks again.

adamrauh commented 5 years ago

Hm, that's odd. How did you update the code? This error is suggesting that I didn't properly export an internal function, but things look ok here. I'm thinking maybe something odd happened in the update process -- maybe try deleting entirely and re-installing?

RobbyMax1999 commented 4 years ago

Thank you, once again! Deleting and reinstalling fixed the issue. Many thanks for your help.

adamrauh commented 4 years ago

glad to hear that fixed it!