BookmarkSubscribeRSS Feed
bnd
Fluorite | Level 6 bnd
Fluorite | Level 6

I am trying to compute a change score for a variable that has two different time points (Month 0 and Month 4). I am having issues with how this should be done in SAS. I tried using an LS Means statement, but only class variables can be used. The data looks like this in my dataset. I am trying to figure out what would be the best way to see a change in these scores (Month 4 - Month 0). But, I am not sure the best way that this could be done. Any thoughts? Suggestions?

 

Psi timepoints

Psi

Baseline_arm_1

125

Month_4_arm_1

88

4 REPLIES 4
PaigeMiller
Diamond | Level 26

You mention LSMEANS, could you please show us your code? Could you also show us a larger portion of your data, it's really hard to determine what to do if you only have two records.

--
Paige Miller
bnd
Fluorite | Level 6 bnd
Fluorite | Level 6

Sorry about that. My code and more of the data is provided below. 

 

proc mixed data=be.time04 method=reml covtest;
class acrostic;
model weight = spmrkt_grcy psi time county spmrkt_grcy*time spmrkt_grcy*time*psi /solution ddfm=sat;
random intercept / subject = acrostic type=un;
lsmeans spsis / e diff cl adjust=bon;
run;

 

 

Psi timepoints

Psi

Baseline_arm_1

125

Month_4_arm_1

88

Baseline_arm_1

110

Month_4_arm_1

110

Baseline_arm_1

59

Month_4_arm_1

76

Baseline_arm_1

103

Month_4_arm_1

113

Baseline_arm_1

84

Month_4_arm_1

92

Baseline_arm_1

117

Month_4_arm_1

92

Baseline_arm_1

84

Month_4_arm_1

92

Baseline_arm_1

123

Month_4_arm_1

118

Baseline_arm_1

123

Month_4_arm_1

131

Baseline_arm_1

90

Month_4_arm_1

87

Month_4_arm_1

125

Baseline_arm_1

123

Month_4_arm_1

131

Baseline_arm_1

90

Month_4_arm_1

87

Baseline_arm_1

125

PaigeMiller
Diamond | Level 26

Got it, thanks.

 

Make PSItimepoint to be a CLASS variable, then an LSMEANS statement with PSItimepoint ought to work.

--
Paige Miller
bnd
Fluorite | Level 6 bnd
Fluorite | Level 6

I changed the variable from numeric to a character variable and I keep receiving the ERROR: Only CLASS variables allowed in this effect. I am not sure why this is happening.