I am doing a logistic regression analysis with Lyme disease (borrelia) as dependent variable. I wanted to check whether the predictor age, as measured on ratio-scale, is linearly related to the log odds. I used the command Boxtid in stata in order to investigate this. However, since I am beginner in statistics, I am not sure if I have interpreted the results correctly.
I got this result:
I interpret this as: the p-value of 0.365 (non-significant) says that we accept the null hypothesis of linearity. We can therefore say that age is linear to the log odds. Is this correct interpretation?
I got this result:
Code:
. boxtid logistic borrelia age Iteration 0: Deviance = 1030.56 Iteration 1: Deviance = 1030.559 (change = -.000988) -> gen double Iage__1 = X^1.9267-22.98836857 if e(sample) -> gen double Iage__2 = X^1.9267*ln(X)-37.40487309 if e(sample) (where: X = age/10) [Total iterations: 1] Box-Tidwell regression model Logistic regression Number of obs = 1510 LR chi2(2) = 32.12 Prob > chi2 = 0.0000 Log likelihood = -515.27909 Pseudo R2 = 0.0302 borrelia Odds Ratio Std. Err. z P>z [95% Conf. Interval] Iage__1 1.029305 .1032665 0.29 0.773 .8455632 1.252974 Iage_p1 1.001444 .0455013 0.03 0.975 .916119 1.094717 age .0281323 .0052322 5.377 Nonlin. dev. 0.822 (P = 0.365) p1 1.926708 1.310557 1.470 Deviance: 1030.559.
Comment