I realize there must be an easy option that I'm missing here... I want to predict "yhat" after a regression, with various alterations to the matrix of covariates. Of course I can do this by changing the X matrix, but if I want to do this over and over, basically predicting the outcomes under various X scenarios, it becomes a pain to change X back and forth from it's original values. I thought either "predict" or "margins" would allow me to do this, but predict doesn't allow the "at" option, and margins doesn't seem to have an option for actually predicting a variable (aka a value for each observation)? Is there an efficient way to do this that I'm missing? Thanks!
-
Login or Register
- Log in with
Comment