quiz image

PSYC40005 Lecture 7: Logistic Regression and Loglinear Models

JudiciousNephrite2042 avatar
JudiciousNephrite2042
·
·
Download

Start Quiz

Study Flashcards

26 Questions

What is a characteristic of linear models?

Changes in x produce the same change in y regardless of the value of x

What is an example of a scenario where a linear model might be inappropriate?

Predicting amount of food consumed

What is a characteristic of non-linear models?

Changes in x produce different changes in y depending on the value of x

What is the shape of the non-linear model described in the lecture if changes in y get lower as x increases?

Negatively accelerated

What is the primary reason for using the generalized linear model?

To explore datasets that do not conform to the assumptions of linear regression

Which link function is used for modeling counts or frequencies?

Logarithm link

What is the range of the predictors in logistic regression and what does the logistic function ensure about those predictors

Values from negative infinity to infinity AND the logistic function ensures that the predictors only between 0 and 1

What is the primary advantage of using the logistic function in logistic regression?

It ensures the predicted values are always between 0 and 1

What is the link used as a function of Y in the Genearlised Linear Model for binary variables?

Logistic Link

What is the purpose of the link function in the generalized linear model?

To transform the response variable into a linear scale

What is the main advantage of binary data not having an assumption of normality?

It eliminates the need for data transformation

There is no homoscedasticity for logistic regression (equal variance) because

With binomially distributed data, the variance depends on the probability or frequency. As the probability/frequency approaches 0 or 1 the variances approaches 0

What is the method used to fit the model to the data in binary logistic regression?

Maximum likelihood estimation

What is the distribution of binary outcomes in binary logistic regression?

Bernoulli distribution

What is the assumption about the observations in binary logistic regression?

Independent observations

What is the result of exponentiating the log odds of 0.190?

1.21

What is the relationship between the predictors and the probability in a logistic model?

Non-linear

What is the effect of a one-unit increase in parental education on the log odds of taking algebra 2?

Increase by 0.380

What is the relationship between the odds and the predictors in a logistic model?

Non-linear

What is the purpose of exponentiating log odds?

To get the odds ratio

What is the primary method used to estimate parameters in logistic regression?

Numerical methods

Why is it easier to account for more variance in logistic regression when the mean is close to 0 or 1?

Because the variance is larger at extreme values

What is the basis for calculating R2 in logistic regression?

Likelihood ratios comparing the model to the null model

What adjustment is made to the Cox and Snell R2 by Nagelkerke?

Taking the ratio to its maximum possible value

Why is it not possible to compare the variance explained in logistic regression to that of linear regression?

Because the variance depends on the proportion (mean)

What does it mean to correctly predict values in logistic regression?

To estimate the probability of the response variable

Study Notes

Binary Data and Logistic Regression

  • Binary data come from a binomial or Bernoulli distribution
  • There are no assumptions of normality, linearity, or homoscedasticity (equal variances)
  • The variance of binomially distributed data depends on the probability or frequency
  • Variability is highest for intermediate probabilities and decreases for extreme probabilities (p = 0.02 and 0.99)

Assumptions of Logistic Regression

  • Binary outcomes that are mutually exclusive
  • Independence of observations (as per usual)
  • Independent variables can be continuous or categorical
  • Model is fit to data using maximum likelihood estimation

How Logistic Regression Works

  • Predicted probabilities are calculated from the model for each observation (0 or 1)
  • Likelihood of each observation is calculated according to a Bernoulli distribution
  • The closer the predicted probabilities are to the data, the higher the likelihood

Linear vs Non-Linear Models

  • Linear models: changes in x produce the same change in y regardless of the value of x
  • Non-linear models: changes in x produce changes in y that depend on the value of x
  • Logistic regression is a non-linear model that predicts a binary variable from other variables

Generalized Linear Model

  • A way to explore datasets that do not conform to the assumptions of linear regression
  • The appropriate function/link allows linear techniques to be employed, even if the data are not linear

Logistic Regression Equation

  • Regression equation is substituted into the logistic function
  • Predictors can range from negative infinity to infinity, but the logistic function makes it such that the predictors only predict values between 0 and 1

Interpreting Logistic Regression Results

  • A value of 1 is predicted if the predicted probability is > 0.5, and a value of 0 is predicted if the predicted probability is < 0.5
  • B is the log odds ratio
  • Log odds increase by a certain value for every unit increase in the predictor
  • Odds are exponentially related to the predictors, and probability is linked to the predictors via a logistic function

Model Evaluation

  • Models should be compared using the Cox & Snell/Nagelkerke R2
  • R2 is not calculated based on the correlation or variation accounted for, but rather on likelihood ratios
  • The Cox and Snell (1989) approximation is a ratio of the log likelihood of the data under the model to the log likelihood of the data under the "null model" (no predictors)

This quiz covers the concepts of logistic regression and loglinear models, including linear models and their applications, as discussed in Lecture 7 of PSYC40005.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser