Applying parameter estimates to another dataset.

Reply
New Contributor
Posts: 2

Applying parameter estimates to another dataset.

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. 

Trusted Advisor
Posts: 1,796

Re: Applying parameter estimates to another dataset.

Use PROC SCORE

Frequent Contributor
Posts: 129

Re: Applying parameter estimates to another dataset.

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.

Super User
Posts: 19,172

Re: Applying parameter estimates to another dataset.

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.

SAS/STAT(R) 9.2 User's Guide, Second Edition

Respected Advisor
Posts: 4,821

Re: Applying parameter estimates to another dataset.

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.

PG

PG
Ask a Question
Discussion stats
  • 4 replies
  • 349 views
  • 1 like
  • 5 in conversation