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;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.