```Date: Wed, 29 Nov 2006 17:32:23 -0600 Reply-To: Robin High Sender: "SAS(r) Discussion" From: Robin High Subject: Re: how to plot this???? Comments: To: Emanuele Castano In-Reply-To: <200611291907.kATHf6cU012381@mailgw.cc.uga.edu> Content-Type: TEXT/PLAIN; charset=US-ASCII > How to plot? > > I have a design with three predictors, one between-subject, dichotomous, > that I treat as a class variable, and two continuous variables that are > measured within participants. The DV is a continuous variable. I use the > following proc mixed: > > proc mixed ic; > class subject FACTOR; > model DV= FACTOR|continuous1|continuous1; > repeated /type=cs sub=subject; > run;quit; > > I have a 3-way interaction, and I would like to plot the interaction > between continuous1 and continous2 separately for the two values of FACTOR > (which is a between-subject factors). Any idea of how to do that? > Hi Eman, Something like this, where you enter min and max of x1, x2, should work: ods output lsmeans=lsm; ods output diffs=dfs; ods exclude diffs lsmeans; proc mixed ic; class subject FACTOR; model DV= FACTOR|x1|x2; repeated /type=cs sub=subject; * RANDOM subject; * RANDOM statement also works like the REPEATED given; lsmeans factor / diff at (x1 x2 )= (1.5 3); * at min x1, min x2; lsmeans factor / diff at (x1 x2 )= (2.5 3); * at max x1, min x2; lsmeans factor / diff at (x1 x2 )= (1.5 5.5); * at min x1, max x2; lsmeans factor / diff at (x1 x2 )= (2.5 5.5); * at max x1, max x2; run; proc sort data=lsm; by factor x1 x2; DATA plt; SET lsm; by factor x1; if first.x1 then id+1; * id variable helps keep track of factor and the extremes of x1; proc print data=plt run; GOPTIONS ; * choose favorite plotting options; SYMBOL1 i=join value=dot line=1 h=1 color=blue; SYMBOL2 i=join value=dot line=1 h=1 color=red; SYMBOL3 i=join value=dot line=1 h=1 color=green; SYMBOL4 i=join value=dot line=1 h=1 color=purple; PROC GPLOT; PLOT estimate * x2 = id / NOframe haxis = 2 to 6 by 1 hm=0; format estimate 5.1 ; run; quit; Robin High ```

Back to: Top of message | Previous page | Main SAS-L page