IQSS / Zelig

A statistical framework that serves as a common interface to a large range of models
http://zeligproject.org
111 stars 43 forks source link

quantile regression with Amelia data #277

Closed christophergandrud closed 7 years ago

christophergandrud commented 7 years ago

From Arisha A Ashraf via email:

I tried using the following for quantile regression on my imputed datasets, but this doesn’t recognize the combined imputed data file from Amelia.

z.out.quant <- zelig(log(revacre) ~ log(watprice), model = "rq",
                                 data = a.out, tau = 0.5)
## Error in y$cov : $ operator is invalid for atomic vectors

The only thing that works is using each (of my 5) imputations individually. This isn't too inconvenient, but I'd prefer to learn the most efficient command possible

z.out.quant <- zelig(log(revacre) ~ log(watprice), 
                                 model = "rq",data = a.out$imputations[[1]], tau = 0.5)
christophergandrud commented 7 years ago

Addressed in https://github.com/IQSS/Zelig/commit/46479a260c12620fd56016ee99fd0ac0323e8628

Note: also exposed an issue with vcov with quantile models. This is resolved by: https://github.com/IQSS/Zelig/commit/46479a260c12620fd56016ee99fd0ac0323e8628#diff-cbb7235afee10c3646161358a7655b0aR670