week 8 lec 3 issues in mixed models
play

Week 8, Lec 3: Issues in Mixed Models Mixed models issues raised in - PowerPoint PPT Presentation

Week 8, Lec 3: Issues in Mixed Models Mixed models issues raised in class. HW-5 with kv0.csv A Generalised LMM (GLMM) analysis and some complications, e.g., corr( int, slope ) = 1. More on p-values. An example with nested


  1. Week 8, Lec 3: Issues in Mixed Models • Mixed models issues raised in class. • HW-5 with ‘kv0.csv’ • A Generalised LMM (GLMM) analysis and some complications, e.g., corr( int, slope ) = ±1. • More on p-values. • An example with nested factors • How to implement and test/compare models in R? Use of ML vs REML deviance. 1

  2. Robert: ¡AIC ¡is ¡a ¡principled ¡index! • Suppose ¡the ¡true ¡likelihood ¡of ¡the ¡data, ¡ y , ¡is ¡ g(y) , ¡and ¡ our ¡model ¡for ¡ y ¡contains ¡ k ¡parameters, ¡ θ , ¡and ¡yields ¡ the ¡(modeled) ¡likelihood ¡of ¡the ¡data, ¡ y , ¡is ¡ f(y, ¡ θ ) . ¡ ¡We ¡ would ¡want ¡our ¡model ¡and ¡our ¡ML ¡es=mate, ¡ θ * , ¡of ¡ θ ¡ to ¡be ¡such ¡that ¡the ¡‘distance’ ¡between ¡ g(y) ¡and ¡ f(y, ¡ θ * ) ¡to ¡be ¡a ¡minimum. ¡ ¡Because ¡we ¡do ¡not ¡know ¡ g(y) , ¡ we ¡can’t ¡calculate ¡this ¡‘distance’, ¡but ¡we ¡can ¡try ¡to ¡ approximate ¡it ¡in ¡some ¡way. ¡ • Akaike ¡introduced ¡a ¡‘distance’ ¡index ¡based ¡on ¡ informa=on ¡theory, ¡the ¡Kullback-­‑Leibler ¡(KL) ¡index. ¡ ¡ ⎛ ⎞ 2 I ( θ ) = E log g ( y ) ⎟ . ⎜ f ( y , θ ) ⎝ ⎠ 2 ¡

  3. Robert: ¡AIC ¡is ¡a ¡principled ¡index! ⎛ ⎞ 2 I ( θ ) = E log g ( y ) ⎟ . ⎜ f ( y , θ ) ⎝ ⎠ • Akaike ¡showed ¡that, ¡apart ¡from ¡a ¡constant ¡term, ¡(i) ¡the ¡ deviance ¡of ¡a ¡model ¡(previously ¡defined) ¡is ¡a ¡biased ¡ es=mate ¡of ¡ 2I( θ ) , ¡and ¡(ii) ¡the ¡ bias ¡is ¡approximately ¡ equal ¡to ¡twice ¡the ¡dimensionality, ¡ k , ¡of ¡ θ . ¡ ¡Hence, ¡an ¡ approx ¡unbiased ¡es=mate ¡of ¡the ¡K-­‑L ¡distance ¡is: ¡ ¡ AIC ¡= ¡Deviance ¡+ ¡2 k ¡= ¡Deviance ¡+ ¡2( p ¡+ ¡1) , ¡ • where ¡ p ¡is ¡the ¡number ¡of ¡explanatory ¡variables ¡in ¡a ¡ regression, ¡and ¡the ¡‘1’ ¡refers ¡to ¡the ¡intercept. ¡ • AIC ¡is ¡well-­‑behaved ¡when ¡ n ¡>> ¡p . ¡If, ¡say, ¡ p ¡= ¡n/2 ¡ or ¡ larger, ¡AIC ¡could ¡decrease ¡as ¡ p ¡increases ¡– ¡giving ¡an ¡ unfair ¡advantage ¡to ¡complex ¡models! ¡ 3 ¡

  4. Use ¡of ¡AIC ¡ • AIC ¡can ¡be ¡used ¡to ¡ assess ¡the ¡rela=ve ¡fit ¡of ¡ non-­‑nested ¡ models ¡– ¡the ¡smaller ¡AIC ¡is, ¡the ¡beSer. ¡ ¡(RE)ML ¡ deviance ¡is ¡used ¡to ¡ test ¡nested ¡models; ¡the ¡ difference ¡ in ¡deviance ¡between ¡models ¡has ¡the ¡chi-­‑square ¡ distrn , ¡and ¡this ¡is ¡the ¡basis ¡of ¡the ¡test. ¡ • Suppose ¡model, ¡M*, ¡has ¡the ¡minimum ¡AIC. ¡ ¡Is ¡another ¡ model, ¡M, ¡‘as ¡good ¡as’ ¡M*? ¡ ¡Let ¡ d ¡= ¡AIC M ¡– ¡AIC min . ¡ ¡ A ¡ rule-­‑of-­‑thumb ¡is: ¡ ¡ – ‘Yes’, ¡if ¡0 ¡< ¡ d ¡< ¡2; ¡ ¡ – ‘Probably ¡not’, ¡if ¡4 ¡< ¡ d ¡< ¡7; ¡and ¡ ¡ – ‘No’, ¡if ¡10 ¡< ¡ d . ¡ Source: ¡hSp://myweb.uiowa.edu/cavaaugh/ms_lec_2_ho.pdf ¡ •

  5. Ian: ¡Is ¡ var(Int) ¡changed ¡by ¡rescaling ¡the ¡IV? • Consider ¡then ¡intercept-­‑only ¡model ¡with ¡fixed ¡effects ¡ factor, ¡ T , ¡and ¡random ¡effect, ¡ S , ¡ ¡ X ijk = µ + a i + b*T j + e ijk . The ¡random ¡effects ¡variance, ¡ var(Int) ¡ = ¡ σ a 2 , ¡denotes ¡a ¡ • substan=ve ¡quan=ty, ¡namely, ¡varia=on ¡across ¡Ss ¡in ¡their ¡ ‘average’ ¡response, ¡that ¡cannot ¡depend ¡on ¡which ¡level ¡of ¡ T ¡is ¡chosen ¡as ¡the ¡origin. ¡(However, ¡rescaling ¡can ¡affect ¡ the ¡ correlaKon ¡between ¡2 ¡random ¡effects.) ¡ d1$timec = d1$time - 2; d1$weightc = scale(d1$weight, scale = F) res3a = lmer(weightc ~ timec + (1 | id), d1) • The ¡results ¡are ¡the ¡same ¡as ¡with ¡the ¡uncentered ¡model. ¡ 5 ¡

  6. Yuan ¡Chang ¡& ¡Monica: ¡Can ¡adding ¡a ¡‘random ¡ slope’ ¡for ¡ X ¡remove ¡the ¡fixed ¡effect ¡of ¡ X ? • Consider ¡the ¡‘intercept-­‑only’ ¡and ¡‘intercept+slope’ ¡ models: ¡ res3 = lmer(weight ~ time + (1 | id), d1) res5 = lmer(weight ~ time + (1 + time | id), d1) • Assuming ¡a ¡random ¡slope ¡for ¡ >me ¡is ¡the ¡same ¡as ¡ assuming ¡a ¡ S*>me ¡ interac=on. ¡ ¡If ¡there ¡is ¡a ¡significant ¡ interac=on, ¡the ¡fixed ¡effect ¡of ¡ >me ¡may ¡or ¡may ¡not ¡be ¡ significant. ¡ 6 ¡

  7. Zeynep: ¡Isn’t ¡the ¡Compound ¡Symmetry ¡(CS) ¡assn. ¡ violated ¡in ¡longitudinal ¡designs? • The ¡CS ¡assn ¡implies ¡that ¡the ¡correla=on ¡across ¡Ss ¡ between ¡the ¡scores ¡at ¡ T ¡= ¡1, ¡2, ¡… ¡sa=sfy: ¡cor( x 1i , ¡x 2i ) ¡= ¡ cor( x 1i , ¡x 3i ) ¡= ¡cor( x 3i , ¡x 2i ) ¡= ¡…. ¡ • In ¡a ¡longitudinal ¡design ¡with ¡ T ¡= ¡>me , ¡it ¡is ¡likely ¡that ¡ successive ¡observa=ons ¡will ¡be ¡more ¡highly ¡correlated ¡ than ¡observa=ons ¡separated ¡by ¡many ¡=me-­‑points. ¡ ¡ Ojen ¡a ¡reasonable ¡alterna=ve ¡is ¡the ¡assump=on ¡that: ¡ ¡cor( x t,i , ¡ x t+k,i ) ¡= ¡ ρ k , ¡ ρ ¡< ¡1, ¡ • and ¡depends ¡only ¡on ¡the ¡‘distance’, ¡ k , ¡between ¡ observa=ons. ¡ ¡This ¡model ¡is ¡called ¡an ¡ autoregressive ¡ model ¡of ¡order ¡1, ¡AR(1). ¡ ¡It ¡applies ¡to ¡mixed ¡models ¡and ¡ to ¡ univariate ¡Kme-­‑series . ¡ ¡(See ¡ Russ ¡Poldrack’s ¡lecture ¡ on ¡11/19/14. ) ¡ 7 ¡

  8. CS and other assumptions about the variance- covariance structure in Mixed Models • In a repeated measures design or in a random effects design, let c ij be the covariance between two observations, X i and X j , from the same subject. • If there are only within-subject factors, then a correlation among repeated measures (which is a violation of the “ I ” in the LINE model) does not change the definition of the F ratios for testing the effects of the within-subjects factors. • If there is a between-subjects factor, we need to use the Mixed Models procedures. 8

  9. • With this notation, c ii is the variance of X i . We now show a few of the possible covariance matrices, C = ( c ij ), that may apply to your study. For simplicity, we consider the case, i, j = 1, 2, 3. • Compound symmetry: This is appropriate when the errors in X i and X j are correlated, and the correlation is the same for all pairs of different responses. This condition is usually met when we randomize the order in which the subject is exposed to the different within-subject factor levels. ρ ρ ⎛ ⎞ 1 ⎜ ⎟ = σ ρ ρ ρ < 2 C 1 , | | 1. ⎜ ⎟ 1 ⎜ ⎟ ρ ρ 1 ⎝ ⎠ 9

  10. • Autoregressive structure, AR(1): This is appropriate when the subject is exposed to the different within-subject factor levels in a fixed order. In that case, the errors in X i and X j are more highly correlated if the two responses are adjacent than if they are farther apart. ⎛ ⎞ ρ ρ 2 1 ⎜ ⎟ = σ ρ ρ ρ < 2 C 1 , | | 1. ⎜ ⎟ 2 ⎜ ⎟ ρ ρ 2 1 ⎝ ⎠ 10

  11. • Unstructured covariance matrix: This most general model can be tested against special cases, e.g., compound symmetry, by using the goodness-of-fit index, (-2)*log likelihood, that is given in lme() and lmer() output. SPSS , but not lmer() , makes it easy to specify covariance structures other than CS! ⎛ ⎞ σ σ σ 2 1 12 13 ⎜ ⎟ = ⎜ σ σ σ 2 C . ⎟ 3 12 2 23 ⎜ ⎟ σ σ σ 2 ⎝ ⎠ 13 23 3 11

  12. HW-5 using ‘ kv0.csv ’ • The fictitious data set, ‘kv0.csv’, is based on Dr. Katerina Velanova’s FYP data that she shared with us when she was a Psych 252 student. • I found this acknowledgement in an old handout: Data and analyses courtesy of Katerina Velanova, to whom Psy 252 owes a debt of gratitude [11/8/96]. � • Relevant R script: ‘ skv1.r ’ 12

  13. • Ten subjects were run in a divided attention condition (attn = 1), and 10 different subjects were run in a focused attention condition (attn = 2). Each subject was then tested on a word task (anagrams) that had a unique solution (numsol = 1), two solutions (numsol = 2), or multiple solutions (numsol = 3). The dependent measure was a memory score (higher numbers reflect better performance). • This design involves both between- and within- factors and is probably the most useful design for psychologists. 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend