Presentation is loading. Please wait.

Presentation is loading. Please wait.

A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson.

Similar presentations


Presentation on theme: "A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson."— Presentation transcript:

1

2 A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson regression (2) binary data  logistic regression

3 A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson regression (2) binary data  logistic regression

4

5

6

7

8 Output example > summary(xglm) Call: glm(formula = error ~ alc, family = "binomial") Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) ** alc ***

9 The linear model Y ~ b0 + b1*X1 + b2*X2 so this is how we expand this…
do this on the blackboard …. make a list with X1 = gender, and X2 = focus or no focus …and then 0 times, 1 times etc.

10 p(Y) ~ logit-1(b0 + b1*X1 + b2*X2)
The logistic model p(Y) ~ logit-1(b b1*X b2*X2) linear predictor so this is how we expand this… do this on the blackboard …. make a list with X1 = gender, and X2 = focus or no focus …and then 0 times, 1 times etc.

11 Representative values
Probability Odds Log odds (= “logits”) 0.1 0.111 -2.197 0.2 0.25 -1.386 0.3 0.428 -0.847 0.4 0.667 -0.405 0.5 1 0.6 1.5 0.405 0.7 2.33 0.847 0.8 4 1.386 0.9 9 2.197 - So a probability of 80% of an event occurring means that the odds are “4 to 1” for it occurring What happens if the odds are 50 to 50? -> ratio is 1 If the probability of non-occurrence is higher than occurrence, fractions If the probability of occurrence is higher, positive numbers

12 Snijders & Bosker (1999: 212)

13 = inverse logit function
plogis()

14 Estimate Std. Error z value Pr(>|z|) (Intercept) -3. 643 1. 123 -3
Estimate Std. Error z value Pr(>|z|) (Intercept) ** alc *** for probabilities: transform the entire LP with the logistic function for odds: transform individual predictors with exp(x) plogis()

15 General Linear Model Generalized Linear Model

16 = “Generalizing” the General Linear Model to cases that don’t include continuous response variables (in particular categorical ones) = Consists of two things: (1) an error distribution, (2) a link function Generalized Linear Model

17 = “Generalizing” the General Linear Model to cases that don’t include continuous response variables (in particular categorical ones) = Consists of two things: (1) an error distribution, (2) a link function Logistic regression: Binomial distribution Poisson regression: Poisson distribution lm(response ~ predictor) glm(response ~ predictor, family=”binomial”) glm(response ~ predictor, family=”poisson”) Logistic regression: Logit link function Poisson regression: Log link function

18 Simple linear regression & multiple regression
= generalized linear model with normal error structure and identity link function

19


Download ppt "A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson."

Similar presentations


Ads by Google