I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN

Size: px
Start display at page:

Download "I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN"

Transcription

1 for Clustered Edps/Psych/Stat 587 Fall 2010 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN c Board of Trustees, University of Illinois for Clustered Slide 1 of 98

2 Outline In this set of notes: More References Quick Introduction to logistic regression. : Population-Average Model : Subject-specific Model Three Level Models Reading/References: Snijders & Bosker, Chapter 14 Molenberghs, G. & Verbeke, G. (2005). Models for Discrete Longitudinal. Springer. Agresti, A. (2002). Categorical Analysis, Second Edition. NY: Wiley. Agresti, A. (2007). An Introduction to Categorical Analysis, Second edition, NY: Wiley. Concluding Comments Item Response Theory Wrap-up for Clustered Slide 2 of 98

3 More References More References Skrondal, A. & Rabe-Hesketh, S. (2004). Generalized Latent Variable Modeling. NY: Chapman & Hall/CRC. de Boeck, P. & Wilson, M. (editors) (2004). Explanatory Item Response Models. Springer. Molenbergahs, G. & Verbeke, G. (2004). An introduction to (Generalized Non) Linear Mixed Models, Chapter 3, pp In de Boeck, P. & Wilson, M. (Eds.) Explanatory Item Response Models. Springer. Three Level Models Anderson, C.J., Verkuilen, J.V., & Johnson, T. (after my sabbatical). Applied Generalized Linear Mixed Models: Continuous and Discrete. Springer. Concluding Comments Item Response Theory Wrap-up for Clustered Slide 3 of 98

4 Clustered, nested, hierarchial, longitudinal. Respiratory Infection Longitudinal Depression Example Cool Kids LSAT6 The response/outcome variable is dichotomous. Examples: Longitudinal study of patients in treatment for depression: normal or abnormal Responses to items on an exam (correct/incorrect) Admission decisions for graduate programs in different departments. Longitudinal study of respiratory infection in children Whether basketball players make free-throw shots. Whether cool kids are tough kids. others Three Level Models for Clustered Slide 4 of 98 Concluding Comments

5 Respiratory Infection Respiratory Infection Longitudinal Depression Example Cool Kids LSAT6 From Skrondal & Rabe-Hesketh (2004) also analyzed by Zeger & Karim (1991), Diggle et. al (2002), but originally from Sommer et al (1983) Preschool children from Indonesia who were examined up to 6 consecutive quarters for respiratory infection. Predictors/explanatory/covariates: Age in months Xeropthalmia as indicator of chronic vitamin A deficiency (dummy variable) night blindness & dryness of membranes dryness of cornea softening of cornea Cosine of annual cycle (ie., season of year) Sine of annual cycle (ie., season of year). Gender Height (as a percent) Stunted Three Level Models for Clustered Slide 5 of 98 Concluding Comments

6 Longitudinal Depression Example From Agresti (2002) who got it from Koch et al (1977) Respiratory Infection Longitudinal Depression Example Cool Kids LSAT6 Comparison of new drug with a standard drug for treating depression. Classified as N= Normal and A= Abnormal at 1, 2 and 4 weeks. Response at Each of 3 Time Points Diagnosis R x NNN NNA NAN NAA ANN ANA AAN AAA Mild std new Severe std new Three Level Models for Clustered Slide 6 of 98 Concluding Comments

7 Cool Kids Respiratory Infection Longitudinal Depression Example Cool Kids LSAT6 Rodkin, P.C., Farmer, T.W, Pearl, R. & Acker, R.V. (2006). They re cool: social status and peer group for aggressive boys and girls. 15, Clustering: Kids within peer groups within classrooms. Response variable: Whether a kid nominated by peers is classified as a model (ideal) student. Predictors: Nominator s Popularity Gender Race Classroom aggression level Three Level Models for Clustered Slide 7 of 98 Concluding Comments

8 LSAT6 Law School Admissions data: 5 items, N = 1000 Respiratory Infection Longitudinal Depression Example Cool Kids LSAT6 Y 1 Y 2 Y 3 Y 4 Y 5 Freqency Three Level Models for Clustered Slide 8 of 98 Concluding Comments

9 Three Level Models Concluding Comments Item Response Theory The logistic regression model is a generalized linear model with Random component: The response variable is binary. Y i = 1 or 0 (an event occurs or it doesn t). We are interesting in probability that Y i = 1, π(x i ). The distribution of Y i is Binomial. Systematic component: A linear predictor such as α+β 1 x 1i +...+β j x ji The explanatory or predictor variables may be quantitative (continuous), qualitative (discrete), or both (mixed). : The log of the odds that an event occurs, otherwise known as the logit: ( ) π logit(π) = log 1 π The logistic regression ( model is ) π(xi ) logit(π(x i )) = log = α+β 1 x 1i +...+β j x ji 1 π(x i ) Wrap-up for Clustered Slide 9 of 98

10 The The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function We now assume that the number of trials is fixed and we count the number of successes or events that occur. Preliminaries: Bernoulli random variables X is a random variable where X = 1 or 0 The probability that X = 1 is π The probability that X = 0 is (1 π) Such variables are called Bernoulli random variables. for Clustered Slide 10 of 98

11 Bernoulli Random Variable The mean of a Bernoulli random variable is µ x = E(X) = 1π +0(1 π) = π The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function The variance of X is var(x) = σx 2 = E[(X µ X ) 2 ] = (1 π) 2 π +(0 π) 2 (1 π) = π(1 π) for Clustered Slide 11 of 98

12 Bernoulli Variance vs Mean The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function for Clustered Slide 12 of 98

13 Example of Bernoulli Random Variable Suppose that a coin is not fair or is loaded The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function The probability that it lands on heads equals.40 and the probability that it lands on tails equals.60. If this coin is flipped many, many, many times, then we would expect that it would land on heads 40% of the time and tails 60% of the time. We define our Bernoulli random variable as X = 1 if Heads 0 if Tails where π = P(X = 1) =.40 and (1 π) = P(X = 0) =.60. Note: Once you know π, you know the mean and variance of the distribution of X. for Clustered Slide 13 of 98

