You’ll be able to usefulness PROC REG in SAS to suit unbending regression fashions.
You’ll be able to usefulness refer to ordinary syntax to suit a easy unbending regression type:
proc reg information = my_data;
type y = x;
run;
This may occasionally are compatible refer to unbending regression type:
y = b0 + b1x
You’ll be able to usefulness refer to ordinary syntax to suit a more than one unbending regression type:
proc reg information = my_data;
type y = x1 x2 x3;
run;
This may occasionally are compatible refer to unbending regression type:
y = b0 + b1x1 + b2x2 + b3x3
Please see instance displays the way to usefulness PROC REG to suit a easy unbending regression type in SAS along side the way to interpret the output.
Instance: Tips on how to Importance PROC REG in SAS
Assume we have now refer to dataset that comprises data on hours studied and ultimate examination ranking for 15 scholars in some magnificence:
/*build dataset*/ information exam_data; enter hours ranking; datalines; 1 64 2 66 4 76 5 73 5 74 6 81 6 83 7 82 8 80 10 88 11 84 11 82 12 91 12 93 14 89 ; run; /*view dataset*/ proc print information=exam_data;
We will usefulness PROC REG to suit a easy unbending regression type to this dataset, the usage of hours because the predictor variable and ranking because the reaction variable:
/*are compatible easy unbending regression type*/ proc reg information = exam_data; type ranking = hours; run;
The primary desk within the output displays a abstract of the type are compatible:
The Parameter Estimates desk comprises the coefficient estimates for the type.
From this desk we will be able to see the fitted regression equation:
Ranking = 65.33 + 1.98*(hours)
The PROC REG process additionally produces residual plots that we will be able to usefulness to test if the guesses of the unbending regression type are met:
Finally, the PROC REG process produces a scatterplot of the uncooked information with the fitted regression layout overlaid on manage:
This plot lets in us to visually see how neatly the regression layout suits the information.
Word: You’ll be able to to find all the documentation for PROC REG right here.
Alternative Sources
Please see tutorials provide an explanation for the way to carry out alternative regular duties in SAS:
Tips on how to Importance Proc Abstract in SAS
Tips on how to Importance Proc Tabulate in SAS
Tips on how to Importance Proc Rank in SAS