Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: exact logistic regression-further details


From   "Michael N. Mitchell" <[email protected]>
To   [email protected]
Subject   Re: st: exact logistic regression-further details
Date   Fri, 25 Jun 2010 22:46:55 -0700

Dear Nick

As I read this, it sounds like the error you are getting reflects that fact that the outcome is always 0 when the predictor -jaw- is 0. If I am understanding this correctly, this is both a statistical problem and a problem of the predictor and outcome being independently defined from each other. If so, perhaps it would be useful to see how previous publications have handled the definition of the predictor and outcome.

I hope this helps,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week         - http://www.MichaelNormanMitchell.com



On 2010-06-25 10.52 AM, Nikolaos Pandis wrote:
Dear Michael and all,

I tried exlogistic because I could not fit the logistic model with the variables I was interested in doing so. I was getting the message that var predicts the outcome perfectly.
Perhaps using exlogistic is not the appropriate approach, but anyways I gave it a try.

I am giving below details of dataset and intended analysis:

Variables

id:patinet id
missence: binary variable missing or not missing any teeth
jaw: 4 categories corresponding to jaw location of missing teeth
(0=no jaw-always 0 when var missinence is 0, 1=upper jaw, 2=lower jaw, 3=missing teeth in both jaws)
sex-binary
rightleft: 4 levels indicating if no side is missing any teeth, the right, the left or bot sides have missing teeth
missingpattern: 5 categories and corresponds to different combinations of missing teeth. For example category 0 is combination of missing 2 particular teeth in the upper jaw.

The idea is to find how the odds ratio of missing teeth vs no missing teeth vary after adjusting for the variables such as sex, jaw rightleft ect

I fitted:

.logistic missence sex // to get the odds ratio between male/female
The above model did produce reasonable odds ratios and CIs

I tried

.xi:logistic missence sex i.jaw // to get the OR of missing in jaw category 1,2,3 vs jaw==0 which is equivelant to missence==0. This model does not converge and states that we have perfect data prediction. Is it because jaw==0 corresponds exactly to missence ==0 and jaw=1,2,3 corresponds to missence==1?

I was wondering if there is way to produce the ORs that give the odds of jaw 1, 2 or 3 vs jaw==0 (adjusted for sex) or is it not possible?

I also fitted:

.mlogit missingpattern sex

which run fine

if I run
mlogit missingpattern sex i.jaw

I get z values close to 0 and zero values for CIs undicating again perfect prediction.

I think I can see the problem and I am wondering if I should expand my data where for each id we have as many rows as the number of missing teeth?

Any suggestions would be appreciated.

Many thanks,
Nick
--- On Mon, 6/21/10, Michael N. Mitchell<[email protected]>  wrote:

From: Michael N. Mitchell<[email protected]>
Subject: Re: st: exact logistic regression
To: [email protected]
Date: Monday, June 21, 2010, 11:29 PM
Dear Nick

    I created an example based on the -auto-
dataset like this...

clear all
sysuse auto
replace rep78 = rep78 - 1 if rep78 !=1
tab rep78
expand 28
keep in 1/2061
xi: exlogistic foreign i.rep78 , memory(1400m)

    and I was not able to complete this
either, getting the message

observation 415: enumerations =    9333408
observation 416: enumerations =    9470664
the operating system refuses to provide the requested
memory
r(909);

    Do you have a very small or empty cell
when you crosstabulate -a- by -b-? Perhaps you
could share the crosstab of -a- and -b- with us to
illustrate the need for exact logistic
regression?

Best regards,

Michael N. Mitchell
Data Management Using Stata      - http://www.stata.com/bookstore/dmus.html
A Visual Guide to Stata Graphics - http://www.stata.com/bookstore/vgsg.html
Stata tidbit of the week
    - http://www.MichaelNormanMitchell.com



On 2010-06-21 12.29 PM, Nikolaos Pandis wrote:
Hi to all.

1. I try to run in Stata 11 IC:

xi:exlogistic a i.b
a= binary (0,1)
b=4 level categorical (0-3)
2061 observations

I get the following error message:
exceeded memory limit of 10.0M bytes; use the memory()
option to increase the memory limit
error(499)

I use set memory to values larger than 10m and still
get the same message.

exceeded memory limit of 10.0M bytes; use the memory()
option to increase the memory limit
error(499)

2. I was wondering if it is possible to run
multinomial logistic regression using exact methods.


Any comments would be appreciated.

Many thanks,
Nick



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index