14 The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function A binomial random variable is the sum of n independent Bernoulli random variables. We will let Y represent a binomial random variable and by definition Y = n i=1 X i The mean of a Binomial random variable is n µ y = E(Y) = E( X i ) i=1 = E(X 1 )+E(X 2 )+...+E(X n ) = = = nπ n {}}{ µ x +µ x +...+µ x n {}}{ π +π +...+π for Clustered Slide 14 of 98

15 Variance of Binomial Random Variable The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function... and the variance of a Binomial random variable is var(y) = σ 2 y = var(x 1 +X X n ) = = n {}}{ var(x)+var(x)+...+var(x) n {}}{ π(1 π)+π(1 π)+...+π(1 π) = nπ(1 π) Note: Once you know π and n, you know the mean and variance of the Binomial distribution. for Clustered Slide 15 of 98

16 Variance vs Mean The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function for Clustered Slide 16 of 98

17 Function Toss the unfair coin with π =.40 coin n = 3 times. Y = number of heads. The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function The tosses are independent of each other. Possible Outcomes Probability of a Sequence Prob(Y) X 1 +X 2 +X 3 = Y P(X 1,X 2,X 3 ) P(Y) = 3 (.4)(.4)(.4) = (.4) 3 (.6) 0 = = 2 (.4)(.4)(.6) = (.4) 2 (.6) 1 = = 2 (.4)(.6)(.4) = (.4) 2 (.6) 1 =.096 3(.096) = = 2 (.6)(.4)(.4) = (.4) 2 (.6) 1 = = 1 (.4)(.6)(.6) = (.4) 1 (.6) 2 = = 1 (.6)(.4)(.6) = (.4) 1 (.6) 2 =.144 3(.144) = = 1 (.6)(.6)(.4) = (.4) 1 (.6) 2 = = 0 (.6)(.6)(.6) = (.4) 0 (.6) 3 = for Clustered Slide 17 of 98

18 Function The Bernoulli Random Variable Bernoulli Variance vs Mean Example of Bernoulli Random Variable Variance of Binomial Random Variable Variance vs Mean Function Function The formula for the probability of a Binomial random variable is ( ) the number of ways that P(Y = a) = P(X = 1) a P(X = 0) (n a) Y = a out of n trials ( ) n = π a (1 π) n a a where ( n a ) = n! a!(n a)! = which is called the binomial coefficient. n(n 1)(n 2)...1 a(a 1)...1((n a)(n a 1)...1) For example, the number of ways that you can get Y = 2 out of 3 tosses is ( ) 3 = 3(2)(1) 2 2(1)(1) = 3 for Clustered Slide 18 of 98

19 The The Linear Predictor. A linear function of the explanatory variables: The The x s could be η i = β 0 +β 1 x 1i +β 2 x 2i +...+β K x Ki Metric (numerical, continuous ) Discrete (dummy or effect codes) Products (Interactions): e.g., x 3i = x 1i x 2i Quadratic, cubic terms, etc: e.g., x 3i = x 2 2i Transformations: e.g., x 3i = log(x 3i ), x 3i = exp(x 3i ) Foreshadowing random effects models: Three Level Models η ij = β 0j +β 1j x 1ij +β 2j x 2ij +...+β Kj x Kij where i is index of level 1 and j is index of level 2. Concluding Comments Item Response Theory Wrap-up for Clustered Slide 19 of 98

20 The : Problem: Probabilities must be between 0 and 1. The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models η i could be between to. Solution: Use (inverse of) cumulative distribution function (cdf s) of a continuous variable to link the linear predictor and the mean of the response variable. cdf s are P(random variable specific value), which are between 0 and 1 Normal probit link Logistic logit link Gumbel (extreme value) Complementary log-log link log[ log(1 π)] for Clustered Slide 20 of 98

21 Some Example cdf s The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models for Clustered Slide 21 of 98

22 Putting All the Components Together log ( ) P(Yi = 1 x i ) P(Y i = 0 x i ) = logit(p(y i = 1 x i )) = β 0 +β 1 x 1i +β 2 x 2i +...+β K x Ki The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models where x i = (x 0i,x 1i,...,x Ki ). or in-terms of probabilities E(Y i x i ) = P(Y i = 1 x i ) = exp[β 0 +β 1 x 1i +β 2 x 2i +...+β K x Ki ] 1+exp[β 0 +β 1 x 1i +β 2 x 2i +...+β K x Ki ] Implicit assumption (for identification): For P(Y i = 0 x i ): β 0 = β 1 =... = β K = 0. for Clustered Slide 22 of 98

23 Interpretation of the Parameters Simple example: The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models P(Y i = 1 x i ) = exp[β 0 +β 1 x i ] 1+exp[β 0 +β 1 x i ] The ratio of the probabilities is the odds (odds of Y i = 1 vs Y = 0) = P(Y i = 1 x i ) P(Y i = 0 x i ) = exp[β 0 +β 1 x i ] For a 1 unit increase in x i the odds equal P(Y i = 1 (x i +1)) P(Y i = 0 (x i +1)) = exp[β 0 +β 1 (x i +1)] The odds ratio for a 1 unit increase in x i equal P(Y i = 1 (x i +1))/P(Y i = 0 (x i +1)) P(Y i = 1 x i )/P(Y i = 0 x i ) = exp[β 0 +β 1 (x i +1)] exp[β 0 +β 1 x i ] = exp(β 1 ) for Clustered Slide 23 of 98

24 Example 1: Respiratory One with a continuous explanatory variable (for now) Response variable The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models Y = whether person has had a respiratory infection P(Y = 1) Binomial with n = 1 Note: models can be fit to data at the level of the individual (i.e., Y i = 1 where n = 1) or to collapsed data (i.e., i index for everyone with same value on explanatory variable, and Y i = y where n = n i ). Systematic component β 0 +β 1 (age) i where age was been centered around 36 (I don t know why). Link logit for Clustered Slide 24 of 98

25 Example 1: The model Our logit model The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models P(Y i = 1 age i ) = exp(β 0 +β 1 (age) i ) 1+exp(β 0 +β 1 (age) i ) We ll ignore the clustering and use MLE to estimate this model, which yields Analysis Of Parameter Estimates Standard 95% Conf. Chi- Pr > Parameter Estimate Error Limits Square ChiSq Intercept <.0001 age <.0001 Interpretation: The odds of an infection equals exp(.0248) = 0.98 times that for a person one year younger. Alternatively: The odds of no infection equals exp(0.0248) = 1/.98 = 1.03 times the odds for a person one year older. for Clustered Slide 25 of 98

26 Probability of Infection The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models for Clustered Slide 26 of 98

27 Probability of NO infection The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models for Clustered Slide 27 of 98

28 Example 2: Longitudinal Depression From Agresti (2002) who got it from Koch et al (1977) Model Normal versus Abnormal at 1, 2 and 4 weeks. Also, whether mild/servere (s = 1 for severe) and standard/new drug (d = 1 for new). The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models for Clustered Slide 28 of 98 Parameter DF Estimate exp ˆβ Std. Error X 2 Pr> χ 2 1 Diagnose <.0001 Drug Time <.0001 Drug*Time <.0001 The odds of normal when diagnosis is severe is 0.27 times the odds when diagnosis is mild (or 1/.27 = 3.72). For new drug, the odds ratio of normal for 1 week later: exp[ ] = exp[1.4002] = 4.22 For the standard drug, the odds ratio of normal for 1 week later: exp[0.4824] = 1.62 What does exp( ) exp(0.4824) exp(1.0174) equal?

29 SAS and fitting Logit models The : Some Example cdf s Putting All the Components Together Interpretation of the Parameters Example 1: Respiratory Example 1: The model Probability of Infection Probability of NO infection Example 2: Longitudinal Depression SAS and fitting Logit models proc genmod descending; model outcome = diagnose treat time treat*time / dist=bin link=logit type3 obstats; output out=fitted pred=fitvalues StdResChi=haberman; title MLE ignoring repeated aspect of the data ; Or proc genmod descending; class diagnose(ref=first) treat(ref=first); * model outcome = diagnose treat time treat*time / dist=bin link=logit type3 obstats; output out=fitted pred=fitvalues StdResChi=haberman; title MLE ignoring repeated aspect of the data ; Or proc logistic descending; model outcome = diagnose treat time treat*time / lackfit influence; title MLE ignoring repeated aspect of the data ; Can also use the class statement in proc logistic for Clustered Slide 29 of 98

30 Three Level Models to deal with Clustering Population-averaged to deal with Clustering Demonstration via Simulation Simulation: Parameter Estimates Simulation: Fitted Values Conditional vs Marginal Models Explanation of Difference P(Y ij = 1 x ij ) = exp(β 0 +β 1 x 1ij +...+β K x Kij ) 1+exp(β 0 +β 1 x 1ij +...+β K x Kij ) Clustering a nuisance. Use generalized estimating equations (GEEs). Only estimate the first 2 moments. Random Effects: subject-specific P(Y ij = 1 x ij,u j ) = exp(β 0j +β 1j x 1ij +...+β Kj x Kij ) 1+exp(β 0j +β 1j x 1ij +...+β Kj x Kij ) The level 2 model, we specify models for the β kj s. The implied marginal of this random effects model when there is only a random intercept yields exp(γ 00 +γ 10x 1ij +...+γ K0x Kij +U 0 ) P(Y ij = 1 x ij ) = U 0 1+exp(γ 00 +γ 10 x 1ij +...+γ K0 x Kij +U 0 ) f(u 0)dU 0 for Clustered Slide 30 of 98

31 Three Level Models Demonstration via Simulation The following random model was simulated: to deal with Clustering Demonstration via Simulation Simulation: Parameter Estimates Simulation: Fitted Values Conditional vs Marginal Models Explanation of Difference P(Y ij = 1 x ij ) = exp( x ij +U 0j ) 1+exp( x ij +U 0j ) x ij = x i +ǫ ij where x i N(0,4) and ǫ ij N(0,.01). U O N(0,4). x i, ǫ ij and U 0j all independent. Number of macro units j = 1,...,50. Number of replications (micro units) i = 1,...,4. The logit models were fit by MLE ignoring clustering (PROC GENMOD). GEE using exchangable correlation matrix (PROC GENMOD) MLE of random effects model (PROC NLMIXED) for Clustered Slide 31 of 98

32 Three Level Models Simulation: Parameter Estimates to deal with Clustering Demonstration via Simulation Simulation: Parameter Estimates Simulation: Fitted Values Conditional vs Marginal Models Explanation of Difference MLE Ignoring GEE MLE Random clustering (exchangeable) Effects Std Std Std Parameter Estimate Error Estimate Error Estimate Error Intercept x From GEE: correlation =.42 From Random effects : ˆτ 2 o = (s.e. =.6018) and ˆτ 2 o = What do you notice? for Clustered Slide 32 of 98

33 Three Level Models Simulation: Fitted Values to deal with Clustering Demonstration via Simulation Simulation: Parameter Estimates Simulation: Fitted Values Conditional vs Marginal Models Explanation of Difference for Clustered Slide 33 of 98

34 Three Level Models Conditional vs s to deal with Clustering Demonstration via Simulation Simulation: Parameter Estimates Simulation: Fitted Values Conditional vs Marginal Models Explanation of Difference for Clustered Slide 34 of 98

35 Three Level Models Explanation of Difference or Why the marginal model (GEE) has weaker effects than the random effects model: to deal with Clustering Demonstration via Simulation Simulation: Parameter Estimates Simulation: Fitted Values Conditional vs Marginal Models Explanation of Difference The subject- (or cluster-) specific or conditional curves P(Y ij = 1 x ij,u 0j ) exhibit quite a bit of variability (& dependency within cluster). For a fixed x, there is considerable variability in the probability, P(Y ij = 1 U 0j ). For example, consider x = 0, the fitted probabilities range from about.3 to almost 1.0. The average of the P(Y ij = 1) averaged over j has a less steep slope, weaker effect. The greater the variability between the cluster specific curves (i.e. the large τ 0 and larger correlation within cluster), the greater the difference. for Clustered Slide 35 of 98

36 The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s Have repeated measures data or nested data correlated observations. Use Generalized Estimating Equations (GEE) method (some cases MLE possible) In GLM, we assumed binomial distribution for binary data, which determines the relationship between the mean E(Y) and the variance var(y) of the response variable. For the GEE part, we need to specify (guess) what the correlational structure is for the observations. working correlation matrix. Independent: no correlation between observations. Exchangeable: correlation between pairs of observations are same within clusters (and is the same within all clusters) Autoregressive: for time t and t, correlation between Y t and Y t equals ρ t t Unstructured: correlations between all pairs within clusters can differ for Clustered Slide 36 of 98

37 The Working Correlation Matrix The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s GEE assumes a distribution for each marginal (e.g., P(Y ij = 1) for all j) but does not assume distribution for joint (i.e., P(Y i1,y i2,...,y in )).... there s no multivariate generalizations of discrete data distributions like there is for the normal for continuous. is used to estimate the dependency between observations within a cluster. (the dependency assumed to be the same within all clusters) Choosing a Working Correlation Matrix If available, use information you know. If lack information and n is small, then try unstructured to give you an idea of what might be appropriate. If lack information and n is large, then unstructured might requires (too) many parameters. If you choose wrong, then still get valid standard errors because these are based on data (empirical). If the correlation/dependency is small, all choices will yield very similar results. for Clustered Slide 37 of 98

38 GEE Example: Longitudinal Depression The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s Initial Exchangeable Unstructured Intercept (0.1639) (0.1742) (0.1726) diagnose (0.1464) (0.1460) (0.1450) treat (0.2222) (0.2286) (0.2271) time (0.1148) (0.1199) (0.1190) treat*time (0.1888) (0.1877) (0.1865) Working correlation for exchangeable =.0034 Correlation Matrix for Unstructured: Working Correlation Matrix Col1 Col2 Col3 Row Row Row (Interpretation the same as when we ignored clustering.) for Clustered Slide 38 of 98

39 SAS and GEE proc genmod descending data=depress; class case; model outcome = diagnose treat time treat*time / dist=bin link=logit type3; repeated subject=case / type=exch corrw; title GEE with Exchangeable ; run; The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s Other correlational structures repeated subject=case / type=ar(1) corrw; title GEE with AR(1) ; repeated subject=case / type=unstr corrw; title GEE with Unstructured ; for Clustered Slide 39 of 98

40 GEE Example 2: Respiratory We ll do simple (just time) and then complex (lots of predictors): Exchangeable Working Correlation Correlation Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s Standard 95% Confidence Parameter Estimate Error Limits Z Pr > Z Intercept <.0001 age <.0001 Score Statistics For Type 3 GEE Analysis Chi- Source DF Square Pr > ChiSq age <.0001 Estimated odds ratio = exp(.0243) = 0.96 (or 1/0.96 = 1.02) : Note ignoring correlation, odds ratio = 0.98 or 1/0.98 = for Clustered Slide 40 of 98

41 The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s : Complex Model Exchangeable Working correlation = some model refinement needed... Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates Parameter Estimate exp(beta) std. Error Z Pr > Z Intercept <.01 age <.01 xero xero female female cosine <.01 sine height stunted stunted for Clustered Slide 41 of 98

42 Miscellaneous Comments on s The Working Correlation Matrix GEE Example: Longitudinal Depression SAS and GEE GEE Example 2: Respiratory : Complex Model Miscellaneous Comments on s With GEE There is no likelihood being maximized = no likelihood based tests. (Information criteria statistics: QIC & UQIC) Can do Wald type tests and confidence intervals for parameters. Score tests are also available. There are other ways to model the marginal distribution(s) of discrete variables that depend on the number of observations per group (macro unit). e.g., For matched pairs of binary variables, MacNemars test. Loglinear models of quasi-symmetry and symmetry to test marginal homogeneity in square tables. Transition models. Others. for Clustered Slide 42 of 98

43 GLM but we re going to allow random parameters in the systematic component: η ij = β 0j +β 1j x 1ij +β 2j x 2ij +...+β Kj x Kij Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & where i is index of level 1 and j is index of level 2. Level 1: Model conditional on x ij and U j : P(Y ij = 1 x ij,u j ) = exp[β 0j +β 1j x 1ij +β 2j x 2ij +...+β Kj x Kij ] 1+exp[β 0j +β 1j x 1ij +β 2j x 2ij +...+β Kj x Kij ] where Y is binomial with n = 1 (i.e., Bernoulli). Level 2: Model for intercept and slopes: β 0j β 1j. β Kj where U j N(0,T)i.i.d.. = γ 00 +U 0j = γ U 1j GLIMMIX input for Clustered Slide 43 of 98 Different Estimation Methods:.. = γ K0 +U Kj

44 Putting Levels 1 & 2 Together P(Y ij = 1 x ij,u j ) = exp[γ 00 +γ 1 x 1ij +...+γ K x Kij +U 0j +...+U KJ x KJ ] 1+exp[γ 0 +γ 1 x 1ij +...+γ K x Kij +U 0j +...+U KJ x KJ ] Marginalizing... P(Y ij = 1 x ij ) =... U 0 U K exp(γ 00 +γ 10x 1ij +...U U K x Jij) 1+exp(γ 00 +γ 10 x 1ij...+U U K x Jij ) f(u)du Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & GLIMMIX input for Clustered Slide 44 of 98 Different Estimation Methods:

45 A Simple Level 1: P(Y ij = 1 x ij ) = exp[β 0j +β 1j x 1ij ] 1+exp[β 0j x 1ij ] where Y ij is Binomial (Bernoulli). Level 2: β 0j = γ 00 +U 0j β 1j = γ 01 where U 0j N(0,τ 2 0) i.i.d.. Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & Random effects model for micro unit i and macro unit j: P(Y ij = 1 x ij,u 0j ) = exp[γ 00 +γ 01 x 1ij +U 0j ] 1+exp[γ 00 +γ 01 x 1ij +U 0j ] GLIMMIX input for Clustered Slide 45 of 98 Different Estimation Methods:

46 Example 1: A Simple The respiratory data of children. The NLMIXED Procedure Specifications Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & Set Dependent Variable Distribution for Dependent Variable Random Effects Distribution for Random Effects Subject Variable Optimization Technique Integration Method WORK.RESPIRE resp Binary GLIMMIX input for Clustered Slide 46 of 98 Different Estimation Methods: u Normal id Dual Quasi-Newton Adaptive Gaussian Quadrature

47 Example 1: Dimensions Table Dimensions Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & Observations Used 1200 Observations Not Used 0 Total Observations 1200 Subjects 275 Max Obs Per Subject 6 Parameters 3 Quadrature Points 10 GLIMMIX input for Clustered Slide 47 of 98 Different Estimation Methods:

48 Example 1: Input and Iteration History Parameters lam bage sigma NegLogLike Iteration History Iter Calls NegLogLike Diff MaxGrad Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & E E-8 NOTE: GCONV convergence criterion satisfied. GLIMMIX input for Clustered Slide 48 of 98 Different Estimation Methods:

49 Example 1: Fit Statistics & Parameter Estimates Fit Statistics -2 Log Likelihood AIC (smaller is better) AICC (smaller is better) BIC (smaller is better) Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & Parameter Estimates Standard Parameter Est Error DF t Value Pr > t Gradient gamma < gage < tau < Note: I cut out Alpha, Lower & Upper GLIMMIX input for Clustered Slide 49 of 98 Different Estimation Methods:

50 Example 1: Additional Parameter Estimates Additional Estimates Standard Label Est Error DF Value Pr > t t Var(Uo) odds ratio <.0001 Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & I requested these. Alpha Lower Upper GLIMMIX input for Clustered Slide 50 of 98 Different Estimation Methods:

51 Example 1: Estimated Probabilities Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & GLIMMIX input for Clustered Slide 51 of 98 Different Estimation Methods:

52 Example 1: Estimated Probabilities Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & GLIMMIX input for Clustered Slide 52 of 98 Different Estimation Methods:

53 SAS PROC NLMIXED & GLIMMIX input proc nlmixed data=respire qpoints=10; parms gamma0=-2.3 gage=0.02 tau0= 0.8; eta = gamma0 + gage*age + u; p = exp(eta)/(1 + exp(eta)); model resp binary(p); random u normal(0, tau0*tau0) subject=id out=ebur; estimate Var(Uo) tau0**2; estimate odds ratio exp(gage); title Random Intercept, Simple Model ; run; Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & proc glimmix data=respire method=quad ; class id ; model resp = age / solution link=logit dist=bin; random intercept / subject=id; title Random Intercept, Simple Model ; run; GLIMMIX input for Clustered Slide 53 of 98 Different Estimation Methods:

54 Different Estimation Methods: Different Results Some GLIMMIX Estimation Options MMPL RMPL RSPL Param est s.e. est s.e. est s.e. ˆγ (0.1163) (0.1167) (0.1160) ˆγ (0.0061) (0.0061) (0.0061) ˆτ (0.2775) (0.2810) (0.2292) Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & GLIMMIX NLMIXED LaPlace quad gauss Param est s.e. est s.e. est s.e. ˆγ (0.1844) (0.1723) (0.1723) ˆγ (0.0067) (0.0066) (0.0066) ˆτ (0.3961) (0.3559) (0.3560) What s going on? GLIMMIX input for Clustered Slide 54 of 98 Different Estimation Methods:

55 Estimation of GLIMMs Pseudo-likelihood Turn into linear mixed model problem. pseudo-likelihood Implemented in SAS PROC/GLIMMIX Maximum likelihood LaPlace implemented in HLM6 & GLIMMIX (SAS v9.2) Approximate the integral (numerical integration) Gaussian Quadrature Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & Adaptive quadrature Implemented in SAS v9.2: PROC NLMIXED & GLIMMIX Bayesian: WinBugs, R, SAS v9.2 PROC MCMC (experimental) GLIMMIX input for Clustered Slide 55 of 98 Different Estimation Methods:

56 Comparison of PLE and MLE Putting Levels 1 & 2 Together A Simple Random Intercept Model Example 1: A Simple Example 1: Dimensions Table Example 1: Input and Iteration History Example 1: Fit Statistics & Parameter Estimates Example 1: Additional Parameter Estimates Example 1: Estimated Probabilities Example 1: Estimated Probabilities SAS PROC NLMIXED & Appox. integrand Fits as wider range of models (e.g., 3+ levels, more than random intercept) Estimation approximates the integrand, pseudo-likelihood Parameter estimates are downward biased Estimation can be very poor for small n per macro-unit Faster Easier to use (like PROC MIXED) No LR testings Approx. integral Narrower range of models (only 2 level for QUAD, more with LaPlace) Estimation uses numerical integration (Gaussian or adaptive quadrature) Parameter estimates aren t biased Estimation can be fine for small n Slower Harder to use This is maximum likelihood estimation GLIMMIX input for Clustered Slide 56 of 98 Different Estimation Methods:

57 Cool Kid Example: The empty/null model A good starting point... for the cool kid data, Level 1: ideal ij = y ij Binomial(π ij,n ij ) and ln ( πij ) = η 1 π ij = β 0j ij Level 2: β 0j = γ 00 +u 0j Cool Kid Example: The empty/null model Results and Interpretation and Probability Estimates where u 0j N(0,τ 00 ) i.i.d. Linear Mixed Predictor: ln ( πij 1 π ij ) = γ 00 +u 0j Three Level Models Concluding Comments Useful information from this model: An estimate of the classroom-specific odds (& probability) of choosing an ideal student. Amount of between school variability in the odds (& probability). for Clustered Slide 57 of 98 Item Response Theory

58 Results and Interpretation From adaptive quadrature, ˆγ 00 = (s.e. = ) and ˆτ 00 = (s.e. = ) Cool Kid Example: The empty/null model Results and Interpretation and Probability Estimates Interpretation: Based on our model, the odds that a student in classroom j nominates an ideal student equals exp[γ 00 +u 0j ] For a classroom with u 0j = 0, the estimated odds of nominating an ideal student equals exp[ˆγ 00 ] = exp[ ] =.64. The 95% confidence of classroom-specific odds equals exp[ˆγ (s.e.)],exp[ˆγ (s.e.)] (.63,.65). The 95% of the estimated variability in odds over classrooms equals exp[ˆγ ˆτ 00 ],exp[ˆγ ˆτ 00 ] (0.01,8.93). Three Level Models Concluding Comments What does this imply? for Clustered Slide 58 of 98 Item Response Theory

59 and Probability Estimates ˆγ 00 = (s.e. = ) and ˆτ 00 = (s.e. = ) We can also compute estimated *probabilities using the estimated linear predictor by using the inverse of the logit: π = exp(η) 1+exp(η). For a classroom with u 0j = 0, the probability that a student nominates an ideal student is ˆπ = exp( ) 1+exp( ) =.39 Cool Kid Example: The empty/null model Results and Interpretation and Probability Estimates A 95% confidence interval for this classroom-specific probability is (logit 1 (.63), logit 1 (.65)) (.28,.52) Three Level Models 95% of the classrooms have probabilities ranging from.01 to.90. Concluding Comments for Clustered Slide 59 of 98 Item Response Theory

60 s s Three Level Models For the empty/null random intercept model there are at least two ways to define an interclass correlation. The following definition will extend to residual interclass correlation case: τ 00 ICC = τ 00 +π 2 /3 where π = ICC = /3 =.48 Lots of variability between classrooms. Lots of dependency within classrooms. Concluding Comments Item Response Theory Wrap-up for Clustered Slide 60 of 98

61 Level 1: y ij Bionmial(π ij,n ij ) where logit(π ij ) = η ij = β 0j +β 1j x 1ij Level 2: β 0j = γ 00 +u 0j whereu 0j N(0,τ 00 ) Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation β 1j = γ 10 For interpretation: (π ij u 0j ) 1 (π ij u 0j ) = exp[ ] γ 00 +γ 10 x ij +u 0j The intercept: When x ij = 0, the odds in cluster j equals exp(γ 00 +u 0j ). When x ij = 0, the odds within an average cluster (i.e., u 0j = 0) equals exp(γ 00 ). The slope: The odds ratio within a cluster for a 1 unit change in x ij equals exp(γ 00 )exp(γ 10 (x ij +1))exp(u 0j ) exp(γ 00 )exp(γ 10 x ij )exp(u 0j ) = exp(γ 10 ) for Clustered Slide 61 of 98

62 Example of In the last set of notes, we fit a random intercept model to the cool kid data set with only. The estimated model is π ij 1 π ij = exp [ Popularity ij Gender ij Race ij ] Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation Holding other predictors constant, Popularity: WITHIN A CLUSTER, the odds that a highly popular student nominates an ideal student is exp(0.1080) = 1.11 times the odds for a low popular student. Gender: WITHIN A CLUSTER, the odds that a girl nominates an ideal student is exp(0.6486) = 1.92 times the odds for a boy. Race: WITHIN A CLUSTER, the odds that a white student nominates an ideal student is exp(1.3096) = 3.70 times the odds for a black student. for Clustered Slide 62 of 98

63 Probabilities within a Cluster Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation for Clustered Slide 63 of 98

64 Random Intercept with Predictors Level 1: y ij Bionmial(π ij,n ij ) where π ij 1 π ij = exp [ β 0j +β 1j Popularity ij +β 2j Gender ij +β 3j Race ij ] Level 2: β 0j = γ 00 +γ 01 ClassAggress j +u 0j β 1j = γ 10 Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation β 2j = γ 20 +u 1j β 3j = γ 30 where u 0j N(0,τ 00 ). For interpretation: (π ij u 0j ) = exp [ γ 00 +γ 10 Popularity 1 (π ij u 0j ) ij +γ 20 Gender ij +γ 3 Race ij ] +γ 01 ClassAggress j +u 0j for Clustered Slide 64 of 98

65 Results Covariance Parameter Estimates Standard Cov Parm Subject Estimate Error Intercept CLASSID Solutions for Fixed Effects Standard Effect Estimate Error DF t Value Pr > t Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation Intercept DPOP SEX black class_agg for Clustered Slide 65 of 98

66 Results and Interpretation ˆπ ij 1 ˆπ ij = exp [ Popularity ij Gender ij Race ij ClassAggress j ] Classroom aggression helps to explain the differences between cluster intercepts. Within in class j, for students with the same popularity, gender and race, the odds of a student choosing an ideal student is exp[ (ClassAggress j )+u 0j ] exp[ (ClassAggress k )+u 0k ] = exp[ (ClassAggress j ClassAggress k )+(u 0j u 0k )] Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation times those of a student in class k.... So the systematic differences between classrooms can be in part explained by mean classroom aggression such that the lower classroom aggression, the greater the tendency for ideal students to be nominated as cool. for Clustered Slide 66 of 98

67 Results and Interpretation Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation For students with the same popularity, gender and race, from two different schools where u 0j = u 1j but the schools differ by one unit of classroom aggression, the odds ratio of nominating an ideal student equals exp[ ] =.52. Interpretation of Popularity, Gender and Race are basically the same, but for the sake of completeness, Popularity: Within a classroom and holding other variables constant, the odds that a highly popular student nominates an ideal student is exp(0.0722) = 1.07 times the odds of a low popular student. Gender: Within a classroom and holding other variables constant, the odds that a girl nominates an ideal student is exp(0.6366) = 1.89 times the odds for a boy. Race: Within a classroom and holding other variables constant, the odds that a white student nominates an ideal student is exp(1.0709) = 2.92 times the odds for a black student. for Clustered Slide 67 of 98

68 Residual We can use our estimate of τ 00 to see what this now equals give that we have both Level 1 and Level 2 predictors in the model using where π = ICC = τ 00 τ 00 +π 2 /3 Example of Random Intercept Model Probabilities within a Cluster Random Intercept with Predictors Results Results and Interpretation Results and Interpretation Residual Intraclass Correlation For three random intercept models we have fit so far: Model ˆτ 00 ICC Null/Empty Popularity + Gender + Minority Class Aggression Note: ˆτ 00 doesn t drop too much when add Level 1 variables. What does this imply? for Clustered Slide 68 of 98

69 Level 1: y ij Bionmial(π ij,n ij ) where π ij 1 π ij = exp [ β 0j +β 1j Popularity ij +β 2j Gender ij +β 3j Race ij ] Level 2: β 0j = γ 00 +γ 01 ClassAggress j +u 0j β 1j = γ 10 β 2j = γ 20 +u 2j β 3j = γ 30 Results and Comparisons Some Model Refinements Results and Comparisons Comments on Results To help interpretation: (π ij u 0j ) = exp [ γ 00 +γ 10 Popularity 1 (π ij u 0j ) ij +γ 20 Gender ij +γ 3 Race ij ] +γ 01 ClassAggress j +u 0j +u 2j Gender ij Three Level Models Concluding Comments for Clustered Slide 69 of 98

70 Results and Comparisons Empty Model 2 Model 3 Model 4 Effects Est. s.e. Est. s.e. Est. s.e. Est. s.e. Results and Comparisons Some Model Refinements Results and Comparisons Comments on Results Intercept 0.44 (0.26) 0.31 (0.29) 0.24 (0.28) 0.26 (0.36) Popularity 0.10 (0.21) 0.07 (0.21) 0.10 (0.24) Gender 0.65 (0.21) 0.64 (0.21) 0.48 (0.42) Race 1.30 (0.33) 1.07 (0.33) 1.14 (0.36) ClassAgg 0.64 (0.24) 0.71 (0.27) τ (0.85) 2.31 (0.73) 1.99 (0.64) 3.74 (1.41) τ (1.42) τ 11 gender 4.87 (1.96) # param lnLike AIC BIC Three Level Models Concluding Comments for Clustered Slide 70 of 98

71 Some Model Refinements Popularity is clearly not significant with a t =.10/0.24 = Results and Comparisons Some Model Refinements Results and Comparisons Comments on Results Gender is no longer significant with a t =.48/0.42 = Should we drop gender? Test H o : τ 11 = τ 01 = 0 versus H a : not H o. Use same method as we did for HLM: compute LR and compare to a mixture of chi-square distributions. p-value p-value p-value Model 2lnLike LR χ 2 χ 1 for test Null H a tiny <.01 Drop Popularity from the model but keep random Gender effect. Three Level Models Concluding Comments for Clustered Slide 71 of 98

72 Results and Comparisons Model 2 Model 3 Model 4 Refined Effects Est. s.e. Est. s.e. Est. s.e. Est. s.e. Results and Comparisons Some Model Refinements Results and Comparisons Comments on Results Intercept 0.31 (0.29) 0.24 (0.28) 0.26 (0.36) 0.22 (0.35 ) Popularity 0.10 (0.21) 0.07 (0.21) 0.10 (0.24) Gender 0.65 (0.21) 0.64 (0.21) 0.48 (0.42) 0.48 (0.41) Race 1.30 (0.33) 1.07 (0.33) 1.14 (0.36) 1.14 (0.36) ClassAgg 0.64 (0.24) 0.71 (0.27) 0.69 (0.27) τ (0.73) 1.99 (0.64) 3.74 (1.41) 3.63 (1.35) τ (1.42) 2.73 (1.38) τ 22 gender 4.87 (1.96) 4.76 (1.91) # param lnLike AIC BIC Three Level Models Concluding Comments for Clustered Slide 72 of 98

73 Comments on Results A likelihood ratio test for popularity, compared to a χ 2 1 has p =.67. LR = = 0.18 Fixed parameter estimates and their standard errors are the same. Results and Comparisons Some Model Refinements Results and Comparisons Comments on Results Estimates variance and their standard errors changed a little. Empirical standard errors are very similar to the model based ones reported on the previous slide. Before getting serious about this model, we consider 3 level models because students are nested within peer groups nested within classrooms. Three Level Models Concluding Comments for Clustered Slide 73 of 98

74 Three Level Models Regardless of the type of response variable (e.g., normal, binomial, etc), additional levels of nesting can be included. A very simple example: Level 1 y ijk Binomial(π ijk,n ijk ) and Level 2 logit(π ijk ) = β 0jk β 0jk = γ 00k +u 0jk where u 0jk N(0,τ 00 ) i.i.d.. Level 3: γ 00k = ξ 00 +w 0k where w 0k N(0,ψ) i.i.d and independent of u 0jk. Linear Mixed Predictor: Three Level Models Three Level Models Adding Predictors Three Level Random Intercept Adding Predictors of logit(π ijk ) = ξ 00 }{{} fixed +u 0jk +w 0k }{{} random Intercepts What the Last Model Looks for Clustered Slide 74 of 98 Like

75 Adding Predictors Predictors can be added at every level. Predictors are lower levels can have random coefficients that are modeled a high level. Can have cross-level interactions. Three Level Models Three Level Models Adding Predictors Three Level Random Intercept Adding Predictors of Predictors for the cool kid data: Level 1 Black ijk = 1for black student,0 for white Zpop ijk Zagg ijk = standardized popularity score = standardized aggression score Level 2 Gnom jk = Peer group centrality Gagg jk sex jk = Peer group aggression score = 1 boy group and 0 girl group Level 3 ClassAgg k = Mean class aggression score Majority k = 1more white and 0 more Black Intercepts What the Last Model Looks for Clustered Slide 75 of 98 Like

76 Three Level Random Intercept To show what happens when we enter variable, I ll do this one set at a time. Level 1 y ijk Binomial(π ijk,n ijk ) and Level 2 logit(π ijk ) = β 0jk +β 1jk Zpop ijk +β 2jk Zagg ijk β 0jk = γ 00k +u 0jk β 1jk = γ 10k β 2jk where u 0jk N(0,τ 00 ) i.i.d.. Level 3: γ 00k = γ 20k = ξ 00 +w 0k γ 10k = ξ 10 γ 20k = ξ 20 Three Level Models Three Level Models Adding Predictors Three Level Random Intercept Adding Predictors of where w 0k N(0,ψ) i.i.d and independent of u 0jk. What s the Linear Mixed Predictor? Intercepts What the Last Model Looks for Clustered Slide 76 of 98 Like

Multilevel Logistic Regression

Multilevel Logistic Regression Multilevel Logistic Regression Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline In this set of notes: Data Quick

More information

Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:

Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Marginal models: based on the consequences of dependence on estimating model parameters.

More information

Hierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture!

Hierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture! Hierarchical Generalized Linear Models ERSH 8990 REMS Seminar on HLM Last Lecture! Hierarchical Generalized Linear Models Introduction to generalized models Models for binary outcomes Interpreting parameter

More information

Random Intercept Models

Random Intercept Models Random Intercept Models Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019 Outline A very simple case of a random intercept

More information

Serial Correlation. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology

Serial Correlation. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology Serial Correlation Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 017 Model for Level 1 Residuals There are three sources

More information

STAT 705 Generalized linear mixed models

STAT 705 Generalized linear mixed models STAT 705 Generalized linear mixed models Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 24 Generalized Linear Mixed Models We have considered random

More information

Generalized Linear Models for Non-Normal Data

Generalized Linear Models for Non-Normal Data Generalized Linear Models for Non-Normal Data Today s Class: 3 parts of a generalized model Models for binary outcomes Complications for generalized multivariate or multilevel models SPLH 861: Lecture

More information

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages

More information

Multilevel Methodology

Multilevel Methodology Multilevel Methodology Geert Molenberghs Interuniversity Institute for Biostatistics and statistical Bioinformatics Universiteit Hasselt, Belgium geert.molenberghs@uhasselt.be www.censtat.uhasselt.be Katholieke

More information

Models for Clustered Data

Models for Clustered Data Models for Clustered Data Edps/Psych/Stat 587 Carolyn J Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline Notation NELS88 data Fixed Effects ANOVA

More information

STAT 7030: Categorical Data Analysis

STAT 7030: Categorical Data Analysis STAT 7030: Categorical Data Analysis 5. Logistic Regression Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2012 Peng Zeng (Auburn University) STAT 7030 Lecture Notes Fall 2012

More information

Models for Clustered Data

Models for Clustered Data Models for Clustered Data Edps/Psych/Soc 589 Carolyn J Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019 Outline Notation NELS88 data Fixed Effects ANOVA

More information

Simple logistic regression

Simple logistic regression Simple logistic regression Biometry 755 Spring 2009 Simple logistic regression p. 1/47 Model assumptions 1. The observed data are independent realizations of a binary response variable Y that follows a

More information

Models for binary data

Models for binary data Faculty of Health Sciences Models for binary data Analysis of repeated measurements 2015 Julie Lyng Forman & Lene Theil Skovgaard Department of Biostatistics, University of Copenhagen 1 / 63 Program for

More information

Generalized Models: Part 1

Generalized Models: Part 1 Generalized Models: Part 1 Topics: Introduction to generalized models Introduction to maximum likelihood estimation Models for binary outcomes Models for proportion outcomes Models for categorical outcomes

More information

Sections 4.1, 4.2, 4.3

Sections 4.1, 4.2, 4.3 Sections 4.1, 4.2, 4.3 Timothy Hanson Department of Statistics, University of South Carolina Stat 770: Categorical Data Analysis 1/ 32 Chapter 4: Introduction to Generalized Linear Models Generalized linear

More information

Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only)

Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only) CLDP945 Example 7b page 1 Example 7b: Generalized Models for Ordinal Longitudinal Data using SAS GLIMMIX, STATA MEOLOGIT, and MPLUS (last proportional odds model only) This example comes from real data

More information

Introduction to Generalized Models

Introduction to Generalized Models Introduction to Generalized Models Today s topics: The big picture of generalized models Review of maximum likelihood estimation Models for binary outcomes Models for proportion outcomes Models for categorical

More information

Review. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis

Review. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis Review Timothy Hanson Department of Statistics, University of South Carolina Stat 770: Categorical Data Analysis 1 / 22 Chapter 1: background Nominal, ordinal, interval data. Distributions: Poisson, binomial,

More information

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data Ronald Heck Class Notes: Week 8 1 Class Notes: Week 8 Probit versus Logit Link Functions and Count Data This week we ll take up a couple of issues. The first is working with a probit link function. While

More information

EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7

EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7 Introduction to Generalized Univariate Models: Models for Binary Outcomes EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7 EPSY 905: Intro to Generalized In This Lecture A short review

More information

GEE for Longitudinal Data - Chapter 8

GEE for Longitudinal Data - Chapter 8 GEE for Longitudinal Data - Chapter 8 GEE: generalized estimating equations (Liang & Zeger, 1986; Zeger & Liang, 1986) extension of GLM to longitudinal data analysis using quasi-likelihood estimation method

More information

Lecture 3.1 Basic Logistic LDA

Lecture 3.1 Basic Logistic LDA y Lecture.1 Basic Logistic LDA 0.2.4.6.8 1 Outline Quick Refresher on Ordinary Logistic Regression and Stata Women s employment example Cross-Over Trial LDA Example -100-50 0 50 100 -- Longitudinal Data

More information

Longitudinal Modeling with Logistic Regression

Longitudinal Modeling with Logistic Regression Newsom 1 Longitudinal Modeling with Logistic Regression Longitudinal designs involve repeated measurements of the same individuals over time There are two general classes of analyses that correspond to

More information

ST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses

ST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses ST3241 Categorical Data Analysis I Multicategory Logit Models Logit Models For Nominal Responses 1 Models For Nominal Responses Y is nominal with J categories. Let {π 1,, π J } denote the response probabilities

More information

9 Generalized Linear Models

9 Generalized Linear Models 9 Generalized Linear Models The Generalized Linear Model (GLM) is a model which has been built to include a wide range of different models you already know, e.g. ANOVA and multiple linear regression models

More information

The Multilevel Logit Model for Binary Dependent Variables Marco R. Steenbergen

The Multilevel Logit Model for Binary Dependent Variables Marco R. Steenbergen The Multilevel Logit Model for Binary Dependent Variables Marco R. Steenbergen January 23-24, 2012 Page 1 Part I The Single Level Logit Model: A Review Motivating Example Imagine we are interested in voting

More information

You can specify the response in the form of a single variable or in the form of a ratio of two variables denoted events/trials.

You can specify the response in the form of a single variable or in the form of a ratio of two variables denoted events/trials. The GENMOD Procedure MODEL Statement MODEL response = < effects > < /options > ; MODEL events/trials = < effects > < /options > ; You can specify the response in the form of a single variable or in the

More information

Random Effects. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology. university of illinois at urbana-champaign

Random Effects. Edps/Psych/Stat 587. Carolyn J. Anderson. Fall Department of Educational Psychology. university of illinois at urbana-champaign Random Effects Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S university of illinois at urbana-champaign Fall 2012 Outline Introduction Empirical Bayes inference

More information

Logistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression

Logistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression Logistic Regression Usual linear regression (repetition) y i = b 0 + b 1 x 1i + b 2 x 2i + e i, e i N(0,σ 2 ) or: y i N(b 0 + b 1 x 1i + b 2 x 2i,σ 2 ) Example (DGA, p. 336): E(PEmax) = 47.355 + 1.024

More information

Estimation: Problems & Solutions

Estimation: Problems & Solutions Estimation: Problems & Solutions Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline 1. Introduction: Estimation of

More information

Single-level Models for Binary Responses

Single-level Models for Binary Responses Single-level Models for Binary Responses Distribution of Binary Data y i response for individual i (i = 1,..., n), coded 0 or 1 Denote by r the number in the sample with y = 1 Mean and variance E(y) =

More information

Figure 36: Respiratory infection versus time for the first 49 children.

Figure 36: Respiratory infection versus time for the first 49 children. y BINARY DATA MODELS We devote an entire chapter to binary data since such data are challenging, both in terms of modeling the dependence, and parameter interpretation. We again consider mixed effects

