In the first logistic regression we are going to run, there will only be one predictor variable, ‘general ability’ at age 11 (n920), which is a continuous variable. We are going to use the ‘logit’ command which will provide us with the untransformed beta coefficients (in log-odd units) and their confidence intervals. These are often difficult to interpret, so are sometimes converted into odds ratios. If we wanted to get the odds ratios we could use the command ‘logistic’ instead of ‘logit’ or add the ‘or’ option (‘, or’) to the ‘logit’ example below. The odds ratio is the odds of success for one group divided by the odds of success for the other group, where in this example ‘success’ is the odds of being obese or not obese. When running a logistic regression in Stata, the dependent variable should be specified immediately after the ‘logit’ command, followed by the predictor variable(s).
The output above shows that the log likelihood of the fitted model is -1892.56. The number itself does not have much meaning, but when used in comparisons with other models, it can help to identify if the reduced model fits significantly better than the full model (which we will come back to later when we include other predictors in the model). The overall model is statistically significant (chi-square = 42.48, p=<.001), which means the model including ‘general ability at age 11’ fits the data statistically significantly better than the model without it, i.e. a model with no predictors. The ‘pseudo R-squared’ gives a very general idea of the proportion of variance accounted for by the model; however it is not a reliable statistic, hence its name ‘pseudo’.
In the table, we can see the coefficient, the standard error, the z statistic, associated p-values and the 95% confidence intervals of the coefficients. ‘General ability at age 11’ is statistically significant (Z=-6.52, p<.001). For every 1 unit decrease in general ability, the log odds of being obese (compared to not being obese) increases by 0.018.
The Learning Hub is a resource for students and educators
tel | +44 (0)20 7331 5102 |
---|---|
closer@ucl.ac.uk |
Sign up for our email newsletters to get the latest from CLOSER
Sign up