Write and run SAS programs in your web browser

Running Counterfactuals

Reply
Occasional Contributor
Posts: 12

Running Counterfactuals

Hello!

 

I was wondering if there was an easy way to run counterfactuals in SAS; for example, my regression is:

 

Y = B1*SAT + B2*LCFF + B3*Funding

 

Using the coefficients I find for B1, B2, and B3, I'd like to recalculate values for Y to see what Y would be if LCFF = 0. 

Grand Advisor
Posts: 17,308

Re: Running Counterfactuals

It sounds like you want to score a dataset. 

 

Make a mock dataset that has the values you'd like the Y for, original dataset with LCFF=0. 

Then use a score procedure to generate your output. 

 

Proc Score, PLM, Code statement or Score within PROC REG. 

 

http://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html

Ask a Question
Discussion stats
  • 1 reply
  • 115 views
  • 0 likes
  • 2 in conversation