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. 

Respected Advisor
Posts: 2,492

Re: Applying parameter estimates to another dataset.

Posted in reply to bobcobbjr

Use PROC SCORE

--
Paige Miller
Frequent Contributor
Posts: 144

Re: Applying parameter estimates to another dataset.

Posted in reply to bobcobbjr

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: 22,444

Re: Applying parameter estimates to another dataset.

Posted in reply to bobcobbjr

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

Esteemed Advisor
Posts: 5,321

Re: Applying parameter estimates to another dataset.

Posted in reply to bobcobbjr

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
  • 365 views
  • 1 like
  • 5 in conversation