insongkim / PanelMatch

114 stars 35 forks source link

Function 'PanelMatch_get_treated_indices not available #22

Closed duncanhobbs closed 5 years ago

duncanhobbs commented 5 years ago

I am using the PanelMatch function on the development branch. When I run the following code, I get an error.

matches.new <- PanelMatch(3, time.id = "year", unit.id = "cid", treatment = "titleIX", outcome = "share_diff", refinement.method = "CBPS.weight", data = workingnew, match.missing = T, 
            covs.formula = ~ rgdpch + pop + comm4 + hostnation + lag("share_diff", 1:3) + 
              lag("titleIX", 1:3) + lag("rgdpch", 1:3) + lag("pop", 1:3) + lag("comm4", 1:3) + 
              lag("hostnation", 1:3), size.match = 5)

Error in .Call("_PanelMatch_get_treated_indices", PACKAGE = "PanelMatch",  : 
  "_PanelMatch_get_treated_indices" not available for .Call() for package "PanelMatch"

Let me know if anything is unclear.

adamrauh commented 5 years ago

Hm, odd. Do you have Rcpp installed?

duncanhobbs commented 5 years ago

Yes, I have Rccp installed.

adamrauh commented 5 years ago

Would you be able to share the data you're using, at least in some form? (Feel free to email me if you don't want to post it here, if that's easier). It looks like the functions are registered appropriately...and I'm not having issues on my end with that function, so it would be helpful for me to attempt recreating the problem.

duncanhobbs commented 5 years ago

Solved. I think this ended up being an issue with installing the .dll files correctly and that is why R was saying that the functions were not available. Thanks