insongkim / PanelMatch

113 stars 34 forks source link

summary() broken? #36

Closed marcgrinberg closed 5 years ago

marcgrinberg commented 5 years ago

I just updated the PanelMatch library. The summary function seems to be broken. Just to be sure I ran the code on the README page and this is the output I get for summary(), whereas I used to get the output that you present on the README page...

summary(PE.results) Length Class Mode
coefficients 5 -none- numeric
bootstrapped.coefficients 5000 -none- numeric
bootstrap.iterations 1 -none- numeric
standard.error 5 -none- numeric
method 1 -none- character lag 1 -none- numeric
lead 5 -none- numeric
confidence.level 1 -none- numeric
qoi 1 -none- character matched.sets 96 matched.set list

Also, it may be worth noting somewhere prominent that changes were made to the syntax requirements of covs.formula. For example, you can no longer include interactions xy without putting them in I(xy) format. Also, you can no longer create factors with "factor(x>0)". Now you just write "(x>0)" (including the parentheses).

adamrauh commented 5 years ago

Thanks for catching this! I broke some methods when I was updating the documentation -- forgot to export them correctly. That should be patched.

I've tried to update the README + documentation examples to use the new syntax, but if you see any spots where this was missed, definitely let us know. The old implementation did some relatively unpleasant string parsing to work internally, but the new version uses model.frame/model.matrix, which should be much more robust -- just an fyi as to why the syntax changed.

marcgrinberg commented 5 years ago

works now. thanks