turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- In proc logistic, how to display the results of th...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 04:13 AM

When using proc logistic for a multivariable binary logistic regression, the results of the Wald Chi-Square and corresponding P-value are displayed for each variable entered in the model ("Analysis of Maximum Likelihood Estimates" section).

Is it possible to display the Score Chi-Square and corresponding P-value for EACH variable instead ? If so, how ?

Thank you for your help.

Accepted Solutions

Solution

10-31-2016
03:34 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 01:59 PM

I think it is right that proc logistic does not produce the score test for each variable. It is possible to calculate the scoretest for each variable with PHREG, and since logistic regression and Cox-regression is closely connected, we can transform the data and get the wanted scoretest out of PHREG. Just create one single riskset with the number of successes=number of events and censor the rest. Then order the scoretest in the modelstatement.

here and example:

```
data mydata;
n=10;
do a=1 to 5;
do b=1 to 5;
do c=1 to 5;
y=rand('binomial',1/(1+exp(5-a-b)),n);
output;
end;
end;
end;
run;
data mydata2;
set mydata;
t=1;w=y;output;
t=2;w=n-y;output; (its not important which values you use on t. just one value for the riskset, and the other should be bigger.;
run;
proc phreg data=mydata2;
class a b c/param=glm;
model t*t(2)=a b c/type3(all) ties=discrete;
freq w;
run;
```

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 06:15 AM

I never heard EACH variable in logistic regression. What it stand for ?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 06:23 AM

This is not an acronym. I just wanted to underline that I would like to have the result of the test score associated with each variable of the multivariable model, not just the result of the score test for the global null hypothesis (All Beta=0), which is already provided by proc logistic.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 07:07 AM

Maybe you can't , I think Likelihood Ratio and Score is only for Global H0 .

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 07:33 AM

Thank you for your response. This may be true. However, I doubt it because when you operate a forward (or stepwise) variable selection using proc logistic, the result of the score test for each candidate variable is provided.

However, in this case, the results of each score test seems to correspond to a comparison of the current model vs. the current model + one variable.

To make it clearer, let's take an example:

When i run the following SAS code :

" proc logistic desc; model end4_unexplained = age antiplatelet nihss0h

/ selection=forward slstay=0.10 details; run; "

At step 1, the variable "nihss0h" is entered in the model.

A the end of step 1, a list of variables eligible for entry is provided, with a Score Chi-Square and corresponding P-value for each candidate variable (please see the image associated to this message). I believe that the P-value for the variable "age" corresponds to a comparison, using the Score Test, of the model with the variables "age" and "nihss0h", versus the model containing only "nihss0h".

Is this correct ?

If so, back to the main question of this topic (displaying the results of a Score test for each variable using proc logistic): do you think that such a test can not apply to this situation, or that it is simply not provided by proc logistic ?

Solution

10-31-2016
03:34 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 01:59 PM

I think it is right that proc logistic does not produce the score test for each variable. It is possible to calculate the scoretest for each variable with PHREG, and since logistic regression and Cox-regression is closely connected, we can transform the data and get the wanted scoretest out of PHREG. Just create one single riskset with the number of successes=number of events and censor the rest. Then order the scoretest in the modelstatement.

here and example:

```
data mydata;
n=10;
do a=1 to 5;
do b=1 to 5;
do c=1 to 5;
y=rand('binomial',1/(1+exp(5-a-b)),n);
output;
end;
end;
end;
run;
data mydata2;
set mydata;
t=1;w=y;output;
t=2;w=n-y;output; (its not important which values you use on t. just one value for the riskset, and the other should be bigger.;
run;
proc phreg data=mydata2;
class a b c/param=glm;
model t*t(2)=a b c/type3(all) ties=discrete;
freq w;
run;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-31-2016 03:36 PM

Thank you so much for this elegant solution !