insongkim / PanelMatch

113 stars 34 forks source link

Network Extensions get_covariate_balance() issue #69

Closed emfeltham closed 3 years ago

emfeltham commented 3 years ago

Dear team:

I have been working a bit with the caliper functionality in the network extensions branch. I realize that this is not the master branch; but, I wanted to note two errors.

The get_covariate_balance() function may be broken with this update. When I execute it, for a model with or without a caliper (including ones that work with the master branch), I receive the following error:

Error in get_yearly_dmats(as.matrix(ordered.data), treated.ids, tlist, : Not compatible with requested type: [type=character; target=double].

I can get it to work if I save the output of PanelMatch() with a caliper, using the network extensions version, and then opening a new R session loading the master branch version.

Separately, I have been receiving the following error when I try to define a caliper and use “sd” rather than “raw” units:

Error in mapply(FUN = handle_set, sub.list = mahal.nested.list, idx = 1:length(msets), : zero-length inputs cannot be mixed with those of non-zero length

Thanks again, Eric Feltham

adamrauh commented 3 years ago

Hi @emfeltham thanks for experimenting with this branch, this is actually really helpful! This branch is under pretty active development, so I am not surprised by these kinds of errors.

Would you mind putting together a reproducible example for each of these errors? This would really help me patch them. Feel free to email me (amrauh@umich.edu) if you would rather not post something publicly.

Thanks again.

adamrauh commented 3 years ago

the get_covariate_balance issue was resolved. I'll give the raw vs. sd issue a separate ticket if I'm able to replicate once I finish implementing that code