Hello,
I wonder if anyone can help?
I'm new to stata and have been playing about with a data set to get the hang of logistic regression.
I'm attempting to assess the fit between two models - one which includes age as a continuous variable, and one which uses age as a categorical variable (which i created from the dataset by using generate agecat=autocode(age,4,28,96))
Only when i compare the two models i get this output:
Likelihood-ratio test LR chi2(2) = -14.62
(Assumption: b nested in a) Prob > chi2 = 1.0000
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
b | 1000 -629.8479 -549.6739 4 1107.348 1126.979
a | 1000 -629.8479 -556.9846 6 1125.969 1155.416
-----------------------------------------------------------------------------
Where the AIC is lower in the model using i.agecat - but the LR Chi2 test reads -14.62 which just seems wrong I seem to have done something wrong but can't figure it out...
I wonder if anyone can help?
I'm new to stata and have been playing about with a data set to get the hang of logistic regression.
I'm attempting to assess the fit between two models - one which includes age as a continuous variable, and one which uses age as a categorical variable (which i created from the dataset by using generate agecat=autocode(age,4,28,96))
Only when i compare the two models i get this output:
Likelihood-ratio test LR chi2(2) = -14.62
(Assumption: b nested in a) Prob > chi2 = 1.0000
Akaike's information criterion and Bayesian information criterion
-----------------------------------------------------------------------------
Model | Obs ll(null) ll(model) df AIC BIC
-------------+---------------------------------------------------------------
b | 1000 -629.8479 -549.6739 4 1107.348 1126.979
a | 1000 -629.8479 -556.9846 6 1125.969 1155.416
-----------------------------------------------------------------------------
Where the AIC is lower in the model using i.agecat - but the LR Chi2 test reads -14.62 which just seems wrong I seem to have done something wrong but can't figure it out...
Comment