Choose the software whose output you would like to interpret.
Background
This page shows an example of logistic regression with footnotes explaining the output. This example is from the Mplus User’s Guide (example 3.5) and we suggest that you see the Mplus User’s Guide for more details about this example. We thank the kind people at Muthén & Muthén for permission to use examples from their manual.
By default, Mplus models the logit of the probability of the latter category of a binary outcome.
Note: While most software packages use this typical parameterization of the logistic regression model:
Mplus uses this parameterization of the model:
The parameter $\tau$ is often referred to as the “threshold” and equals the negative of the intercept $\beta_0$ in the more common parameterization, i.e., $\tau=-\beta_0$. The coefficients for the predictors $\beta_1,…,\beta_p$ will have the same interpretation in the two parameterizations.
This example uses the https://stats.idre.ucla.edu/wp-content/uploads/2016/02/ex3.5.dat data file. We model the binary outcome u1, which has values 0 and 1 so Mplus will be modeling the probability of 1. The predictors are x1 and x3.
Input file
TITLE:
this is an example of a logistic
regression for a categorical observed
dependent variable with two covariates
DATA:
FILE = https://stats.idre.ucla.edu/wp-content/uploads/2016/02/ex3.5.dat;
VARIABLE:
NAMES = u1 x1 x3;
CATEGORICAL = u1;
ANALYSIS:
ESTIMATOR = ML;
! need to use estimator = ml to make this a logistic model;
MODEL:
u1 ON x1 x3;
Annotated Output
Note: Much of the output at the top of the output file has been omitted for space.
MODEL FIT INFORMATION
Number of Free Parameters 3
Loglikelihood
H0 Value -202.620
Information Criteria
Akaike (AIC) 411.240
Bayesian (BIC) 423.884
Sample-Size Adjusted BIC 414.362
(n* = (n + 2) / 24)
MODEL FIT INFORMATION
Number of Free Parameters
- number of parameters estimated in the model, here the intercept and coefficients for x1 and x3
Loglikelihood
- H0 Value: log-likelihood value associated with the model
Information Criteria
- Akaike (AIC): Akaike Information Criterion, a relative measure of model fit, calculated as $AIC=-2logLik + 2p$, where $p$ is the number of free parameters
- Bayesian (BIC): Bayesian Information Criterion, another relative measure of model fit that penalizes model complexity more than AIC, and is calculated as $BIC=-2logLik + log(n)p$, where $n$ is the sample size and $p$ is the number of free parameters
- Sample-size adjusted BIC: similar to BIC, but provides a milder penalty for model complexity and is calculated as $ssaBIC=-2logLik + log(\frac{n+2}{24})p$
MODEL RESULTS
Two-Tailed
Estimate S.E. Est./S.E. P-Value
U1 ON
X1 1.072 0.143 7.502 0.000
X3 1.839 0.179 10.243 0.000
Thresholds
U1$1 1.026 0.137 7.492 0.000
MODEL RESULTS
Estimated model parameters, where the columns are:
- Estimate: parameter estimate
- S.E.: standard error of estimate
- Est/S.E.: test statistic (z-statistic), calculated as estimate divided by standard error
- Two-tailed P-value: p-value assessing null hypothesis that parameter is zero in the population; test-statistic is assumed to follow a standard normal distribution under the null hypothesis
The rows of the parameter estimate table are:
- X1: a one-unit increase in x1 is associated with an increase of 1.072 in the log odds of U1=1, holding x3 constant, and the data provide substantial evidence that this parameter is not zero in the population (p < 0.001)
- X3: a one-unit increase in x3 is associated with an increase of 1.839 in the log odds of U1=1, holding x1 constant, and the data provide substantial evidence that this parameter is not zero in the population (p < 0.001)
- U1$1: in binary logistic regression, the threshold is interpreted as the log odds of the lower category (here U1=0) when all predictors equal 0. The notation U1\$1 signifies that this is the first threshold for U1. For ordinal outcomes with $k$ categories, including binary outcomes, the number of thresholds will be $k-1$, so there is only one threshold for U1. Tests of null hypotheses are generally not of substantive interest for thresholds, so we typically ignore their associated p-values.
QUALITY OF NUMERICAL RESULTS
Condition Number for the Information Matrix 0.314E+00
(ratio of smallest to largest eigenvalue)
QUALITY OF NUMERICAL RESULTS
- Condition Number for the Information Matrix: the condition number is a diangostic that summarizes the numeric stability of the parameter estimation. The condition number ranges from 0 to 1 and is defined as $C=\frac{\lambda_{min}}{\lambda_{max}}$, where $\lambda_{min}$ and $\lambda_{max}$ are the smallest and largest eigenvalues of the information matrix, respectively. Values close to 1 signify stability, while values near 0 signify numerical instability, where small changes in the data can produce large changes in the parameter estimates, often caused by multicollinearity or weak parameter identification. Small condition numbers near 0 do not necessarily indicate that model results are invalid or untrustworthy.
RESULTS IN PROBABILITY SCALE
Estimate
U1
Category 1 0.654
Category 2 0.346
RESULTS IN PROBABILITY SCALE
- Category 1: overall probability of first category of outcome, here U1=0
- Category 2: overall probability of second category of outcome, here U1=1
LOGISTIC REGRESSION ODDS RATIO RESULTS FOR OBSERVED VARIABLES
95% C.I.
Estimate S.E. Lower 2.5% Upper 2.5%
U1 ON
X1 2.921 0.417 2.207 3.864
X3 6.288 1.129 4.423 8.939
LOGISTIC REGRESSION ODDS RATIO RESULTS FOR OBSERVED VARIABLES
Odds ratios are the exponentiated regression coefficients, and the columns are:
- Estimate: Odds ratio estimate, which is the exponentiation of the coefficients in the Model Results section above, e.g. $exp(1.072)=2.921$
- S.E.: standard error of odds ratio
- 95% C.I., Lower 2.5% and Upper 2.5%: lower and upper limits of 95% confidence intervals for the odds ratios, which give ranges of odds ratios that are reasonable consistent with the data. Assuming the logistic regression model is correct, over repeated samples, 95% of these confidence intervals should contain the true parameter value.
The rows of the table are:
- X1: the odds that U1=1 increases by a factor of 2.921 per unit-increase in X1
- X3: the odds that U1=1 increases by a factor of 6.288 per unit-increase in X3
Background
This page explains the output of a logistic regression model run in R using the glm() function.
Logistic regression models the probability of a binary outcome based on one or more predictor variables. We assume that the dependent variable is categorical and binary, meaning it can take only two possible values (e.g., “yes” or “no” where “yes” is represented by 1 and “no” by 0).
Data were collected on 200 high schools students and the dataset contains various academic variables, including those used in the logistic regression:
- honcomp: student’s enrollment in honor’s program (0=not enrolled, 1=enrolled), the binary outcome
- female: student’s sex (0=male, 1=female), a binary predictor
- read: student’s reading score, a continuous predictor
- science: student’s science score, a continuous predictor
A research question we might want to answer with this data: Are female students more likely to be in the honors program than male students after accounting for their similarities in reading and science standardized scores? To answer this question we will model whether a student is in the honors composition category (honcomp) as a function of their reading test score (read), science test score (science), and sex (female).
# Import data into R
d <- read.csv("https://stats.oarc.ucla.edu/wp-content/uploads/2026/11/hsb_logit.csv")
# Inspect the structure of the dataset, restricted to model variables
str(subset(d, select=c(honcomp, female, read, science)))
'data.frame': 200 obs. of 4 variables:
$ honcomp: int 0 0 0 0 0 0 0 0 0 0 ...
$ female : int 0 1 0 0 0 0 0 0 0 0 ...
$ read : int 57 68 44 63 47 44 50 34 63 57 ...
$ science: int 47 63 58 53 53 63 53 39 58 50 ...
Model Code
We use the glm() function with family=binomial, which by default uses link="logit", to perform the logistic regression.
We specify our model where honcomp is the outcome and read, science, and female are the predictors.
# Run logistic regression
m <- glm(honcomp ~ read + science + female, data = d, family = binomial)
# Report model estimates
summary(m)
Call:
glm(formula = honcomp ~ read + science + female, family = binomial,
data = d)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -12.77720 1.97555 -6.468 9.95e-11 ***
read 0.10354 0.02576 4.019 5.86e-05 ***
science 0.09479 0.03045 3.113 0.00185 **
female 1.48250 0.44736 3.314 0.00092 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 231.29 on 199 degrees of freedom
Residual deviance: 160.24 on 196 degrees of freedom
AIC: 168.24
Number of Fisher Scoring iterations: 5
Annotated output
Below, we will interpret logistic regression estimates on the log-odds scale, and then explain how to convert log-odds into odds ratios to help answer the original research question.
##
## Call:
## glm(formula = honcomp ~ read + science + female, family = binomial,
## data = d)
## [...]
Call
The first three lines show the formula that R used to fit the regression model.
## [...]
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -12.77720 1.97555 -6.468 9.95e-11 ***
## read 0.10354 0.02576 4.019 5.86e-05 ***
## science 0.09479 0.03045 3.113 0.00185 **
## female 1.48250 0.44736 3.314 0.00092 ***
## ---
## [...]
Coefficients
The Coefficients table reports the parameter estimates and their associated statistics. The columns are:
- Estimate: parameter estimates on the log-odds scale (or logit scale)
- Std. Error: standard error of the estimate, which quantifies its sampling variability
- z value: test statistic assessing the null hypothesis that the parameter is zero in the population, calculate as estimate divided by its standard error. Under the null hypothesis, this statistic has a standard normal distribution.
- Pr(>|z|): p-value corresponding to test-statistic, interpreted as the probability of observing a test statistic as or more extreme than the observed statistic in repeated samples
To interpret each estimate:
- (Intercept): expected outcome when all variables in the model are evaluated at zero. In this case, the expected log-odds of being enrolled in the honors program for a male student (female=0) who has read=0 and science=0 is -12.77720. Note that 0 for reading and science scores is out of range of plausible test scores. If the test scores were mean-centered, the intercept would have a natural interpretation: the expected log-odds for a male student with average read and science scores
- read: a one point increase in a student’s reading score is expected to raise the log-odds of being enrolled in the honors program by 0.10354, holding all other variables constant.
- science: a one point increase in a student’s standardized science score is expected to raise the log-odds of being enrolled in the honors program by 0.09479, holding all other variables constant.
- female: the log-odds of a female student being enrolled in the honors program are expected to be increased by 1.48250 compared to males, while holding the other variables constant in the model.
## [...]
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## [...]
Signif. codes
The asterisks provide a quick visual shortcut to p-values:
| code | interpretation |
|---|---|
| *** | |
| ** | |
| * | |
| . |
The asterisks indicate that the science estimate is associated with and the read and female estiamtes are associated with .
## [...]
## (Dispersion parameter for binomial family taken to be 1)
## [...]
Dispersion parameter
For true binomial data (where we have more than one binomial trial per row of data), the data can show more variability than expected under the binomial distribution, often called overdispersion. Overdispersion typically emerges when there is unmodeled heterogeneity in the outcome probability. If ignored, overdispersion can lead to biased standard errors. In these cases, it can be useful to estimate an additional dispersion parameter to model the additional variability, which can be done with family=quasibinomial. However, for 0/1 outcomes like we have in this example, overdispersion is not a concern.
## [...]
## Null deviance: 231.29 on 199 degrees of freedom
## Residual deviance: 160.24 on 196 degrees of freedom
## AIC: 168.24
## [...]
Fit statistics
The deviances measure model fit to the data compared to a perfectly fitting model, and AIC provides a measure of relative fit that also penalizes for model complexity.
- Null deviance: a measure of fit for a model that contains only an intercept, i.e., no predictors. The null deviance is calculated by taking 2 times the difference between the log-likelihood of the intercept model and the log-likelihood of the saturated model, a perfectly-fitting model that includes as many parameters as there are observations, i.e., zero degrees of freedom. Generally, the null model will not fit the data well. The degrees of freedom is the number of observations, 200, minus 1, for the intercept parameter.
- Residual deviance: a measure of fit for the fitted model, calculated as 2 times the difference in the log-likelihood of the fitted model and the saturated model that perfectly predicts every outcome. The degrees of freedom is the number of observations, 200, minus the number of estimated parameters , here 4.
- AIC: Akaike information criterion, a relative measure of fit, used to compare fits of competing models. AIC is calculated as -2 times the log likelihood, which measures the fit of the model to the data, plus 2 times the number of estimated parameters , which penalizes the model for more complexity. Models with lower AIC scores are generally preferred.
## [...]
## Number of Fisher Scoring iterations: 5
## [...]
Number of Fisher Scoring Iterations
The glm() function uses the iteratively reweighted least squares algorithm to obtain the maximum likelihood estimates of the parameters, and 5 iterations were required for the model to converge.
Odds ratios
Log-odds estimates can be converted to odds ratios and probabilities. To convert log-odds to odds ratios (OR) we exponentiate the coefficient estimates.
# convert coefficients to odds ratio
exp(coef(m))
(Intercept) read science female
2.824433e-06 1.109086e+00 1.099428e+00 4.403931e+00
We use various interpretations of odds ratios to interpret the exponentiated coefficients below (except the intercept):
- (Intercept): in general, the exponentiated intercept in logistic regression is the odds of the outcome when all predictors equal 0 (i.e., not an odds ratio). Here, the odds for a male student with a zero reading score and zero science score to be in honors program is estimated to be 0.000003, or very unlikely. The value zero for reading and science is out of range of plausible test scores, resulting in these extreme odds. If the test scores were mean-centered, the intercept would have a natural interpretation: the expected odds for a male student with average read and science standardized test scores.
- read: a one point increase in a student’s standardized reading score is expected to raise the odds ratio of being in the honors program by a factor of 1.11, holding all other variables constant.
- science: a one point increase in male student’s standardized science score is expected to raise the log-odds of being in the honors program by 10%, holding all other variables constant.
- female – the odds of a female student being in the honors program are expected to be 4.4 times higher than the odds for males, holding the other variables constant.
Probabilities
Odds can be converted into probabilities using . For example, to calculate the probability of a female student, with an average reading and science scores, being in honors composition category, we first need to calculate the log-odds using the model equation.
# The log-odds of a female student, with an average reading and science scores, being in honors composition category
log_odds <- coef(m)["(Intercept)"] +
coef(m)["read"] * mean(d$read) +
coef(m)["science"] * mean(d$science) +
coef(m)["female"] * 1
log_odds
(Intercept)
-0.9721408
After calculating the log-odds using the model equation, the next step is to convert these log-odds into odds via exponentiation.
# The odds of a female student, with an average reading and science scores, being in honors composition category
odds <- exp(log_odds)
odds
(Intercept)
0.3782724
Finally, we can transform the odds into probability.
# The probability of a female student, with an average reading and science scores, being in honors composition category
p <- odds / (1 + odds)
p
(Intercept)
0.274454
We can also directly convert log-odds to probabilities using this relation:
where is the log odds.
The plogis() function converts log-odds to probabilities.
# probability calculation directly from log odds
exp(log_odds)/(1+exp(log_odds))
(Intercept)
0.274454
# plogis function transforms logits to probabilities
plogis(log_odds)
(Intercept)
0.274454
Background
This page explains the output of a logistic regression model run using SAS’s PROC LOGISTIC command. We focus on the default output so the code used to specify the command is minimal.
The following variables from the hsb2_logit data, which contains academic variables for 200 high school students, are used:
- honcomp: the binary outcome, where honcomp=1 signifies membership to the honors program and honcomp=0 signifies membership to the regular program
- read: student’s reading score, a continuous predictor
- science: student’s science score, another continuous predictor
- ses: student’s socio-economic status, a 3-category variable with values 1=low, 2=middle, 3=high
SAS code
A data step is used to load the data into SAS, which will be named logit.
Then, the model is specified in PROC LOGISTIC. The descending option on the PROC LOGISTIC statement essentially tells SAS to model the probability of the latter category of the outcome, here honcomp=1.
data logit;
set "c:\temp\hsb2_logit";
run;
proc logistic data= logit descending;
model honcomp = female read science;
run;
Annotated Output
| Model Information | |
|---|---|
| Data Set | WORK.LOGIT |
| Response Variable | honcomp |
| Number of Response Levels | 2 |
| Model | binary logit |
| Optimization Technique | Fisher’s scoring |
| Number of Observations Read | 200 |
|---|---|
| Number of Observations Used | 200 |
| Response Profile | ||
|---|---|---|
| Ordered Value |
honcomp | Total Frequency |
| 1 | 1 | 53 |
| 2 | 0 | 147 |
| Probability modeled is honcomp=1. |
Model Information
- Data Set: This the data set used in this procedure.
- Response Variable: This is the response variable in the logistic regression.
- Number of Response Levels: This is the number of levels our response variable has.
- Model: This is the type of regression model that was fit to our data. The term logit and logistic are exchangeable.
- Optimization Technique: This refers to the iterative method of estimating the regression parameters. In SAS, the default is method is Fisher’s scoring method. For further discussion, see Regression Models for Categorical and Limited Dependent Variables by J. Scott Long (page 56).
Number of Observations Read
- Number of Observations Read: number of observations read from the data set
- Number of Observations Used: number of observations used for estimation, which can be less than the number read because observations with missing are typically dropped during estimation
Response Profile
Frequencies of outcome values. Columns are:
- Ordered Value: rank order of value; in
PROC LOGISTIC, SAS models the value of the first ordered value - honcomp: the actual values of outcome honcomp that correspond to the ordered values. Because we used
descendingon thePROC LOGISTICstatement, the higher value of honcomp, 1, becomes the first ordere value. - Total Frequency: number of observations (used) with corresponding value of honcomp
Probability modeled is honcomp=1: This is a note informing which level of the response variable we are modeling.
| Model Convergence Status |
|---|
| Convergence criterion (GCONV=1E-8) satisfied. |
| Model Fit Statistics | ||
|---|---|---|
| Criterion | Intercept Only | Intercept and Covariates |
| AIC | 233.289 | 168.236 |
| SC | 236.587 | 181.430 |
| -2 Log L | 231.289 | 160.236 |
| Testing Global Null Hypothesis: BETA=0 | |||
|---|---|---|---|
| Test | Chi-Square | DF | Pr > ChiSq |
| Likelihood Ratio | 71.0525 | 3 | <.0001 |
| Score | 58.6092 | 3 | <.0001 |
| Wald | 39.8751 | 3 | <.0001 |
Model Convergence Status
Describes whether the maximum-likelihood algorithm has converged or not, and what kind of convergence criterion is used to assess convergence. The default criterion is the relative gradient convergence criterion (GCONV), and the default precision is 10-8.
Model Fit Statistics
Relative fit statistics, with columns:
- Criterion: fit statistic label
- Intercept Only: fit statistic value for model with only an intercept
- Intercept and Covariates: fit statistic for fitted model; if this value is close to the value in the Intercept Only column, the model covariates do not explain much variation in the outcome.
The rows of this table are:
- AIC:This is the Akaike Information Criterion. It is calculated as $AIC = -2LogLik + 2((k-1) + s)$, where $k$ is the number of levels of the dependent variable and $s$ is the number of predictors in the model. AIC is used for the comparison of nonnested models on the same sample. Ultimately, the model with the smallest AIC is considered the best.
- SC: This is the Schwarz Criterion. It is defined as $ SC= – 2LogLik + ((k-1) + s)*log(\sum f_{i})$, where $f_i$’s are the frequency values of the $i$th observation, and $k$ and $s$ were defined previously. Like AIC, SC penalizes for the number of predictors in the model and the smallest SC is most desirable and the value itself is not meaningful.
- -2 Log L: This is negative two times the log-likelihood. The -2 Log L is used in hypothesis tests for nested models and the value in itself is not meaningful.
Testing Global Null Hypothesis: BETA=0
Provides three asymptotically equivalent Chi-Square tests of the null hypothesis that all of the predictors’ regression coefficients are simultaneously equal to zero in the model. Rejection of the null suggests that at least one of the coefficients is different from zero. The difference between the various tests are where on the log-likelihood function they are evaluated. For further discussion, see Categorical Data Analysis, Second Edition, by Alan Agresti (pages 11-13). The columns are:
- Test: name of test
- Chi-square: value of test statistic
- DF: degrees of freedom for null Chi-square distribution, typically equals the number of estimated parameters
- Pr > ChiSq: p-value corresponding to test of null hypothesis that all coefficients are zero; a small p-value suggests that at least one covariate may be important in explaining variation in the outcome
The specific tests are:
- Likelihood Ratio: Likelihood Ratio (LR) Chi-Square test. The LR Chi-Square statistic measures how much the likelihood is improved by adding the predictors to the model and can be calculated by $LR=-2LogLik_{null} – 2LogLik_{fitted} = 231.289-160.236 = 71.05$, where $LogLik_{null}$ is the log-likelihood of model with only and intercept, and $LogLik_{fitted}$ is the log-likelihood fo the fitted model.
- Score: Score Chi-Square Test, which evaluates the slope/curvature of the log-likelihood function with respect to the coefficients under the null hypothesis that the coefficients are zero. A large statistic reflects that the slope is steep and that the log-likelihood is rapidly changing as the coefficient values move away from zero, i.e., that non-zero coefficient values improve the fit of the model to the data.
- Wald: Wald Chi-Square Test, which measures the coefficient values relative to their estimated variability, while accounting for their correlations. A large statistic suggests that data provide evidence that at least one coefficient is non-zero after taking into consideration their variability.
All three tests suggest that at least one parameter related to the predictors is non-zero in the population.
| Analysis of Maximum Likelihood Estimates | |||||
|---|---|---|---|---|---|
| Parameter | DF | Estimate | Standard Error |
Wald Chi-Square |
Pr > ChiSq |
| Intercept | 1 | -12.7772 | 1.9759 | 41.8176 | <.0001 |
| female | 1 | 1.4825 | 0.4474 | 10.9799 | 0.0009 |
| read | 1 | 0.1035 | 0.0258 | 16.1467 | <.0001 |
| science | 1 | 0.0948 | 0.0305 | 9.6883 | 0.0019 |
| Odds Ratio Estimates | |||
|---|---|---|---|
| Effect | Point Estimate | 95% Wald Confidence Limits |
|
| female | 4.404 | 1.832 | 10.584 |
| read | 1.109 | 1.054 | 1.167 |
| science | 1.099 | 1.036 | 1.167 |
Analysis of Maximum Likelihood Estimates
Logistic regression parameter estimates table, where the columns are:
- Parameter: parameter label
- DF: model degrees of freedom used to estimate corresponding parameter(s), and degrees of freedom for null Wald chi-square distribution
- Estimate: estimated parameters in log-odds (logit) units
- Standard Error: standard error of estimate, an estimate of sampling variability of the parameter
- Wald Chi-square: test statistic assessing null hypothesis that the parameter is zero in the population, given the other parameters in the model, and is calculated as the square of the Estimate divided by its Standard Error. Under the null hypothesis, this statistic should be chi-square distributed with 1 degree of freedom.
- Pr > ChiSq: p-value for the Wald Chi-square, which is the probability of observing a Wald-statistic equal or greater than the fitted Wald-statistic in repeated samples. Low p-value suggest rejection of the null hypothesis.
Specific interpretations of the parameter estimates:
- Intercept: Estimated log-odds that honcomp=1 when all variables in the model are evaluated at zero. For males (the variable female evaluated at zero) with zero read and science test scores, the log-odds for high write score is -12.777. Note that evaluating read and science at zero is out of the range of plausible test scores. If the test scores were mean-centered, the intercept would have a natural interpretation: the expected log-odds for high write score for males with an average read and science test score.
- female: The difference in log-odds of honcomp=1 is expected to be 1.4825 units higher for females compared to males, holding the other variables constant in the model..
- read: If a student were to increase read score by one point, the log-odds for honcomp=1 is expected to increase by 0.10 unit, holding the other variables constant.
- science: If a student were to increase science score by one point, the log-odds of honcomp=1 is expected to increase by 0.095 unit, holding the other variables constant in the model..
The data provide evidence that all the coefficients for female, read and science are all non-zero in the population.
Odds Ratio Estimates
Exponentiated coefficients for predictors are interpreted as odds ratios. The columns of this table are:
- Effect: predictor
- Point Estimate: estimated odds ratio, obtained by exponentiating the corresponding Estimate from the Maximum Likelihood Estimates table, e.g., $exp(1.4825) = 4.404$
- 95% Wald Confidence Limits: lower and upper limit of 95% confidence interval for the odds ratio, which gives a range of values of the odds ratio that are reasonably consistent with the data. In repeated samples, assuming the model is correct, we would expect that 95% of such confidence intervals would contain the true population odds ratio. These confidence intervals are obtained by exponentiating the confidence limits of the corresponding log-odds coefficient. Because exponentiation is a non-linear transformation, the 95% confidence interval is not symmetric around the odds ratio.
To interpret specific odds ratios (we use different styles of interpretations for each odds ratio):
- female: females are expected to more than 4 times the odds of honcomp=1 than males, holding read an science constant. Note, however, that the 95% confidence interval suggests that a wide range of odds ratios for the female effect are consistent with the data.
- read: If a student were to increase read score by one point, the odds of honcomp=1 are expected to increase by 10.9% unit, given the other variables in the model are held constant.
- science: If a student were to increase science score by one point, the odds of honcomp=1 are expected to increase by a factor of 1.099, given the other variables in the model are held constant.
| Association of Predicted Probabilities and Observed Responses |
|||
|---|---|---|---|
| Percent Concordant | 85.6 | Somers' D | 0.714 |
| Percent Discordant | 14.2 | Gamma | 0.715 |
| Percent Tied | 0.1 | Tau-a | 0.279 |
| Pairs | 7791 | c | 0.857 |
Association of Predicted Probabilites and Observed Responses
- Percent Concordant: A pair of observations with different observed responses is said to be concordant if the observation with the lower ordered response value (honcomp = 0) has a lower predicted mean score (predicted probability) than the observation with the higher ordered response value (honcomp = 1). A high value near 100 suggests that the model predictions fit the data well. See Pairs for what defines a pair.
- Percent Discordant: If the observation with the lower ordered response value has a higher predicted mean score than the observation with the higher ordered response value, then the pair is discordant.
- Percent Tied: If a pair of observations with different responses is neither concordant nor discordant, it is a tie.
- Pairs: This is the total number of distinct pairs of observations in which one case has an observed outcome different from the other member of the pair (one has honcomp=0, the other honcomp=1). In the Response Profile table in the Model Information section above, we see that there are 53 observations with honcomp=1 and 147 observations with honcomp=0. Thus the total number of pairs with different outcomes is 53*147=7791.
- Somers’ D: Somer’s D is used to determine the strength and direction of relation between pairs of variables. Its values range from -1.0 (all pairs disagree) to 1.0 (all pairs agree). It is defined as $D=\frac{n_c-n_d}{t}$ where $n_c$ is the number of pairs that are concordant, $n_d$ the number of pairs that are discordant, and t is the number of total number of pairs with different responses. In our example, it equals the difference between the percent concordant and the percent discordant divided by 100: (85.6-14.2)/100 = 0.714.
- Gamma: The Goodman-Kruskal Gamma method does not penalize for ties on either variable. Its values range from -1.0 (no association) to 1.0 (perfect association). Because it does not penalize for ties, its value will generally be greater than the values for Somer’s D.
- Tau-a: Kendall’s Tau-a is a modification of Somer’s D that takes into the account the difference between the number of possible paired observations and the number of paired observations with a different response. It is defined to be the ratio of the difference between the number of concordant pairs and the number of discordant pairs to the number of possible pairs, $\frac{2(n_c-n_d)}{(N(N-1)}$. Usually Tau-a is much smaller than Somer’s D since there would be many paired observations with the same response.
- c: c is essentially the percent concordant, but also giving half-credit to tied observations. It is calucated as $c=\frac{n_c + 0.5n_t}{n}$, where $n_c$ is the number of discordant pairs and $n_t$ is the number of tied pairs. Equivalently, $c=\frac{percent\ concordant}{100} + 0.5\frac{percent\ tied}{100}$. The c -statistic is equivalent to the well known measure, area under the ROC curve. c ranges from 0.5 to 1, where 0.5 corresponds to the model randomly predicting the response, and a 1 corresponds to the model perfectly discriminating the response.
Background
This page explains the output of a logistic regression model run using SPSS’s logistic regression command. We focus on the default output so the code used to specify the command is minimal.
The following variables from the hsb2_logit data, which contains academic variables for 200 high school students, are used:
- honcomp: the binary outcome, where honcomp=1 signifies membership to the honors program and honcomp=0 signifies membership to the regular program
- read: student’s reading score, a continuous predictor
- science: student’s science score, another continuous predictor
- ses: student’s socio-economic status, a 3-category variable with values 1=low, 2=middle, 3=high
SPSS Syntax
In the syntax below, we use get file to load the data (change the file path to where you saved the data). Then we use the logistic regression command to model outcome honcomp, predicted by read science and ses. We use the subcommand categorical to specify that ses should be treated as a categorical predictor, which SPSS will convert to a set of indicator variables by default.
get file "c:\data\hsb2_logit.sav".
logistic regression honcomp with read science ses
/categorical ses.
Annotated Output
Logistic Regression
| Unweighted Casesa | N | Percent | |
|---|---|---|---|
| Selected Cases | Included in Analysis | 200 | 100.0 |
| Missing Cases | 0 | .0 | |
| Total | 200 | 100.0 | |
| Unselected Cases | 0 | .0 | |
| Total | 200 | 100.0 | |
| a. If weight is in effect, see classification table for the total number of cases. | |||
| Original Value | Internal Value |
|---|---|
| .00 | 0 |
| 1.00 | 1 |
| Frequency | Parameter coding | |||
|---|---|---|---|---|
| (1) | (2) | |||
| ses | low | 47 | 1.000 | .000 |
| middle | 95 | .000 | 1.000 | |
| high | 58 | .000 | .000 | |
| a. This coding results in indicator coefficients. | ||||
Case Processing Summary
Reports the number and percent of cases that were included and excluded from the analysis. Columns are:
- N: Number of cases (observations)
- Percent: Percent of Total number of observations (after filtering from using the
filtercommand, if applicable).
The rows of this table are interpreted as:
- Selected Cases: this section describes the observations that were potentially included in the model estimation, which by default is all observations in the dataset, but can be reduced with the use of a filter
- Included in Analysis: cases that were actually included in the analysis. Because we have no missing data in our example data set, this also corresponds to the total number of cases.
- Missing Cases: number and percent of missing cases. By default, SPSS
logistic regressionlistwise deletes observations with missing data, i.e., an observation is dropped from the model estimation if it is missing on any model variable. - Total: Sum of cases included in the analysis and the missing cases. In our example, 200 + 0 = 200.
- Unselected cases: number of cases removed by using the
selectsubcommand inlogistic regression. If a filter is instead applied outside of logistic regressionusingfilter, this number will not count those observations. We did not filter out any observations. - Total: Total number of cases, (after filtering from using the
filtercommand, if applicable)
Dependent Variable Encoding
Internally, SPSS encodes the binary outcome with values 0 and 1 (Internal values), and we see the corresponding categories of outcome honcomp, here also 0 and 1 (Original values). By default, SPSS models the probability of the outcome category corresponding to internal value 1.
Categorical Variable Codings
Describes how categorical predictors are encoded and entered into the model as a result of using the categorical subcommand, here for predictor ses. The default encoding, which is used here, is indicator (dummy) coding with the last category as the omitted reference category. The columns are:
- Frequency: number of observations in that cateogry
- Parameter coding: encoding of categories for SPSS internal variables entered into the model. Each indicator (dummy) variable encodes one category as 1 and the remaining categories as 0. For indicator coding, $k-1$ internal variables will be entered into the model, where $k$ is the number of categories. The column headings (1) and (2) are used as labels for these internal indicator variables in later output.
Our categorical predictor ses has 3 categories, and the first indicator variable (1) denotes membership to the first ses category low, while the second indicator variable (2) denotes membership to category middle. The third category high is omitted and will be the reference category.
Block 0: Beginning Block
| Observed | Predicted | ||||
|---|---|---|---|---|---|
| honcomp | Percentage Correct | ||||
| .00 | 1.00 | ||||
| Step 0 | honcomp | .00 | 147 | 0 | 100.0 |
| 1.00 | 53 | 0 | .0 | ||
| Overall Percentage | 73.5 | ||||
| a. Constant is included in the model. | |||||
| b. The cut value is .500 | |||||
| B | S.E. | Wald | df | Sig. | Exp(B) | ||
|---|---|---|---|---|---|---|---|
| Step 0 | Constant | -1.020 | .160 | 40.540 | 1 | <.001 | .361 |
| Score | df | Sig. | |||
|---|---|---|---|---|---|
| Step 0 | Variables | reading score | 47.906 | 1 | <.001 |
| science score | 34.862 | 1 | <.001 | ||
| ses | 14.783 | 2 | <.001 | ||
| ses(1) | .302 | 1 | .582 | ||
| ses(2) | 8.666 | 1 | .003 | ||
| Overall Statistics | 58.644 | 4 | <.001 | ||
Block 0: Beginning Block
Tables in this section describe a model that includes only the intercept and no predictor effects, which is typically not of substantive interest but can serve as a basis for comparison:
With no predictors, the model will predict the same probability of honcomp=1 for all observations, which is the proportion of observed ones.
Classification Table
Assesses the predictive accuracy of the model (here, without any predictors). The model predicts all observations to have prediction $\widehat{honcomp}_i = \frac{exp(-1.02)}{1+exp(-1.02)} = .265$, or a predicted probability that honcomp=1 of .265. Using a cutoff of .5, everyone in the data set is then classified as honcomp=0.
A 2×2 contingency table is formed by Observed honcomp vs Predicted honcomp. All 147 observed honcomp=0 were correctly classified (predicted) as honcomp=0. However, 53 observed honcomp=1 were also all misclassified as honcomp=0. Thus, Percentage Correct is $\frac{147}{200}100\% = 73.5\%$
Variables in the equation
Model parameter estimates, here just the intercept. The columns are:
- B: estimated coefficient
- S.E.: standard error of the coefficient, an estimate of its variability from sample to sample
- Wald: the Wald $\chi^2$ test statistic assessing the null hypothesis that the coefficient is zero in the population. Here, for a single coefficient it is calculated as $Wald = (\frac{B}{S.E})^2$, and under the null hypothesis this statistic should be $\chi^2$-distributed with 1 degree of freedom
- df: degrees of freedom associated with Wald $\chi^2$ null distribution
- Sig: p-value associated with Wald $\chi^2$ test of null hypothesis, an estimate of the probability of observing a $\chi^2$ statistic in repeated samples as more or extreme than the observed $\chi^2$
- Exp(B): exponentiation of the B coefficient, which for the intercept in this model is simply the observed odds of the outcome
In this model, the only estimated parameter is the intercept, labeled Constant, whose B coefficient of -1.02 is interpreted as the log-odds of honcomp=1. A log-odds of 0 corresponds to probability=.5, so we know the overall probability of honcomp=1 is less than .5, which is also expressed by the odds of honcomp=1, Exp(B)=.361, which is less than 1. The Wald test and p-value for the intercept are not usually of interest, but here essentially assess whether $\beta_0=0$ in the population, i.e. whether the overall probability of honcomp=1 is .5.
Variables not in the equation
Score $\chi^2$ test for predictor variables not yet included in the model, assessing improvement of fit in the model by the addition of predictors alone and together as a group. The score test statistic quantifies how rapidly the log-likelihood function, which measures fit to the data, is changing as the coefficients for the predictors move away from zero. Presumably, if a predictor explains substantial variation in the outcome, the log-likelihood will change rapidly to reflect the improvement in fit as the coefficient moves away from zero towards its population value. Conversely, if the predictor has no explanatory power, the log-likelihood is flat and does not change as the coefficient moves away from zero. Under the null hypothesis that the coefficients are zero, the score test statistic is $\chi^2$-distributed with degrees of freedom equal to the number of parameters tested. The columns of this table are:
- Score: Score test statistic value. Note: each score test assesses the contribution of adding the variable on the corresponding row alone, not after accounting for the other predictors.
- df: degrees of freedom for the null $\chi^2$ distribution
- Sig: p-value assessing null hypothesis that coefficients are zero in the population
To interpret the rows of this table:
- reading score and science score: score tests for addition of read alone or science alone to the model, respectively. Both variables seem to explain variation in honcomp by themselves, but it unclear if both will explain variation if they are included in the model together.
- ses: joint score tests for addition of both indicator variables corresponding to ses=low and ses=middle assessing null hypothesis that at least one of the ses coefficients is non-zero in the population. The output suggests we should reject this null.
- ses(1) and ses(2): score tests for addition of indicator corresponding to ses=low alone and ses=middle alone to the model, respectively. The data seem to support rejection of the null for differences in probability of honcomp=1 for middle vs high ses.
- Overall Statistics: joint score test for addition of all predictors to the model, reflecting null hypothesis that at least one of the coefficients is non-zero in the population.
The section contains what is frequently the most interesting part of the output: the overall test of the model (in the “Omnibus Tests of Model Coefficients” table) and the coefficients and odds ratios (in the “Variables in the Equation” table).
Block 1: Method = Enter
| Chi-square | df | Sig. | ||
|---|---|---|---|---|
| Step 1 | Step | 65.588 | 4 | <.001 |
| Block | 65.588 | 4 | <.001 | |
| Model | 65.588 | 4 | <.001 | |
| Step | -2 Log likelihood | Cox & Snell R Square | Nagelkerke R Square |
|---|---|---|---|
| 1 | 165.701a | .280 | .408 |
| a. Estimation terminated at iteration number 6 because parameter estimates changed by less than .001. | |||
| Observed | Predicted | ||||
|---|---|---|---|---|---|
| honcomp | Percentage Correct | ||||
| .00 | 1.00 | ||||
| Step 1 | honcomp | .00 | 132 | 15 | 89.8 |
| 1.00 | 26 | 27 | 50.9 | ||
| Overall Percentage | 79.5 | ||||
| a. The cut value is .500 | |||||
| B | S.E. | Wald | df | Sig. | Exp(B) | ||
|---|---|---|---|---|---|---|---|
| Step 1a | reading score | .098 | .025 | 15.199 | 1 | <.001 | 1.103 |
| science score | .066 | .027 | 5.867 | 1 | .015 | 1.068 | |
| ses | 6.690 | 2 | .035 | ||||
| ses(1) | .058 | .532 | .012 | 1 | .913 | 1.060 | |
| ses(2) | -1.013 | .444 | 5.212 | 1 | .022 | .363 | |
| Constant | -9.561 | 1.662 | 33.112 | 1 | <.001 | .000 | |
| a. Variable(s) entered on step 1: reading score, science score, ses. | |||||||
Block 1: Method=Enter
The logistic regression command, like other SPSS commands, allows predictors to be entered into the model all together or in blocks of variables in sequential steps, and to use stepwise procedures within each block to select predictors. The default, used here, is to enter all predictors at once as a single block. Method=Enter specifies that all predictors in the block are entered into the model, rather than selected by a stepwise procedure. Tables in this section report statistics for the model that includes all of the predictors:
Omnibus Test of Model Coefficients
Likelihood ratio tests of groups of coefficients for the null hypothesis that they are all zero. When we do not use stepwise selection procedure to enter or remove model predictors and enter all predictors at once, all three tests are the same as is the case here. The columns are:
- Chi-square: likelihood ratio statistic, which under the null hypothesis has a $\chi^2$ distribution with degrees of freedom equal to the number of tested parameters. The likelihood ratio statistic is calculated as 2 times the difference in the log-likelihoods of the null model with only an intercept and the fitted model, $\chi^2_{lr} = -2(\ell_{null} – \ell_{fitted})$ .
- df: degrees of freedom of the null $\chi^2$ distribution
- Sig: p-value assessing null hypothesis
The likelihood ratio tests suggests we should reject the null hypothesis that all coefficients related to the predictors are zero. This likelihood ratio test is asymptotically equivalent to the score test for all coefficients reported on the Overall Statistics row of the Variables not in the Equation table above.
Model Summary
Fit statistics for the model with all predictors.
- -2 Log likelihood: -2 times the log likelihood
- Cox & Snell R Square: a pseudo $R^2$ statistic, which is meant to mimic linear regression’s $R^2$, but does not have the same properties, such as an interpretation of proportion of outcome variation explained by the model. It is calculated as $R^2_{CS} = 1-exp\left(\frac{2}{n}(\ell_{null} – \ell_{fitted})\right)$, where $\ell_{null}$ is the log-likelihood of the null model with only an intercept and $\ell_{fitted}$ is the log-likelihood of the fitted model. Although $\ell_{null}$ is not reported in the output, $-2(\ell_{null} – \ell_{fitted})$ is reported as the likelihood ratio statistic in the table immediately above, so $R^2_{CS} = 1-exp\left(\frac{2}{200}(\frac{65.588}{-2})\right) = .28$.
- Nagelkerke R Square: another pseudo $R^2$, calculated as $R^2_{N} = \frac{R^2_{CS}}{1-exp(\frac{2\ell_{null}}{n})} = \frac{.28}{1-exp(\frac{2*(\frac{165.701}{-2}-\frac{65.588}{2})}{200})}=.408$, i.e. as a rescaling of the Cox & Snell $R^2$ that allows it to reach 1, whereas the Cox & Snell $R^2$ generally will not be 1, even with perfect model fit.
Classification Table
Like the Classification Table in the previous section, this table assesses the predictive accuracy of the model, but now with all predictors. Observations with predicted probabilities below .5 are classified as honcomp=0 and those with probabilities above .5 are classified as honcomp=1.
The 2×2 contingency table is formed by Observed honcomp vs Predicted honcomp shows that of the 147 observations with honcomp=0, 132 (89.8%) were correctly classified (predicted) as honcomp=0, and 15 were misclassified as honcomp=1. Of the 53 observations with honcomp=1, 27 (50.9)% were correctly classified as honcomp=1 and 26 were misclassified as honcomp=0. were also all misclassified as honcomp=0. Of all 200 observations, the Percentage Correct is 79.5%, a moderate gain in accuracy over the null model that had 73.5% correct classifications.
Variables in the equation
Parameter estimates and related statistics for model with all predictors. Columns are:
- B: estimated coefficient, which for the predictors, is interpreted as the change in the log-odds of the outcome for a one-unit increase in the predictor, holding other predictors constant
- S.E.: standard error of the coefficient, an estimate of its variability from sample to sample
- Wald: the Wald $\chi^2$ test statistic assessing the null hypothesis that the coefficient is zero, or that several coefficients are jointly zero, in the population. Under the null hypothesis this statistic should be $\chi^2$-distributed with degrees of freedom equal to the number of tested parameters.
- df: degrees of freedom associated with Wald $\chi^2$ null distribution
- Sig: p-value associated with Wald $\chi^2$ test of null hypothesis, an estimate of the probability of observing a $\chi^2$ statistic in repeated samples as more or extreme than the observed $\chi^2$
- Exp(B): exponentiation of the B coefficient, which for predictor coefficients are interpreted as odds ratios. Odds ratios can be interpreted as the expected factor change or percent change in the odds of the outcome for a unit-increase in the predictor.
The interpretation of the parameters:
- reading score: the log-odds of honcomp=1 are expected to increase by .098, or the odds of honcomp=1 are expected to increase by 10.3%, for a unit-increase in read, holding other predictors constant. The data provide good evidence that the coefficient is non-zero, or equivalently that the odds ratio is not one, in the population.
- science score: the log-odds of honcomp=1 are expected to increase by .066, or the odds of honcomp=1 are expected to increase by 6.8%, for a unit-increase in read, holding other predictors constant. The data provide moderate evidence that the coefficient is non-zero, or equivalently that the odds ratio is not one, in the population.
- ses: no coefficients are reported here, but the Wald statistic on this row represents a joint test of the null hypothesis that both of the ses coefficient below are zero, which the data suggest we should reject.
- ses(1): the log-odds of honcomp=1 are expected to be .058 higher, or the odds of honcomp=1 are expected to be 6% higher, for ses=low compared to ses=high, holding other predictors constant.. The data suggest we should not reject the null hypothesis that this coefficient is zero.
- ses(2): the log-odds of honcomp=1 are expected to be -1.013 lower, or the odds of honcomp=1 are expected to be 63.7% lower, for ses=middle compared to ses=high, holding other predictors constant.. The data suggest we should reject the null hypothesis that this coefficient is zero.
- Constant: the intercept is interpreted as the log-odds of honcomp=1 is -9.561, or the odds of honcomp=1 is 0 (essentially), when all predictors in the model are 0. The predictors read and science range from approximately 30 to 70, so 0 is an unrealistically extreme value, resulting in an extreme value for the intercept.
Background
This page explains the output of a logistic regression model run using Stata’s logit command.
The following variables from the hsb2_logit.dta data, which contains academic variables for 200 high school students, are used:
- honcomp: the binary outcome, where honcomp=1 signifies membership to the honors program and honcomp=0 signifies membership to the regular program
- female: student’s sex, a binary predictor (0=male, 1=female)
- read: student’s reading score, a continuous predictor
- science: student’s science score, another continuous predictor
Note: For the outcome variable, Stata assumes 0 is the negative outcome, and any non-zero value as a positive outcome. Stata then models the probability of the positive outcome. It is thus generally safest to use a binary outcome coded (0,1) for logit, in which Stata will model the probability the outcome equals 1.
Stata Code
In the Stata code below, we load the data with use and then run a logistic regression with the logit command, modeling outcome honcomp with predictors female, read, and science. Note that the logit command reports predictor coefficients in the logit (log-odds) metric by default, but can instead report odds ratios with the option or added, which we demonstrate below the default output.
use https://stats.oarc.ucla.edu/wp-content/uploads/2026/11/hsb_logit.dta, clear
logit honcomp female read science
Annotated Output
Iteration Log
Iteration 0: log likelihood = -115.64441
Iteration 1: log likelihood = -84.558481
Iteration 2: log likelihood = -80.491449
Iteration 3: log likelihood = -80.123052
Iteration 4: log likelihood = -80.118181
Iteration 5: log likelihood = -80.11818
The estimated parameters in logistic regression are obtained via maximum likelihood (ML), i.e., by finding the values of the parameters that maximize the likelihood of the data. To find the ML estimates, Stata uses the Newton-Raphson algorithm, a procedure that adjusts the parameter estimates at each iteration using the curvature of the log-likelihood function to guide the adjustments. Stata reports the log-likehood value at each iteration.
The first iteration (called iteration 0) is the log likelihood of the “null” or “empty” model with no predictors. At the next iteration, the predictor(s) are included in the model. At each iteration, the log likelihood increases, reflecting the improvement in fit as the estimates approach the ML values. When the difference between successive iterations is very small, the model is said to have “converged”, the iterating is stopped and the results are displayed.
Model Summary
Logistic regression Number of obs = 200
LR chi2(3) = 71.05
Prob > chi2 = 0.0000
Log likelihood = -80.11818 Pseudo R2 = 0.3072
Stata typically reports overall model summaries and statistics above the paramter estimates:
- Log likelihood: log-likelihood of the final model. The value -80.11818 is generally not directly interpreted but can be used to compare the fit of competing models and is use to calculate many fit statistics.
- Number of obs: number of observations used in the analysis, which may be smaller than the total number of observations in your data set because Stata uses a listwise deletion by default, dropping observations with missing on any model variable.
- LR chi2(3): likelihood ratio (LR) chi-square test value assessing the null hypothesis that all coefficients related to the predictors are all zero. The likelihood chi-square test statistic can be calculated as $\chi^2_{LR} = 2(\ell_{null} – \ell_{fitted})=2(115.64441 – 80.11818) = 71.05$, or two times the difference in the log-likelihood of the null model with only an intercept and the log-likelihood of fitted model. Under the null hypothesis, this statistic has a $\chi^2$ distribution with degrees of freedom equal to the number of estimated parameters, except the intercept. Here, we estimate 3 parameters for the 3 predictors, which is the number reported in the parentheses.
- Prob > chi2: p-value for likelihood ratio test, the probability of obtaining a chi-square statistic as or more extreme than the observed $\chi^2_{LR}$, given that the null hypothesis is true.
- Pseudo R2: McFadden’s pseudo $R^2$, calculated as $R^2_{M} = 1-\frac{\ell_{fitted}}{\ell_{null}} = 1-\frac{-80.11818}{-115.64441} = .3072$. Although meant to mimic linear regression’s $R^2$, pseudo-$R^2$ statistics do not have the same properties, such as the interpretation of outcome variance explained.
Parameter Estimates
------------------------------------------------------------------------------
honcomp | Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
female | 1.482498 .4473993 3.31 0.001 .6056111 2.359384
read | .1035361 .0257662 4.02 0.000 .0530354 .1540369
science | .0947902 .0304537 3.11 0.002 .035102 .1544784
_cons | -12.7772 1.97586 -6.47 0.000 -16.64982 -8.904588
------------------------------------------------------------------------------
The final table reports the maximum likelihood estimates of the parameters for the fitted model. The columns of this table are:
- Coefficient: estimated parameters in log-odds (logit) units
- Std. Err.: standard error of coefficient, an estimate of its sampling variability
- z: test statistic assessing null hypothesis that the parameter is zero in the population, given the other parameters in the model, and is calculated as Coefficient divided by Std. Err. Under the null hypothesis, this statistic should have a standard normal distribution with mean 0 and standard deviation 1.
- P>|z|: p-value for the z-statistic, which is the probability of observing a Wald z-statistic as or more extreme than the fitted z-statistic in repeated samples. Low p-value suggest rejection of the null hypothesis.
- [95% conf. interval]: lower an upper limits of the 95% confidence interval for the parameter, which gives a range of parameter values consistent with the data. Assuming the model is correct, the true parameter value should lie within 95% of such intervals across repeated samples.
Specific interpretations of the parameter estimates:
- female: The difference in log-odds of honcomp=1 is expected to be 1.483 units higher for females compared to males, holding the other variables constant.
- read: If a student were to increase read score by one point, the log-odds for honcomp=1 is expected to increase by 0.104 units, holding the other variables constant.
- science: If a student were to increase science score by one point, the log-odds of honcomp=1 is expected to increase by 0.095 units, holding the other variables constant.
- _cons: the intercept, or estimated log-odds that honcomp=1 when all variables in the model are evaluated at zero. For males (the variable female evaluated at zero) with zero read and science test scores, the log-odds for high write score is -12.777. Note that evaluating read and science at zero is out of the range of plausible test scores. If the test scores were mean-centered, the intercept would have a natural interpretation: the expected log-odds for high write score for males with an average read and science test score.
The data provide reasonable evidence that the three coefficients for female, read, and science are non-zero in the population, as all p-values are less than 0.01.
Annotated Output With Odds Ratios
Below we interpret the output of logit for the same model, except the coefficients are exponentiated and interpreted in the odds metric rather than in logits (log-odds).
First, we re-run the logit command and add the option or.
logit honcomp female read science, or
The Iteration Log and Model Summary is the same as before, so we only report the transformed parameter estimates:
------------------------------------------------------------------------------
honcomp | Odds ratio Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
female | 4.403931 1.970316 3.31 0.001 1.832372 10.58443
read | 1.109086 .0285769 4.02 0.000 1.054467 1.166534
science | 1.099428 .0334817 3.11 0.002 1.035725 1.167049
_cons | 2.82e-06 5.58e-06 -6.47 0.000 5.88e-08 .0001358
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
The columns of this table are:
- Odds ratio: exponentiated parameters, for example $exp(1.4825)=4.4039$, which are interpreted as odds ratios, except for the exponentiated intercept (see _cons below)
- Std. Err.: standard error of the odds ratio, an estimate of its sampling variability
- z: test statistic assessing null hypothesis that the parameter is zero in the population, given the other parameters in the model. The same z-statistic is reported for the odds ratio as for the logit coefficient above.
- P>|z|: p-value for the z-statistic, which are the same as those in the table above with the logit coefficients.
- [95% conf. interval]: lower an upper limits of the 95% confidence interval for the odd ratio, which gives a range of odds ratio values consistent with the data. These confidence intervals are obtained by exponentiating the limits of the confidence interval for the logit coefficients. Because exponentiation is a non-linear transformation, the 95% confidence interval is not symmetric about the odds ratio.
Specific interpretations of the parameter estimates:
- female: The difference in log-odds of honcomp=1 is expected to be 1.483 units higher for females compared to males, holding the other variables constant.
- read: If a student were to increase read score by one point, the log-odds for honcomp=1 is expected to increase by 0.104 units, holding the other variables constant.
- science: If a student were to increase science score by one point, the log-odds of honcomp=1 is expected to increase by 0.095 units, holding the other variables constant.
- _cons: the intercept, or estimated log-odds that honcomp=1 when all variables in the model are evaluated at zero. For males (the variable female evaluated at zero) with zero read and science test scores, the log-odds for high write score is -12.777. Note that evaluating read and science at zero is out of the range of plausible test scores. If the test scores were mean-centered, the intercept would have a natural interpretation: the expected log-odds for high write score for males with an average read and science test score.
The data provide reasonable evidence that the three coefficients for female, read, and science are non-zero in the population, as all p-values are less than 0.01.