BookmarkSubscribeRSS Feed
PhilipBak8
Calcite | Level 5

There are two input variable for lackfit option in model option in proc logistic: dfreduce and ngruoups

But when I tried to specify them, error occured.

 

title 'Example 1. Stepwise Regression';
data Remission;
input remiss cell smear infil li blast temp;
label remiss='Complete Remission';
datalines;
1 .8 .83 .66 1.9 1.1 .996
1 .9 .36 .32 1.4 .74 .992
0 .8 .88 .7 .8 .176 .982
0 1 .87 .87 .7 1.053 .986
1 .9 .75 .68 1.3 .519 .98
0 1 .65 .65 .6 .519 .982
1 .95 .97 .92 1 1.23 .992
0 .95 .87 .83 1.9 1.354 1.02
0 1 .45 .45 .8 .322 .999
0 .95 .36 .34 .5 0 1.038
0 .85 .39 .33 .7 .279 .988
0 .7 .76 .53 1.2 .146 .982
0 .8 .46 .37 .4 .38 1.006
0 .2 .39 .08 .8 .114 .99
0 1 .9 .9 1.1 1.037 .99
1 1 .84 .84 1.9 2.064 1.02
0 .65 .42 .27 .5 .114 1.014
0 1 .75 .75 1 1.322 1.004
0 .5 .44 .22 .6 .114 .99
1 1 .63 .63 1.1 1.072 .986
0 1 .33 .33 .4 .176 1.01
0 .9 .93 .84 .6 1.591 1.02
1 1 .58 .58 1 .531 1.002
0 .95 .32 .3 1.6 .886 .988
1 1 .6 .6 1.7 .964 .99
1 1 .69 .69 .9 .398 .986
0 1 .73 .73 .7 .398 .986
;
run;
title 'Stepwise Regression on Cancer Remission Data';
proc logistic data=Remission outest=betas covout;
model remiss(event='1')=cell smear infil li blast temp
/ selection=stepwise
slentry=0.3
slstay=0.35
details
lackfit;
* lackfit (dfreduce=2, ngroups=5);*error;
* I don't know why it does not
* work;
output out=pred p=phat lower=lcl upper=ucl
predprob=(individual crossvalidate);
run;

6 REPLIES 6
Ksharp
Super User

Either your sas version is too low or Try PROC HPLOGISTIC .

PhilipBak8
Calcite | Level 5
My SAS version is Windows version 6.2.9200.
Is it too old to do it?
Reeza
Super User

@PhilipBak8 wrote:
My SAS version is Windows version 6.2.9200.
Is it too old to do it?

That's possibly your EG version but not your SAS version. Use the following to see your SAS version, but you also need your SAS/STAT version, where the latest is 14.3

 

%put &sysvlong;

proc product_status;run;
PhilipBak8
Calcite | Level 5
Thank you!

For Base SAS Software ...
Custom version information: 9.4_M2
Image version information: 9.04.01M2P072314
For SAS/STAT ...
Custom version information: 13.2

Is it too old to do it?
Ksharp
Super User

Try PROC HPLOGISTIC .

And don't forget check the example of it in sas documentation.

Ksharp
Super User
Here is what I refer to in PROC HPLOGISTIC documentation. LACKFIT< (DFREDUCE=r NGROUPS=G) > performs the Hosmer and Lemeshow goodness-of-fit test (Hosmer and Lemeshow 2000) for binary response models. The subjects are divided into at most G groups of roughly the same size, based on the percentiles of the estimated probabilities. You can specify G as any integer greater than or equal to 5; by default, G=10. Let the actual number of groups created be g. The discrepancies between the observed and expected number of observations in these g groups are summarized by the Pearson chi-square statistic, which is then compared to a chi-square distribution with g–r degrees of freedom. You can specify a nonnegative integer r that satisfies g–r 1; by default, r=2. A small p-value suggests that the fitted model is not an adequate model. For more information, see the section “The Hosmer-Lemeshow Goodness-of-Fit Test” on page 4274.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 6 replies
  • 2037 views
  • 0 likes
  • 3 in conversation