1 / 89

Mixed Models

Mixed Models. Simon Sheather Michael Speed TAMU. Part 1. Choosing the Mean Structure Fixed Effects. Learning Outcomes – Part 1. The participant will learn: How to determine what is being tested by the Type I, II , III sums of squares How to use the Estimable Functions in SAS

niveditha
Download Presentation

Mixed Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mixed Models Simon Sheather Michael Speed TAMU

  2. Part 1 Choosing the Mean Structure Fixed Effects

  3. Learning Outcomes – Part 1 • The participant will learn: • How to determine what is being tested by the Type I, II , III sums of squares • How to use the Estimable Functions in SAS • Which non-estimable functions are used in SAS and their implications • Why testing for “Main” Effects in the presence of interaction may be useful • How missing data will affect what is being tested • Why “gain” scores may cause a problem • What is being tested in ANCOVA

  4. Who Uses? • Proc GLM • Proc Mixed • Enterprise Guide

  5. Linear Model where Y denotes the vector of observed yi's, X is the known matrix of xij's, beta is the unknown fixed-effects parameter vector, and the error is the unobserved vector of independent and identically distributed Gaussian random errors.

  6. Mixed Model Formulation of the Mixed Model The previous general linear model is certainly a useful one (Searle 1971), and it is the one fitted by the GLM procedure. However, many times the distributional assumption about is too restrictive. The mixed model extends the general linear model by allowing a more flexible specification of the covariance matrix of . In other words, it allows for both correlation and heterogeneous variances, although you still assume normality. The mixed model is written as where everything is the same as in the general linear model except for the addition of the known design matrix, Z, and the vector of unknown random-effects parameters, . The matrix Z can contain either continuous or dummy variables, just like X. The name mixed model comes from the fact that the model contains both fixed-effects parameters, , and random-effects parameters, . Refer to Henderson (1990) and Searle, Casella, and McCulloch (1992) for historical developments of the mixed model.

  7. Random and Error Terms • A key assumption in the foregoing analysis is that and are normally distributed with

  8. V Matrix The variance of Y is, therefore, V = ZGZ' + R. You can model V by setting up the random-effects design matrix Z and by specifying covariance structures for G and R

  9. Example Covariance Matrices

  10. More

  11. More And Many More

  12. Endpoints • Continuous Endpoints :Y is continuous • Discrete or Categorical Endpoints • We will consider only continuous endpoints

  13. Fixed Effects • Let us examine the Fixed Effects in the simple case of no random effects and the errors are normal i.i.d. • Continuous Endpoints • Discussion of “Analysis of Clinical Trials Using SAS” Dmitrienko et al

  14. The Population Parameter Model

  15. Example • The example is a clinical trial comparing an experimental drug (D) with a placebo (P) in patients with a major depressive disorder. • The primary efficacy measure was the change from baseline to the end of the 9-week acute treatment phase in the 17-item Hamilton depression rating scale (HAMID17). • Patient randomization was stratified by center (5 centers).

  16. Population Means Layout

  17. Hypothesis Testing – TYPE III • Main Effect Drug • Main Effect Center • No Interaction

  18. Data – 1st 26 cases

  19. SAS Code – Mixed & GLM PROC MIXED DATA = WORK.SORTTempTableSorted METHOD=REML; CLASS drug center ; MODEL change= drug center drug*center /HTYPE=3; RUN; PROC GLM DATA=WORK.SORTTempTableSorted ; CLASS drug center; MODEL change= center drug drug*center / INTERCEPT SS1 SS2 SS3 SS4 SOLUTION E1 E2 E3 E4 ZETA=1E-08 SINGULAR=1E-07 ; RUN;

  20. Output – GLM & Mixed GLM Mixed

  21. Graph

  22. Point #1 • GLM & Mixed give same results for fixed effects with errors i.i.d. normal with mean 0 and constant variance

  23. Confusion on Type I, II, III & IV Sums of Squares • Hypotheses Testing is about Population Parameters • Hypotheses Testing is about Population Parameters

  24. Jargon • I am testing “R(a|u), which represents the additional reduction due to fitting the treatment effect after fitting the mean and helps assess the amount of variability explained by the treatment accounting for the mean.” • Wonderful, now tell me what hypotheses you are testing in terms of the population parameters. • What is Ho??

  25. Other Jargon • I am “doing an unadjusted analysis.” • I am “doing an adjusted analysis.” • “I am testing hypotheses about the population parameters and here they are.”

  26. Sums of Squares

  27. Continued

  28. Change the Order What is being tested by “center” “drug” “drug*center” in terms of the population parameters?

  29. Point #2 • Different hypotheses are being tested by Type I, II and III sums of squares when the population sample are unequal.

  30. Over-parameterized Model

  31. Non-Estimable Conditions

  32. Estimable Functions Can Help PROC GLM DATA=WORK.SORTTempTableSorted ; CLASS drug center; MODEL change= center drug drug*center / INTERCEPT SS1 SS2 SS3 SS4 SOLUTION E1 E2 E3 E4 ZETA=1E-08 SINGULAR=1E-07 ;

  33. E3 – Type III Alias 1 4 1 4

  34. We Only Need drug*center Interaction Center Int Drug Intercept is testing: Why ? Let L1 =1

  35. We Only Need drug*center Center Center is testing: Why ? Let L2 = 1;L3=L4 = L5=0 Let L3 = 1; L2=L4=L5=0 Let L4 =1; L2=L3=L5 = 0 Let L5 = 1; L2=L3= L4=0

  36. We Only Need drug*center Drug Drug is testing: Why ? Let L7 =1

  37. We Only Need drug*center Interaction Drug*center is testing: Why ? Let L9=1; L10=L11=L12=0 Let L10 = 1 ; L9 = L11 = L12 = 0 Let L11 = 0 ; L9 = L10 = L12 = 0 Let L12 =0; L9 = L10 = L11 =0

  38. Proc Mixed – Estimable FunctionsType 3 – NO L’s Interaction Center Drug

  39. Type 1 Tests for Drug

  40. Coefficients – Function of Sample Size Recall: The subjects were assigned to the Centers at random.

  41. Point #3 • The hypotheses being tested by the Type I and II sums of squares are a function of the number of time a population is sampled. • In general, not a good idea to use Type I or III. • Type III is useful if all populations are sampled at least once.

  42. Testing “Main” Effects in thePresence of Interaction • May we (can we) test for “main” effects in the presence of interaction? i.e. We reject the hypothesis of no interaction. • Sure – it is a valid test. • Should we do the test? Well, it depends.

  43. Need Input from Researcher • Does makes sense? • Is there a difference between the new drug and the placebo when you averaged over the centers?

  44. Point #4 • Testing “Main” Effects in the presence of interaction may be correct if the test makes sense to the researcher. • “Main Effect for Drug” is not unique. The hypothesis depends on the type of sum of squares used.

  45. Effect of Missing Populations Suppose we did not sample the 2,3 population. What effect does this have on hypotheses testing?

  46. Type 1,2,3

  47. Type 1 - Drug

  48. Type 3 Center No Missing Missing

  49. Type 3 - Drug

  50. Point #5 • Even Type III (3) sums of squares gives rather strange hypotheses when there are some populations with no samples.

More Related