BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pronabesh
Fluorite | Level 6

Hi SASusers,

I am looking to identify outliers in a repeated measures study, where study participants were measures at baseline, 1, 2, 6, 12 and 18 months. The measures of interest are neuro psych test scores which seem to have improved with time due to learning and re-test effect. 

I was trying to adapt an approach by Welch et al (paper attached) to identify individual-level outliers from longitudinal data by fitting a random-effects model with subject-specific slopes and examining the standardized residual . However, the standardized residual from my model is the residual deviation from the sample parameter estimates and not within individual. Is there any way to obtain standardized residual at individual-level?

The code I used is below:

proc mixed data=outliers noclprint covtest;
    class studyid time;
    model outcome=time/ddfm=bw outp=predicted;
    random intercept time/subject=studyid type=ar(1) gcorr;
    lsmeans timefr/diff cl alpha=0.2 slice=time;
    ods output diffs=diff1 lsmeans=lsm1;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Use 's reference, and look at conditional residuals.

I want to address some other issues. With the time points being unequally spaced, an ar(1) structure isn't appropriate.  Here is what I might consider using:

proc mixed data=outliers noclprint covtest plots=all;
    class studyid time;
    model outcome=time/ddfm=bw outp=predicted;
    random intercept /subject=studyid gcorr;

    repeated time/subject=studyid type=<I would suggest SP(POW).  Other possibilities include CSH or UN, but for those I would drop the random statement above>;
    lsmeans time/diff cl alpha=0.2;* slice=time; /* No interactions so slice option can be dropped */
    ods output diffs=diff1 lsmeans=lsm1;
run;

Steve Denham

View solution in original post

3 REPLIES 3
AnalytX
Fluorite | Level 6

Hi,

You can have a look to this paper named "Mixed Model Influence Diagnostics".

http://www2.sas.com/proceedings/sugi29/189-29.pdf

Best,

SteveDenham
Jade | Level 19

Use 's reference, and look at conditional residuals.

I want to address some other issues. With the time points being unequally spaced, an ar(1) structure isn't appropriate.  Here is what I might consider using:

proc mixed data=outliers noclprint covtest plots=all;
    class studyid time;
    model outcome=time/ddfm=bw outp=predicted;
    random intercept /subject=studyid gcorr;

    repeated time/subject=studyid type=<I would suggest SP(POW).  Other possibilities include CSH or UN, but for those I would drop the random statement above>;
    lsmeans time/diff cl alpha=0.2;* slice=time; /* No interactions so slice option can be dropped */
    ods output diffs=diff1 lsmeans=lsm1;
run;

Steve Denham

pronabesh
Fluorite | Level 6

Thank you Steve and AnalytX. As always, much appreciated!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 5045 views
  • 3 likes
  • 3 in conversation