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;
⏰
Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.
Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.