![]() | ![]() | ![]() | ![]() | ![]() |
| Contents: | Purpose / Requirements / Usage / Details / Limitations / Missing Values |
%inc "<location of your file containing the ESTSTATS macro>";
Following this statement, you may call the %ESTSTATS macro. See the Results tab for an example.
This macro assumes that the model will be fitted and the procedure's OUTEST= data set will be created without errors. It is recommended that you first use the desired procedure directly to fit and confirm the model. Then use this macro to extract the parameter estimates and other statistics.
The following parameters are required. The X= parameter is required if there are any predictors in the model.
The following parameters are optional:
Additional special variables in OUTEST= data sets (e.g. _LNLIKE_, _LINK_, _DIST_, etc.) are not kept by this macro.
The fitted model must contain an intercept in all regression models other than the proportional hazards (PHREG) model. An intercept-only model is fit if X= is omitted.
Only Wald confidence intervals can be output in logistic models. Only binary response variables can be modeled with the logistic and probit methods.
Time-dependent variables and stratified analyses are not allowed in proportional hazards models. Offset variables are not allowed in these models or in logistic or probit models. A non-zero threshold parameter is not allowed in probit or logistic models.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
E(oxy) = b0 + b1*runtime + b2*age + b3*weight
Separate models are fit for individuals with very low resting pulse (below 55 beats/min) and moderately low resting pulse (55 to the maximum of 70 beats/min).
data fitness;
input age weight oxy runtime rstpulse runpulse maxpulse;
if rstpulse<55 then pulse='Very Low'; else pulse='Mod. Low';
datalines;
44 89.47 44.609 11.37 62 178 182
40 75.07 45.313 10.07 62 185 185
44 85.84 54.297 8.65 45 156 168
42 68.15 59.571 8.17 40 166 172
38 89.02 49.874 9.22 55 178 180
47 77.45 44.811 11.63 58 176 176
40 75.98 45.681 11.95 70 176 180
43 81.19 49.091 10.85 64 162 170
44 81.42 39.442 13.08 63 174 176
38 81.87 60.055 8.63 48 170 186
44 73.03 50.541 10.13 45 168 168
45 87.66 37.388 14.03 56 186 192
45 66.45 44.754 11.12 51 176 176
47 79.15 47.273 10.60 47 162 164
54 83.12 51.855 10.33 50 166 170
49 81.42 49.156 8.95 44 180 185
51 69.63 40.836 10.95 57 168 172
51 77.91 46.672 10.00 48 162 168
48 91.63 46.774 10.25 48 162 164
49 73.37 50.388 10.08 67 168 168
57 73.37 39.407 12.63 58 174 176
54 79.38 46.080 11.17 62 156 165
52 76.32 45.441 9.63 48 164 166
50 70.87 54.625 8.92 48 146 155
51 67.25 45.118 11.08 48 172 172
54 91.63 39.203 12.88 44 168 172
51 73.71 45.790 10.47 59 186 188
57 59.08 50.545 9.93 49 148 155
49 76.32 48.673 9.40 56 186 188
48 61.24 47.920 11.50 52 170 176
52 82.78 47.467 10.50 53 170 172
;
/* Define the ESTSTATS macro */
%inc "<location of your file containing the ESTSTATS macro>";
%eststats( data = fitness,
method = reg,
by = pulse,
y = oxy,
x = runtime age weight,
form = statcol,
out = regout)
proc print data=regout noobs;
by pulse;
run;
------------------------------- PULSE=Mod. Low ------------------------------- VARIABLE _LABEL_ PARMS STDERR T P BETA_LCL BETA_UCL INTERCEP Intercept 70.7562 14.0191 5.04714 0.00050 39.5198 101.993 RUNTIME -2.5805 0.4998 -5.16351 0.00042 -3.6941 -1.467 AGE -0.0603 0.1426 -0.42307 0.68120 -0.3781 0.257 WEIGHT 0.0735 0.1280 0.57399 0.57866 -0.2117 0.359 ------------------------------- PULSE=Very Low ------------------------------- VARIABLE _LABEL_ PARMS STDERR T P BETA_LCL BETA_UCL INTERCEP Intercept 101.155 9.40999 10.7497 0.00000 80.8257 121.484 RUNTIME -3.211 0.66014 -4.8640 0.00031 -4.6371 -1.785 AGE -0.284 0.16283 -1.7422 0.10507 -0.6355 0.068 WEIGHT -0.073 0.07180 -1.0101 0.33090 -0.2276 0.083
Using the default FORM=STATROW option with this example results in the following output:
------------------------------- PULSE=Mod. Low -------------------------------
_TYPE_ INTERCEP RUNTIME AGE WEIGHT
PARMS 70.756 -2.58054 -0.06034 0.07346
STDERR 14.019 0.49976 0.14263 0.12797
T 5.047 -5.16351 -0.42307 0.57399
P 0.001 0.00042 0.68120 0.57866
BETA_LCL 39.520 -3.69408 -0.37814 -0.21169
BETA_UCL 101.993 -1.46699 0.25746 0.35860
------------------------------- PULSE=Very Low -------------------------------
_TYPE_ INTERCEP RUNTIME AGE WEIGHT
PARMS 101.155 -3.21091 -0.28368 -0.07252
STDERR 9.410 0.66014 0.16283 0.07180
T 10.750 -4.86397 -1.74219 -1.01005
P 0.000 0.00031 0.10507 0.33090
BETA_LCL 80.826 -4.63706 -0.63546 -0.22763
BETA_UCL 121.484 -1.78476 0.06809 0.08259
Right-click on the link below and select Save to save
the %ESTSTATS macro definition
to a file. It is recommended that you name the file
eststats.sas.
Download and save eststats.sas
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> LIFEREG Analytics ==> Survival Analysis Analytics ==> Bayesian Analysis SAS Reference ==> Procedures ==> PHREG SAS Reference ==> Procedures ==> REG Analytics ==> Multivariate Analysis SAS Reference ==> Procedures ==> PROBIT Analytics ==> Regression Analytics ==> Categorical Data Analysis SAS Reference ==> Procedures ==> LOGISTIC |
| Date Modified: | 2007-08-14 03:03:04 |
| Date Created: | 2005-01-13 15:03:16 |
| Product Family | Product | Host | Starting Release | Ending Release |
| SAS System | SAS/STAT | All | 6.12 | 6.12 |





