+ Reply to Thread
Results 1 to 3 of 3

Thread: between-subject variation PROC MIXED in SAS

  1. #1
    Points: 2,921, Level: 33
    Level completed: 14%, Points required for next Level: 129

    Posts
    20
    Thanks
    8
    Thanked 0 Times in 0 Posts

    between-subject variation PROC MIXED in SAS




    I haven't used mixed models for long and can't remember much about it. So here's a silly question.
    Suppose below is my program to model a repeated measures data. What I want to know besides the fixed effect GROUP is if the between-subject (ID) variation is significant. Can anyone help point out which part in the output shows that or do I need to request something else? Thanks a lot.

    Sunny

    DATA wide;
    INPUT ID group dv1 dv2 dv3 dv4;
    CARDS;
    1 1 3 4 7 3
    2 1 6 8 12 9
    3 1 7 13 11 11
    4 1 0 3 6 6
    5 2 15 16 11 17
    6 2 10 12 18 15
    7 2 10 15 15 14
    8 2 25 27 21 29
    ;
    RUN;
    DATA long ;
    SET Wide;
    dv = dv1; time = 1; OUTPUT;
    dv = dv2; time = 2; OUTPUT;
    dv = dv3; time = 3; OUTPUT;
    dv = dv4; time = 4; OUTPUT;
    DROP dv1 - dv4 ;
    RUN;
    PROC MIXED DATA=long covtest;
    CLASS ID group time;
    MODEL dv = group;
    REPEATED time / SUBJECT=ID TYPE=ar(1) r rcorr;
    run;

    outputs:
    The SAS System

    Estimated R Matrix for ID 1

    Row Col1 Col2 Col3 Col4

    1 28.7945 21.3215 15.7880 11.6906
    2 21.3215 28.7945 21.3215 15.7880
    3 15.7880 21.3215 28.7945 21.3215
    4 11.6906 15.7880 21.3215 28.7945


    Estimated R Correlation Matrix for ID 1

    Row Col1 Col2 Col3 Col4

    1 1.0000 0.7405 0.5483 0.4060
    2 0.7405 1.0000 0.7405 0.5483
    3 0.5483 0.7405 1.0000 0.7405
    4 0.4060 0.5483 0.7405 1.0000


    Covariance Parameter Estimates

    Standard Z
    Cov Parm Subject Estimate Error Value Pr Z

    AR(1) ID 0.7405 0.1251 5.92 <.0001
    Residual 28.7945 12.2802 2.34 0.0095


    Fit Statistics

    -2 Res Log Likelihood 170.4
    AIC (Smaller is Better) 174.4
    AICC (Smaller is Better) 174.8
    BIC (Smaller is Better) 174.5


    Null Model Likelihood Ratio Test

    DF Chi-Square Pr > ChiSq

    1 15.48 <.0001


    Type 3 Tests of Fixed Effects

    Num Den
    Effect DF DF F Value Pr > F

    group 1 6 11.64 0.0143

  2. #2
    Fortran must die
    Points: 58,790, Level: 100
    Level completed: 0%, Points required for next Level: 0
    noetsi's Avatar
    Posts
    6,532
    Thanks
    692
    Thanked 915 Times in 874 Posts

    Re: between-subject variation PROC MIXED in SAS

    I do not know how repeated measures influence mixed models but one way to tell if between variation is important in cross sectional designs is to calculate an ICC. There is no statistical test if this is significant, there are rules of thumb instead. SAS does not generate this, you have to do the calculations yourself, I think from between variation divided by total variation which SAS will provide in an empty model.
    "Very few theories have been abandoned because they were found to be invalid on the basis of empirical evidence...." Spanos, 1995

  3. #3
    Omega Contributor
    Points: 38,374, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,998
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: between-subject variation PROC MIXED in SAS


    Your question is worded weirdly, so I am just guessing at your question. But a simple way to see if you need to control for level variable (clusters in your case) is to just run an empty model. Thus, see if having no predictors but controlling for group level is significant:


    Code: 
    PROC MIXED DATA=long covtest;
     
    
    CLASS ID group time;
     
    
    MODEL dv = ;
     
    
    REPEATED time / SUBJECT=ID TYPE=ar(1) r rcorr;
     
    
    run; 
    I believe this is conveyed in the null likelihood test.
    Stop cowardice, ban guns!

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats