LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Nov 2006 17:32:23 -0600
Reply-To:     Robin High <robinh@UNLSERVE.UNL.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin High <robinh@UNLSERVE.UNL.EDU>
Subject:      Re: how to plot this????
Comments: To: Emanuele Castano <castanoe@NEWSCHOOL.EDU>
In-Reply-To:  <>
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 <enter options> ;

* 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