More information

Homework 5: Answer Key. Plausible Model: E(y) = µt. The expected number of arrests arrests equals a constant times the number who attend the game.

Homework 5: Answer Key. Plausible Model: E(y) = µt. The expected number of arrests arrests equals a constant times the number who attend the game. EdPsych/Psych/Soc 589 C.J. Anderson Homework 5: Answer Key 1. Probelm 3.18 (page 96 of Agresti). (a) Y assume Poisson random variable. Plausible Model: E(y) = µt. The expected number of arrests arrests

More information

Linear Regression With Special Variables

Linear Regression With Special Variables Linear Regression With Special Variables Junhui Qian December 21, 2014 Outline Standardized Scores Quadratic Terms Interaction Terms Binary Explanatory Variables Binary Choice Models Standardized Scores:

More information

Ron Heck, Fall Week 8: Introducing Generalized Linear Models: Logistic Regression 1 (Replaces prior revision dated October 20, 2011)

Ron Heck, Fall Week 8: Introducing Generalized Linear Models: Logistic Regression 1 (Replaces prior revision dated October 20, 2011) Ron Heck, Fall 2011 1 EDEP 768E: Seminar in Multilevel Modeling rev. January 3, 2012 (see footnote) Week 8: Introducing Generalized Linear Models: Logistic Regression 1 (Replaces prior revision dated October

More information

Binary Logistic Regression

Binary Logistic Regression The coefficients of the multiple regression model are estimated using sample data with k independent variables Estimated (or predicted) value of Y Estimated intercept Estimated slope coefficients Ŷ = b

More information

Chapter 1. Modeling Basics

Chapter 1. Modeling Basics Chapter 1. Modeling Basics What is a model? Model equation and probability distribution Types of model effects Writing models in matrix form Summary 1 What is a statistical model? A model is a mathematical

More information

COMPLEMENTARY LOG-LOG MODEL

COMPLEMENTARY LOG-LOG MODEL COMPLEMENTARY LOG-LOG MODEL Under the assumption of binary response, there are two alternatives to logit model: probit model and complementary-log-log model. They all follow the same form π ( x) =Φ ( α

More information

36-720: The Rasch Model

36-720: The Rasch Model 36-720: The Rasch Model Brian Junker October 15, 2007 Multivariate Binary Response Data Rasch Model Rasch Marginal Likelihood as a GLMM Rasch Marginal Likelihood as a Log-Linear Model Example For more

More information

Investigating Models with Two or Three Categories

Investigating Models with Two or Three Categories Ronald H. Heck and Lynn N. Tabata 1 Investigating Models with Two or Three Categories For the past few weeks we have been working with discriminant analysis. Let s now see what the same sort of model might

More information

Introducing Generalized Linear Models: Logistic Regression

Introducing Generalized Linear Models: Logistic Regression Ron Heck, Summer 2012 Seminars 1 Multilevel Regression Models and Their Applications Seminar Introducing Generalized Linear Models: Logistic Regression The generalized linear model (GLM) represents and

More information

CHL 5225 H Crossover Trials. CHL 5225 H Crossover Trials

CHL 5225 H Crossover Trials. CHL 5225 H Crossover Trials CHL 55 H Crossover Trials The Two-sequence, Two-Treatment, Two-period Crossover Trial Definition A trial in which patients are randomly allocated to one of two sequences of treatments (either 1 then, or

More information

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F). STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) T In 2 2 tables, statistical independence is equivalent to a population

More information

Generalized linear models

Generalized linear models Generalized linear models Douglas Bates November 01, 2010 Contents 1 Definition 1 2 Links 2 3 Estimating parameters 5 4 Example 6 5 Model building 8 6 Conclusions 8 7 Summary 9 1 Generalized Linear Models

More information

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F). STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) (b) (c) (d) (e) In 2 2 tables, statistical independence is equivalent

