10-01-2014 11:13 AM
Sorry for the very naive question, still coming from R.
If I am using proc reg to obtain parameter estimates from 'dataset A' to explain 'y', how do I take those parameter estimates and get use them to get predicted values of 'y' in dataset b?
Both datasets have the same columns, they are just for different test subjects.
Thanks! And again, sorry for the simple question.
10-08-2014 07:31 PM
Another approach is to concatenate the files with y set to missing in the cases that come from dataset b. Run the regression and output the predicted values. Select only those cases that came from dataset b and the predicted value is the variable you want.
10-08-2014 09:52 PM
To add to Paige's answer, the documentation includes an example of what you're trying to do.
If you need prediction intervals this is the way to go. If you don't need prediction intervals, I'm usually lazy and use Bruce's method.
10-08-2014 10:23 PM
For another alternative, look at the STORE statement in PROC REG and the CODE statement in PROC PLM. The combination gives you the possibility of generating automatically the scoring code (SAS statements) from your regression.