Hi,
I'm trying to run Bivariate and multivariate logistic regression between ACG and patient demographic variables, however, the command (logistic or logit) take too long to run with one of the variables only and with no results, it just keeps running. I don't understand why?
I would highly appreciate if someone could let me know how to solve this issue.
Thank you
__________________________________________________ ______________________
here are the details of the variables and the results I'm getting:
The dependent variable:
ACG | Freq. Percent Cum.
------------+-----------------------------------
0 | 7,227,513 97.55 97.55
1 | 181,684 2.45 100.00
------------+-----------------------------------
Total | 7,409,197 100.00
__________________________________________________ __________________________________________________ __
//results of the bivariate logistic regression between ACG and the independent variables except (RACE)
. logistic ACG i.AGE_Cat
Logistic regression Number of obs = 7,409,197
LR chi2(5) = 14754.82
Prob > chi2 = 0.0000
Log likelihood = -845782.72 Pseudo R2 = 0.0086
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
AGE_Cat |
1 | 1.226411 .0376775 6.64 0.000 1.154744 1.302526
2 | 1.615408 .0456499 16.97 0.000 1.528368 1.707404
3 | 2.375448 .0664398 30.93 0.000 2.248733 2.509303
4 | 3.175571 .0882484 41.58 0.000 3.007234 3.353332
5 | 2.9258 .0817107 38.44 0.000 2.769955 3.090415
|
_cons | .0101912 .0002803 -166.72 0.000 .0096563 .0107557
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. logistic ACG i.FEMALE
Logistic regression Number of obs = 7,408,530
LR chi2(1) = 341.02
Prob > chi2 = 0.0000
Log likelihood = -852939.91 Pseudo R2 = 0.0002
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.FEMALE | 1.091702 .0051873 18.46 0.000 1.081582 1.101917
_cons | .0240649 .0000815 -1100.41 0.000 .0239057 .0242252
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. logistic ACG i.Liver
Logistic regression Number of obs = 7,409,197
LR chi2(1) = 3.00
Prob > chi2 = 0.0833
Log likelihood = -853158.63 Pseudo R2 = 0.0000
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.Liver | 1.019825 .0115275 1.74 0.082 .9974797 1.04267
_cons | .0251152 .0000611 -1514.69 0.000 .0249957 .0252352
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. logistic ACG i.ynch13
Logistic regression Number of obs = 7,409,197
LR chi2(1) = 4765.69
Prob > chi2 = 0.0000
Log likelihood = -850777.29 Pseudo R2 = 0.0028
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ynch13 |
Present | 1.441901 .0074603 70.73 0.000 1.427353 1.456597
_cons | .0227928 .0000648 -1329.20 0.000 .0226661 .0229202
------------------------------------------------------------------------------
. logistic ACG i.CCI_CAT
Logistic regression Number of obs = 7,409,197
LR chi2(4) = 1185.69
Prob > chi2 = 0.0000
Log likelihood = -852567.29 Pseudo R2 = 0.0007
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
CCI_CAT |
1 | .9147093 .008063 -10.11 0.000 .8990419 .9306498
2 | 1.007855 .0087731 0.90 0.369 .9908059 1.025198
3 | 1.075844 .0096988 8.11 0.000 1.057002 1.095022
4 | 1.144811 .0092928 16.66 0.000 1.126741 1.16317
|
_cons | .0242295 .0001681 -536.28 0.000 .0239023 .0245611
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
__________________________________________________ _______________________________________
. tab ACG RACE
| Race (uniform)
ACG | 1 2 3 4 5 6 | Total
-----------+------------------------------------------------------------------+----------
0 | 5,179,054 714,413 399,100 120,552 31,131 157,110 | 6,601,360
1 | 138,024 15,190 9,958 2,776 616 3,141 | 169,705
-----------+------------------------------------------------------------------+----------
Total | 5,317,078 729,603 409,058 123,328 31,747 160,251 | 6,771,065
. tab RACE
Race |
(uniform) | Freq. Percent Cum.
------------+-----------------------------------
1 | 5,317,078 78.53 78.53
2 | 729,603 10.78 89.30
3 | 409,058 6.04 95.34
4 | 123,328 1.82 97.16
5 | 31,747 0.47 97.63
6 | 160,251 2.37 100.00
------------+-----------------------------------
Total | 6,771,065 100.00
__________________________________________________ __________________________________________________ __________________________________________________
//results of the logistic regression between ACG and RACE (Bothe logistic and the logit functions did't work properly. They took forever to run.)
. logistic ACG i.RACE, or
--Break--
r(1);
. logit ACG i.RACE, or
Iteration 0: log likelihood = -793152.7
Iteration 1: log likelihood = -792634
Iteration 2: log likelihood = -792631.82
Iteration 3: log likelihood = -792631.82 (backed up)
Iteration 4: log likelihood = -792631.82 (backed up)
Iteration 5: log likelihood = -792631.82 (backed up)
Iteration 6: log likelihood = -792631.82 (backed up)
Iteration 7: log likelihood = -792631.82 (backed up)
Iteration 8: log likelihood = -792631.82 (backed up)
Iteration 9: log likelihood = -792631.82 (backed up)
Iteration 10: log likelihood = -792631.82 (backed up)
Iteration 11: log likelihood = -792631.82 (backed up)
Iteration 12: log likelihood = -792631.82 (backed up)
Iteration 13: log likelihood = -792631.82 (backed up)
Iteration 14: log likelihood = -792631.82 (backed up)
Iteration 15: log likelihood = -792631.82 (backed up)
Iteration 16: log likelihood = -792631.82 (backed up)
Iteration 17: log likelihood = -792631.82 (backed up)
Iteration 18: log likelihood = -792631.82 (backed up)
Iteration 19: log likelihood = -792631.82 (backed up)
Iteration 20: log likelihood = -792631.82 (backed up)
Iteration 21: log likelihood = -792631.82 (backed up)
Iteration 22: log likelihood = -792631.82 (backed up)
Iteration 23: log likelihood = -792631.82 (backed up)
Iteration 24: log likelihood = -792631.82 (backed up)
Iteration 25: log likelihood = -792631.82 (backed up)
Iteration 26: log likelihood = -792631.82 (backed up)
Iteration 27: log likelihood = -792631.82 (backed up)
Iteration 28: log likelihood = -792631.82 (backed up)
Iteration 29: log likelihood = -792631.82 (backed up)
Iteration 30: log likelihood = -792631.82 (backed up)
Iteration 31: log likelihood = -792631.82 (backed up)
Iteration 32: log likelihood = -792631.82 (backed up)
Iteration 33: log likelihood = -792631.82 (backed up)
Iteration 34: log likelihood = -792631.82 (backed up)
Iteration 35: log likelihood = -792631.82 (backed up)
Iteration 36: log likelihood = -792631.82 (backed up)
Iteration 37: log likelihood = -792631.82 (backed up)
Iteration 38: log likelihood = -792631.82 (backed up)
Iteration 39: log likelihood = -792631.82 (backed up)
Iteration 40: log likelihood = -792631.82 (backed up)
Iteration 41: log likelihood = -792631.82 (backed up)
Iteration 42: log likelihood = -792631.82 (backed up)
Iteration 43: log likelihood = -792631.82 (backed up)
Iteration 44: log likelihood = -792631.82 (backed up)
Iteration 45: log likelihood = -792631.82 (backed up)
Iteration 46: log likelihood = -792631.82 (backed up)
Iteration 47: log likelihood = -792631.82 (backed up)
Iteration 48: log likelihood = -792631.82 (backed up)
Iteration 49: log likelihood = -792631.82 (backed up)
Iteration 50: log likelihood = -792631.82 (backed up)
Iteration 51: log likelihood = -792631.82 (backed up)
Iteration 52: log likelihood = -792631.82 (backed up)
Iteration 53: log likelihood = -792631.82 (backed up)
Iteration 54: log likelihood = -792631.82 (backed up)
Iteration 55: log likelihood = -792631.82 (backed up)
Iteration 56: log likelihood = -792631.82 (backed up)
Iteration 57: log likelihood = -792631.82 (backed up)
Iteration 58: log likelihood = -792631.82 (backed up)
Iteration 59: log likelihood = -792631.82 (backed up)
Iteration 60: log likelihood = -792631.82 (backed up)
Iteration 61: log likelihood = -792631.82 (backed up)
--Break--
r(1);
I'm trying to run Bivariate and multivariate logistic regression between ACG and patient demographic variables, however, the command (logistic or logit) take too long to run with one of the variables only and with no results, it just keeps running. I don't understand why?
I would highly appreciate if someone could let me know how to solve this issue.
Thank you
__________________________________________________ ______________________
here are the details of the variables and the results I'm getting:
The dependent variable:
ACG | Freq. Percent Cum.
------------+-----------------------------------
0 | 7,227,513 97.55 97.55
1 | 181,684 2.45 100.00
------------+-----------------------------------
Total | 7,409,197 100.00
__________________________________________________ __________________________________________________ __
//results of the bivariate logistic regression between ACG and the independent variables except (RACE)
. logistic ACG i.AGE_Cat
Logistic regression Number of obs = 7,409,197
LR chi2(5) = 14754.82
Prob > chi2 = 0.0000
Log likelihood = -845782.72 Pseudo R2 = 0.0086
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
AGE_Cat |
1 | 1.226411 .0376775 6.64 0.000 1.154744 1.302526
2 | 1.615408 .0456499 16.97 0.000 1.528368 1.707404
3 | 2.375448 .0664398 30.93 0.000 2.248733 2.509303
4 | 3.175571 .0882484 41.58 0.000 3.007234 3.353332
5 | 2.9258 .0817107 38.44 0.000 2.769955 3.090415
|
_cons | .0101912 .0002803 -166.72 0.000 .0096563 .0107557
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. logistic ACG i.FEMALE
Logistic regression Number of obs = 7,408,530
LR chi2(1) = 341.02
Prob > chi2 = 0.0000
Log likelihood = -852939.91 Pseudo R2 = 0.0002
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.FEMALE | 1.091702 .0051873 18.46 0.000 1.081582 1.101917
_cons | .0240649 .0000815 -1100.41 0.000 .0239057 .0242252
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. logistic ACG i.Liver
Logistic regression Number of obs = 7,409,197
LR chi2(1) = 3.00
Prob > chi2 = 0.0833
Log likelihood = -853158.63 Pseudo R2 = 0.0000
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1.Liver | 1.019825 .0115275 1.74 0.082 .9974797 1.04267
_cons | .0251152 .0000611 -1514.69 0.000 .0249957 .0252352
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
. logistic ACG i.ynch13
Logistic regression Number of obs = 7,409,197
LR chi2(1) = 4765.69
Prob > chi2 = 0.0000
Log likelihood = -850777.29 Pseudo R2 = 0.0028
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ynch13 |
Present | 1.441901 .0074603 70.73 0.000 1.427353 1.456597
_cons | .0227928 .0000648 -1329.20 0.000 .0226661 .0229202
------------------------------------------------------------------------------
. logistic ACG i.CCI_CAT
Logistic regression Number of obs = 7,409,197
LR chi2(4) = 1185.69
Prob > chi2 = 0.0000
Log likelihood = -852567.29 Pseudo R2 = 0.0007
------------------------------------------------------------------------------
ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
CCI_CAT |
1 | .9147093 .008063 -10.11 0.000 .8990419 .9306498
2 | 1.007855 .0087731 0.90 0.369 .9908059 1.025198
3 | 1.075844 .0096988 8.11 0.000 1.057002 1.095022
4 | 1.144811 .0092928 16.66 0.000 1.126741 1.16317
|
_cons | .0242295 .0001681 -536.28 0.000 .0239023 .0245611
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
__________________________________________________ _______________________________________
. tab ACG RACE
| Race (uniform)
ACG | 1 2 3 4 5 6 | Total
-----------+------------------------------------------------------------------+----------
0 | 5,179,054 714,413 399,100 120,552 31,131 157,110 | 6,601,360
1 | 138,024 15,190 9,958 2,776 616 3,141 | 169,705
-----------+------------------------------------------------------------------+----------
Total | 5,317,078 729,603 409,058 123,328 31,747 160,251 | 6,771,065
. tab RACE
Race |
(uniform) | Freq. Percent Cum.
------------+-----------------------------------
1 | 5,317,078 78.53 78.53
2 | 729,603 10.78 89.30
3 | 409,058 6.04 95.34
4 | 123,328 1.82 97.16
5 | 31,747 0.47 97.63
6 | 160,251 2.37 100.00
------------+-----------------------------------
Total | 6,771,065 100.00
__________________________________________________ __________________________________________________ __________________________________________________
//results of the logistic regression between ACG and RACE (Bothe logistic and the logit functions did't work properly. They took forever to run.)
. logistic ACG i.RACE, or
--Break--
r(1);
. logit ACG i.RACE, or
Iteration 0: log likelihood = -793152.7
Iteration 1: log likelihood = -792634
Iteration 2: log likelihood = -792631.82
Iteration 3: log likelihood = -792631.82 (backed up)
Iteration 4: log likelihood = -792631.82 (backed up)
Iteration 5: log likelihood = -792631.82 (backed up)
Iteration 6: log likelihood = -792631.82 (backed up)
Iteration 7: log likelihood = -792631.82 (backed up)
Iteration 8: log likelihood = -792631.82 (backed up)
Iteration 9: log likelihood = -792631.82 (backed up)
Iteration 10: log likelihood = -792631.82 (backed up)
Iteration 11: log likelihood = -792631.82 (backed up)
Iteration 12: log likelihood = -792631.82 (backed up)
Iteration 13: log likelihood = -792631.82 (backed up)
Iteration 14: log likelihood = -792631.82 (backed up)
Iteration 15: log likelihood = -792631.82 (backed up)
Iteration 16: log likelihood = -792631.82 (backed up)
Iteration 17: log likelihood = -792631.82 (backed up)
Iteration 18: log likelihood = -792631.82 (backed up)
Iteration 19: log likelihood = -792631.82 (backed up)
Iteration 20: log likelihood = -792631.82 (backed up)
Iteration 21: log likelihood = -792631.82 (backed up)
Iteration 22: log likelihood = -792631.82 (backed up)
Iteration 23: log likelihood = -792631.82 (backed up)
Iteration 24: log likelihood = -792631.82 (backed up)
Iteration 25: log likelihood = -792631.82 (backed up)
Iteration 26: log likelihood = -792631.82 (backed up)
Iteration 27: log likelihood = -792631.82 (backed up)
Iteration 28: log likelihood = -792631.82 (backed up)
Iteration 29: log likelihood = -792631.82 (backed up)
Iteration 30: log likelihood = -792631.82 (backed up)
Iteration 31: log likelihood = -792631.82 (backed up)
Iteration 32: log likelihood = -792631.82 (backed up)
Iteration 33: log likelihood = -792631.82 (backed up)
Iteration 34: log likelihood = -792631.82 (backed up)
Iteration 35: log likelihood = -792631.82 (backed up)
Iteration 36: log likelihood = -792631.82 (backed up)
Iteration 37: log likelihood = -792631.82 (backed up)
Iteration 38: log likelihood = -792631.82 (backed up)
Iteration 39: log likelihood = -792631.82 (backed up)
Iteration 40: log likelihood = -792631.82 (backed up)
Iteration 41: log likelihood = -792631.82 (backed up)
Iteration 42: log likelihood = -792631.82 (backed up)
Iteration 43: log likelihood = -792631.82 (backed up)
Iteration 44: log likelihood = -792631.82 (backed up)
Iteration 45: log likelihood = -792631.82 (backed up)
Iteration 46: log likelihood = -792631.82 (backed up)
Iteration 47: log likelihood = -792631.82 (backed up)
Iteration 48: log likelihood = -792631.82 (backed up)
Iteration 49: log likelihood = -792631.82 (backed up)
Iteration 50: log likelihood = -792631.82 (backed up)
Iteration 51: log likelihood = -792631.82 (backed up)
Iteration 52: log likelihood = -792631.82 (backed up)
Iteration 53: log likelihood = -792631.82 (backed up)
Iteration 54: log likelihood = -792631.82 (backed up)
Iteration 55: log likelihood = -792631.82 (backed up)
Iteration 56: log likelihood = -792631.82 (backed up)
Iteration 57: log likelihood = -792631.82 (backed up)
Iteration 58: log likelihood = -792631.82 (backed up)
Iteration 59: log likelihood = -792631.82 (backed up)
Iteration 60: log likelihood = -792631.82 (backed up)
Iteration 61: log likelihood = -792631.82 (backed up)
--Break--
r(1);
Comment