More information

,..., θ(2),..., θ(n)

,..., θ(2),..., θ(n) Likelihoods for Multivariate Binary Data Log-Linear Model We have 2 n 1 distinct probabilities, but we wish to consider formulations that allow more parsimonious descriptions as a function of covariates.

More information

Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links

Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links Communications of the Korean Statistical Society 2009, Vol 16, No 4, 697 705 Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links Kwang Mo Jeong a, Hyun Yung Lee 1, a a Department

More information

Mixed Models for Longitudinal Binary Outcomes. Don Hedeker Department of Public Health Sciences University of Chicago.

Mixed Models for Longitudinal Binary Outcomes. Don Hedeker Department of Public Health Sciences University of Chicago. Mixed Models for Longitudinal Binary Outcomes Don Hedeker Department of Public Health Sciences University of Chicago hedeker@uchicago.edu https://hedeker-sites.uchicago.edu/ Hedeker, D. (2005). Generalized

More information

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: )

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: ) NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3

More information

Introduction (Alex Dmitrienko, Lilly) Web-based training program

Introduction (Alex Dmitrienko, Lilly) Web-based training program Web-based training Introduction (Alex Dmitrienko, Lilly) Web-based training program http://www.amstat.org/sections/sbiop/webinarseries.html Four-part web-based training series Geert Verbeke (Katholieke

More information

Chapter 5: Logistic Regression-I

Chapter 5: Logistic Regression-I : Logistic Regression-I Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu] D. Bandyopadhyay

More information

Correlated data. Non-normal outcomes. Reminder on binary data. Non-normal data. Faculty of Health Sciences. Non-normal outcomes

Correlated data. Non-normal outcomes. Reminder on binary data. Non-normal data. Faculty of Health Sciences. Non-normal outcomes Faculty of Health Sciences Non-normal outcomes Correlated data Non-normal outcomes Lene Theil Skovgaard December 5, 2014 Generalized linear models Generalized linear mixed models Population average models

More information

Recent Developments in Multilevel Modeling

Recent Developments in Multilevel Modeling Recent Developments in Multilevel Modeling Roberto G. Gutierrez Director of Statistics StataCorp LP 2007 North American Stata Users Group Meeting, Boston R. Gutierrez (StataCorp) Multilevel Modeling August

More information

STA6938-Logistic Regression Model

STA6938-Logistic Regression Model Dr. Ying Zhang STA6938-Logistic Regression Model Topic 2-Multiple Logistic Regression Model Outlines:. Model Fitting 2. Statistical Inference for Multiple Logistic Regression Model 3. Interpretation of

More information

Longitudinal Data Analysis via Linear Mixed Model

Longitudinal Data Analysis via Linear Mixed Model Longitudinal Data Analysis via Linear Mixed Model Edps/Psych/Stat 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2017 Outline Introduction

More information

Chapter 4: Generalized Linear Models-I

Chapter 4: Generalized Linear Models-I : Generalized Linear Models-I Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu] D. Bandyopadhyay

More information

Linear Regression Models P8111

Linear Regression Models P8111 Linear Regression Models P8111 Lecture 25 Jeff Goldsmith April 26, 2016 1 of 37 Today s Lecture Logistic regression / GLMs Model framework Interpretation Estimation 2 of 37 Linear regression Course started

More information

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3 STA 303 H1S / 1002 HS Winter 2011 Test March 7, 2011 LAST NAME: FIRST NAME: STUDENT NUMBER: ENROLLED IN: (circle one) STA 303 STA 1002 INSTRUCTIONS: Time: 90 minutes Aids allowed: calculator. Some formulae

More information

High-Throughput Sequencing Course

High-Throughput Sequencing Course High-Throughput Sequencing Course DESeq Model for RNA-Seq Biostatistics and Bioinformatics Summer 2017 Outline Review: Standard linear regression model (e.g., to model gene expression as function of an

More information

Estimation: Problems & Solutions

Estimation: Problems & Solutions Estimation: Problems & Solutions Edps/Psych/Soc 587 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Spring 2019 Outline 1. Introduction: Estimation

More information

8 Nominal and Ordinal Logistic Regression

8 Nominal and Ordinal Logistic Regression 8 Nominal and Ordinal Logistic Regression 8.1 Introduction If the response variable is categorical, with more then two categories, then there are two options for generalized linear models. One relies on

More information

Introduction to Generalized Linear Models

Introduction to Generalized Linear Models Introduction to Generalized Linear Models Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2018 Outline Introduction (motivation

More information

Mixed Models for Longitudinal Ordinal and Nominal Outcomes

Mixed Models for Longitudinal Ordinal and Nominal Outcomes Mixed Models for Longitudinal Ordinal and Nominal Outcomes Don Hedeker Department of Public Health Sciences Biological Sciences Division University of Chicago hedeker@uchicago.edu Hedeker, D. (2008). Multilevel

More information

Model Assumptions; Predicting Heterogeneity of Variance

Model Assumptions; Predicting Heterogeneity of Variance Model Assumptions; Predicting Heterogeneity of Variance Today s topics: Model assumptions Normality Constant variance Predicting heterogeneity of variance CLP 945: Lecture 6 1 Checking for Violations of

More information

Applied Generalized Linear Mixed Models: Continuous and Discrete Data

Applied Generalized Linear Mixed Models: Continuous and Discrete Data Carolyn J. Anderson Jay Verkuilen Timothy Johnson Applied Generalized Linear Mixed Models: Continuous and Discrete Data For the Social and Behavioral Sciences February 10, 2010 Springer Contents 1 Introduction...................................................

More information

SAS Syntax and Output for Data Manipulation:

SAS Syntax and Output for Data Manipulation: CLP 944 Example 5 page 1 Practice with Fixed and Random Effects of Time in Modeling Within-Person Change The models for this example come from Hoffman (2015) chapter 5. We will be examining the extent

More information

Generalized Linear. Mixed Models. Methods and Applications. Modern Concepts, Walter W. Stroup. Texts in Statistical Science.

Generalized Linear. Mixed Models. Methods and Applications. Modern Concepts, Walter W. Stroup. Texts in Statistical Science. Texts in Statistical Science Generalized Linear Mixed Models Modern Concepts, Methods and Applications Walter W. Stroup CRC Press Taylor & Francis Croup Boca Raton London New York CRC Press is an imprint

More information

22s:152 Applied Linear Regression. Example: Study on lead levels in children. Ch. 14 (sec. 1) and Ch. 15 (sec. 1 & 4): Logistic Regression

22s:152 Applied Linear Regression. Example: Study on lead levels in children. Ch. 14 (sec. 1) and Ch. 15 (sec. 1 & 4): Logistic Regression 22s:52 Applied Linear Regression Ch. 4 (sec. and Ch. 5 (sec. & 4: Logistic Regression Logistic Regression When the response variable is a binary variable, such as 0 or live or die fail or succeed then

More information

Longitudinal Data Analysis Using SAS Paul D. Allison, Ph.D. Upcoming Seminar: October 13-14, 2017, Boston, Massachusetts

Longitudinal Data Analysis Using SAS Paul D. Allison, Ph.D. Upcoming Seminar: October 13-14, 2017, Boston, Massachusetts Longitudinal Data Analysis Using SAS Paul D. Allison, Ph.D. Upcoming Seminar: October 13-14, 217, Boston, Massachusetts Outline 1. Opportunities and challenges of panel data. a. Data requirements b. Control

More information

Lecture 10: Introduction to Logistic Regression

Lecture 10: Introduction to Logistic Regression Lecture 10: Introduction to Logistic Regression Ani Manichaikul amanicha@jhsph.edu 2 May 2007 Logistic Regression Regression for a response variable that follows a binomial distribution Recall the binomial

More information

Good Confidence Intervals for Categorical Data Analyses. Alan Agresti

Good Confidence Intervals for Categorical Data Analyses. Alan Agresti Good Confidence Intervals for Categorical Data Analyses Alan Agresti Department of Statistics, University of Florida visiting Statistics Department, Harvard University LSHTM, July 22, 2011 p. 1/36 Outline

More information

over Time line for the means). Specifically, & covariances) just a fixed variance instead. PROC MIXED: to 1000 is default) list models with TYPE=VC */

over Time line for the means). Specifically, & covariances) just a fixed variance instead. PROC MIXED: to 1000 is default) list models with TYPE=VC */ CLP 944 Example 4 page 1 Within-Personn Fluctuation in Symptom Severity over Time These data come from a study of weekly fluctuation in psoriasis severity. There was no intervention and no real reason

