Unit 3: Logistic Regression Flashcards
Which plot can be used to check the independence of observations assumption in logistic regression?
Scatterplot of residuals vs. the order of data collection
Sensitivity:
The probability that a test classifies someone as sick given that the person is truly sick
P(T+|D+)
Specificity:
The probability that a test classifies someone as healthy given that the person is truly healthy
P(T-|D-)
Accuracy:
The probability that a test correctly classifies someone
How to calculate:
Add the concordant cells and divide by total.
Area Under the Curve (AUC):
describes the overall predictive ability of
the screening test (a coin-flip has AUC=0.5)
We want AUC to be close to 1.
Shown on the ROC curve; ROC curves are useful for quantitative screening tests
Which cutpoint (i.e., `decision rule’) is the best?
It depends on the purpose of the screening test and the cost of misclassication
Usually you desire a balance between sensitivity and specificity
When do we do logistic regression?
When the outcome is a binary/dichotomous variable.
The appropriate measure for describing a dichotomous (binary) outcome depends on the study design, but generally ODDS RATIO is always appropriate
What are the three equivalent overall tests we can do in logistic regression?
Three asymptotically-equivalent tests:
(1) Likelihood ratio
(2) Score
(3) Wald
Rejecting H0 indicates that the model with all predictors is better than a model with no predictors (i.e., an intercept-only model)
- Similar to Overall F-test in MLR
What is the Type 3 test for an individual predictor?
Type 3 test asks: Is the predictor variable
associated with the outcome, given the association with the other predictors has already been accounted for?
Type 3 Test can accommodate multi-level categorical predictors, in addition to continuous and binary predictors
Hypotheses:
H0 : The predictor is not important (given all other predictors)
H1 : The predictor is important (given all other predictors)
Consider doing Type 3 after rejecting H0 in the Overall test.
Rejecting H0 of Type 3 implies that there is signicant evidence of a linear association between the predictor and the binary response, given all other predictors are already included in the model.
Rejecting H0 of Type 3 Test implies an adjusted odds ratio not equal to 1
*Similar to partial F test in MLR
What is the difference between the estimated model and the predicted model?
The estimated is the logit model.
phat= (logit(pi/1+pi)) = B0 + B1 + B2 +…+Bj
The predicted is the odds model that has been exponentiated.
p=odds=exp(Bj)/1+exp(bj)
What is the Individual coefficient test?
Tests a single Bj predictor
H0 : Bj = 0 (given all other predictors)
H1 : B not equal to 0 (given all other predictors)
Rejecting H0 implies that there is signicant evidence of an association between Xj and Y, given all other predictors are in the model Depending on the problem, we may be interested in testing against other null values (e.g., H0 : Bj = 1) Should not be used for multi-level categorical covariates * Similar to Partial T-test in MLR
What is the large sample assumption of logistic regression?
Hypothesis testing in Logistic Regression is based on large sample theory and asymptotics - large sample sizes are recommended
at least 100 observations need enough observations for each category/group
each Bj ‘costs’ about 10 observations to estimate
Why the odds ratio?
Regardless of the specific study design used to collect the data, it is always appropriate to report an odds ratio
Since we are actually modeling the log(odds) in logistic regression, odds ratios tend to ‘fall out’ naturally.
What are the two types of odds ratios?
Simple odds ratios associated with individual predictors can be obtained by exponentiating the corresponding regression coefficient (e.g., expBj)
Complex odds ratios comparing any two predictor-profiles can be obtained by first determining the appropriate contrast and then exponentiating
OR1v2 = odds1/odds2
What are the assumptions of Logistic Regression?
Linear Relationship: Logit(p) can be modeled as a linear function of the predictors
Large sample with independent observations of equal importance (implied by errors and/or
design)
The predictors are independent of eachother (no multicollinearity)
*no error assumptions b/c there are no errors