Hello,
I have wrote the following code to built a regression model in SAS. but I also need p-value az an output.
proc reg data=yearlyTrend_calculation;
model yearlyAvg=a0 a1;
output out=regres p=yhat r=e stdp=sd;
run;
I would be really appriciate if somebody help me with this.
thank you in advance,
Samira
A Proc Statment is the bit that starts with Proc and ends with a ";" .
So you want
proc reg data=yearlyTrend_calculation Tableout outest=Est; model yearlyAvg=a0 a1; output out=regres p=yhat r=e stdp=sd; run;
Add
Tableout outest=Est
to the PROC statement
And output dataset named EST will have the pvalues among a lot of the other model statistics. Look at the value of _type_ the find the pvalue.
I chaged my code to the following based on your suggestion:
proc reg data=yearlyTrend_calculation;
model yearlyAvg=a0 a1;
output out=regres p=yhat r=e stdp=sd;
Tableout outest=Est;
run;
but when I want to print the result : proc print data=Est; run; , I got the following error:
run;
182 Tableout outest=Est;
________
180
NOTE: The previous statement has been deleted.
ERROR 180-322: Statement is not valid or it is used out of proper order.
A Proc Statment is the bit that starts with Proc and ends with a ";" .
So you want
proc reg data=yearlyTrend_calculation Tableout outest=Est; model yearlyAvg=a0 a1; output out=regres p=yhat r=e stdp=sd; run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.