Download presentation
Presentation is loading. Please wait.
Published byMaximillian Mathews Modified over 8 years ago
1
Computing fit information measures for a logistic regression in SPSS AIC, BIC
2
The two general formulas AIC = -2LL + 2(p + 1), –where p = # predictors (or df of predictors when categorical predictors have been dummied) BIC = -2LL + log(n)*(p + 1), –Where n is the sample size Note on both of these: The “+1” is for the intercept. On models where we exclude the intercept, we don’t add that +1. One models where we manually stick in a “one” constant intercept, that takes the place of the intercept, and so we count the “one” in p Summary: For survival models, we usually make the final term in parentheses (p) not (p + 1). You’ll see this in the example that follows
3
Example Let’s use the “first sex” data base to work through an example There is actually a complication What is the n for the BIC computation? –In a person period data set, not every subject is represented at every occasion. Well, we have two options. Option A: If we also have a time-to-event (one line per subject) data set
6
The sample at the start of the study is N=180…so that is our n
7
Option B: If you only have the person-period data set There may be a simpler way, but this is all I could come up with quickly…and it only takes 3 seconds
8
Do a frequency count on the “ID” variable
11
Now, paste the resulting table into Excel
12
Quickly edit out the superfluous rows from the header ….
13
…. And footer…
14
The resulting reduced table will give you the n count The sample at the start of the study is N=180…so that is our n
15
Now, let’s rerun that first-sex analysis, using “parental transition” as our time invariant predictor
18
Note we turned off the intercept. That has implications for “p” on the next slide.
19
-2LL P, # predictors = 7, with no +1 for intercept, since we turned it off
20
Calculating AIC = -2LL + 2(p + 1), –where p = # predictors (or df of predictors when categorical predictors have been dummied); where there is no intercept, formula is -2LL + 2(p) BIC = -2LL + log(n)*(p + 1), –Where n is the sample size; where there is no intercept, formula is -2LL + log(n) *(p) The sample at the start of the study is N=180…so that is our n P, # predictors = 7, with no +1 for intercept, since we turned it off AIC = -2LL + 2(p) = 634.662 + 2(7) = 634.662 + 14 = 648.662 BIC = -2LL + log(n)*(p), = 634.662 + log(180)*(7) = 634.662 + 2.255*7 = 634.662 + 15.787 = 664.449
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.