Hi, I'm very new to SAS, and I'm trying to get a means separation test done for the slopes of an ANCOVA, but I'm unclear how to do so. Sample data is attached as a csv. My data has the following variables: Height_cm (Continuous quantitative), Diff (Continuous quantitative) Type (a factor variable with 6 levels), Treatment (a factor variable with 2 levels), State (a random effect), blockid (blocking factor), groupid (blocking factor nested in blockid). For my ANCOVA, I am running a regression of Diff = a + b(Height_cm) My code for extracting estimates at a value of 25 currently looks like this: proc mixed empirical data=sampledata;
class Type Treatment blockid groupid State;
model Diff = Height_cm|Type|Treatment / solution;
random State blockid groupid(blockid) / subject = groupid;
lsmeans Type*Treatment / at Height_cm = 25 adjust=tukey;
store BlockAnalysis / label='PLM: Getting Started';
run;
ods trace on;
proc plm restore=blockanalysis;
lsmeans Type*Treatment / at Height_cm = 25 adjust=tukey lines;
ods output LSMLines=LSMLines;
run;
ods trace off Ideally I would like code that produces the same tukey lines output, but in comparison of regression slopes for each grouping of Type*Treatment For those familiar with R, this would replicate the use of lmer, emmeans, and cld commands model = lmer(Diff ~ Height_cm * Type * Treatment + (1|State) + (1|blockid) +(1|blockid:groupid), data = sampledata) marginal = emtrends(model,pairwise ~ Type * Treatment, var = "Height_cm") CLD = cld(marginal, alpha = 0.05, Letters = letters, adjust = "tukey") CLD
... View more