More information

Classification. Chapter Introduction. 6.2 The Bayes classifier

Classification. Chapter Introduction. 6.2 The Bayes classifier Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode

More information

Spring RMC Professional Development Series January 14, Generalized Linear Mixed Models (GLMMs): Concepts and some Demonstrations

Spring RMC Professional Development Series January 14, Generalized Linear Mixed Models (GLMMs): Concepts and some Demonstrations Spring RMC Professional Development Series January 14, 2016 Generalized Linear Mixed Models (GLMMs): Concepts and some Demonstrations Ann A. O Connell, Ed.D. Professor, Educational Studies (QREM) Director,

More information

Overdispersion Workshop in generalized linear models Uppsala, June 11-12, Outline. Overdispersion

Overdispersion Workshop in generalized linear models Uppsala, June 11-12, Outline. Overdispersion Biostokastikum Overdispersion is not uncommon in practice. In fact, some would maintain that overdispersion is the norm in practice and nominal dispersion the exception McCullagh and Nelder (1989) Overdispersion

More information

Logistic Regression for Ordinal Responses

Logistic Regression for Ordinal Responses Logistic Regression for Ordinal Responses Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2018 Outline Common models for ordinal

More information

3 Way Tables Edpsy/Psych/Soc 589

3 Way Tables Edpsy/Psych/Soc 589 3 Way Tables Edpsy/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S university of illinois at urbana-champaign c Board of Trustees, University of Illinois Spring 2017

More information

Ordinal Variables in 2 way Tables

Ordinal Variables in 2 way Tables Ordinal Variables in 2 way Tables Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2018 C.J. Anderson (Illinois) Ordinal Variables

More information

Testing Independence

Testing Independence Testing Independence Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM 1/50 Testing Independence Previously, we looked at RR = OR = 1

More information

WU Weiterbildung. Linear Mixed Models

WU Weiterbildung. Linear Mixed Models Linear Mixed Effects Models WU Weiterbildung SLIDE 1 Outline 1 Estimation: ML vs. REML 2 Special Models On Two Levels Mixed ANOVA Or Random ANOVA Random Intercept Model Random Coefficients Model Intercept-and-Slopes-as-Outcomes

More information

Lab 11. Multilevel Models. Description of Data

Lab 11. Multilevel Models. Description of Data Lab 11 Multilevel Models Henian Chen, M.D., Ph.D. Description of Data MULTILEVEL.TXT is clustered data for 386 women distributed across 40 groups. ID: 386 women, id from 1 to 386, individual level (level

More information

Chapter 4: Generalized Linear Models-II

Chapter 4: Generalized Linear Models-II : Generalized Linear Models-II Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu] D. Bandyopadhyay

More information

Semiparametric Generalized Linear Models

Semiparametric Generalized Linear Models Semiparametric Generalized Linear Models North American Stata Users Group Meeting Chicago, Illinois Paul Rathouz Department of Health Studies University of Chicago prathouz@uchicago.edu Liping Gao MS Student

More information

Multinomial Logistic Regression Models

Multinomial Logistic Regression Models Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word

More information

UNIVERSITY OF TORONTO Faculty of Arts and Science

UNIVERSITY OF TORONTO Faculty of Arts and Science UNIVERSITY OF TORONTO Faculty of Arts and Science December 2013 Final Examination STA442H1F/2101HF Methods of Applied Statistics Jerry Brunner Duration - 3 hours Aids: Calculator Model(s): Any calculator

More information

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN Introduction Edps/Psych/Stat/ 584 Applied Multivariate Statistics Carolyn J Anderson Department of Educational Psychology I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN c Board of Trustees,

More information

Multiple Logistic Regression for Dichotomous Response Variables

Multiple Logistic Regression for Dichotomous Response Variables Multiple Logistic Regression for Dichotomous Response Variables Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2018 Outline

More information

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3 4 5 6 Full marks

More information

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study

Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study 1.4 0.0-6 7 8 9 10 11 12 13 14 15 16 17 18 19 age Model 1: A simple broken stick model with knot at 14 fit with

More information

36-309/749 Experimental Design for Behavioral and Social Sciences. Dec 1, 2015 Lecture 11: Mixed Models (HLMs)

36-309/749 Experimental Design for Behavioral and Social Sciences. Dec 1, 2015 Lecture 11: Mixed Models (HLMs) 36-309/749 Experimental Design for Behavioral and Social Sciences Dec 1, 2015 Lecture 11: Mixed Models (HLMs) Independent Errors Assumption An error is the deviation of an individual observed outcome (DV)

More information

Model Estimation Example

Model Estimation Example Ronald H. Heck 1 EDEP 606: Multivariate Methods (S2013) April 7, 2013 Model Estimation Example As we have moved through the course this semester, we have encountered the concept of model estimation. Discussions

More information

Introduction to Random Effects of Time and Model Estimation

Introduction to Random Effects of Time and Model Estimation Introduction to Random Effects of Time and Model Estimation Today s Class: The Big Picture Multilevel model notation Fixed vs. random effects of time Random intercept vs. random slope models How MLM =

More information

The GENMOD Procedure. Overview. Getting Started. Syntax. Details. Examples. References. SAS/STAT User's Guide. Book Contents Previous Next

The GENMOD Procedure. Overview. Getting Started. Syntax. Details. Examples. References. SAS/STAT User's Guide. Book Contents Previous Next Book Contents Previous Next SAS/STAT User's Guide Overview Getting Started Syntax Details Examples References Book Contents Previous Next Top http://v8doc.sas.com/sashtml/stat/chap29/index.htm29/10/2004

More information

LISA Short Course Series Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R. Liang (Sally) Shan Nov. 4, 2014

LISA Short Course Series Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R. Liang (Sally) Shan Nov. 4, 2014 LISA Short Course Series Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R Liang (Sally) Shan Nov. 4, 2014 L Laboratory for Interdisciplinary Statistical Analysis LISA helps VT researchers

More information

Basic IRT Concepts, Models, and Assumptions

Basic IRT Concepts, Models, and Assumptions Basic IRT Concepts, Models, and Assumptions Lecture #2 ICPSR Item Response Theory Workshop Lecture #2: 1of 64 Lecture #2 Overview Background of IRT and how it differs from CFA Creating a scale An introduction

More information

Categorical and Zero Inflated Growth Models

Categorical and Zero Inflated Growth Models Categorical and Zero Inflated Growth Models Alan C. Acock* Summer, 2009 *Alan C. Acock, Department of Human Development and Family Sciences, Oregon State University, Corvallis OR 97331 (alan.acock@oregonstate.edu).

More information

CHAPTER 1: BINARY LOGIT MODEL

CHAPTER 1: BINARY LOGIT MODEL CHAPTER 1: BINARY LOGIT MODEL Prof. Alan Wan 1 / 44 Table of contents 1. Introduction 1.1 Dichotomous dependent variables 1.2 Problems with OLS 3.3.1 SAS codes and basic outputs 3.3.2 Wald test for individual

More information

Stat 579: Generalized Linear Models and Extensions

Stat 579: Generalized Linear Models and Extensions Stat 579: Generalized Linear Models and Extensions Linear Mixed Models for Longitudinal Data Yan Lu April, 2018, week 15 1 / 38 Data structure t1 t2 tn i 1st subject y 11 y 12 y 1n1 Experimental 2nd subject

More information

Statistical Distribution Assumptions of General Linear Models

Statistical Distribution Assumptions of General Linear Models Statistical Distribution Assumptions of General Linear Models Applied Multilevel Models for Cross Sectional Data Lecture 4 ICPSR Summer Workshop University of Colorado Boulder Lecture 4: Statistical Distributions

More information