mercredi 21 décembre 2022

SAS Proc Mixed Random VS Repeated (Or both)?

I have data from a study for a "device". Subjects receive an implant and are followed for 5 years, with a checkup every year. A "disability score" is calculated from a survey every visit. The implant comes in different "sizes". Also, every year the "device condition" is evaluated. What I'm trying to do is see if "device condition" is associated with "disability score" while controlling for implant size/time/subject.

The Data:

I have the subject id, implant (A and B for sizes and is a static/baseline variable), the timepoint (12, 24, 36, 48, 60 months), implant condition (ordinal scale where 0 is best condition and can change timepoint to timepoint within each subject) and the disability score (dependent quantitative variable).

Example shown below

data modelling;
    input sid $ implant $ timepoint condition disability_score;
    cards;
    1 A 12 0 8
    1 A 24 0 9
    1 A 36 1 9.5
    1 A 48 1 8
    1 A 60 2 9
    2 B 12 1 7
    2 B 24 2 6
    2 B 36 2 7
    2 B 48 3 8
    2 B 60 4 9
    .....
    15 A 12 0 8
    15 A 24 0 9
    15 A 36 1 9.5
    15 A 48 1 8
    15 A 60 2 9
    ;
run;

I'm using proc mixed, but I'm not sure which syntax would be most appropriate for this question. My initial inkling is this is a repeated measures situation and used this:

proc mixed data=modelling plots=none;
    class sid implant timepoint condition;
    model disability_score = implant condition timepoint condition*timepoint;
    repeated timepoint / subject=sid;
run;

However, one thing I'm concerned with is if timepoint needs/should be a quantitative value, and if this is truly a repeated measures situation. When I run this, the condition and implant seem to be significant, and timepoint is not.

I also tried using the random statement with the subject id instead and using timepoint as quantitative

proc mixed data=modelling plots=none;
    class sid implant condition;
    model disability_score = implant condition timepoint condition*timepoint;
    random sid;
run;

When I do this, I get vastly different results, with timepoint being significant and both implant and condition no longer significant.

Really, I'm not 100% sure which is the correctly specified model, and am looking for some validation and/or guidance to the correctly specified model for this question.




Aucun commentaire:

Enregistrer un commentaire