Programming the statistical procedures from SAS

How to draw interaction figure

Accepted Solution Solved
Reply
Contributor
Posts: 66
Accepted Solution

How to draw interaction figure

[ Edited ]

I want to maintain all the results that come out after running following codes. However, I want to modify the codes to generate a figure of interaction of the independent variables. Could you please help? Thank you.

 

proc glimmix data=a1.prediss1 plots=residualpanel(conditional marginal);
class phase_info1 Phoneme_stress subject;
model ResidualError_Sum= phase_info1|Phoneme_stress/solution dist=gamma;
output out=a1.predata pred=pred resid=r;
random intercept phase_info1|Phoneme_stress/ subject=subject;
run;


Accepted Solutions
Solution
3 weeks ago
PROC Star
PROC Star
Posts: 404

Re: How to draw interaction figure

Try

 

lsmeans phase_info1*Phoneme_stress / plot=meanplot(sliceby=phase_info1 join cl);

Before you go too far down this path, be sure that your RANDOM statement is specifying what you want it to specify: it currently identifies a variance among subjects, a variance among units defined by subject * phase_info1, a variance among units defined by Phoneme_stress * subject, and a variance among units defined by phase_info1 * Phoneme_stress * subject. Maybe that makes sense for your design, but maybe it does not. 

 

The name of the response variable (ResidualError_Sum) is a bit suspicious. Is your response a residual from some other model that you've fit?

 

View solution in original post


All Replies
Solution
3 weeks ago
PROC Star
PROC Star
Posts: 404

Re: How to draw interaction figure

Try

 

lsmeans phase_info1*Phoneme_stress / plot=meanplot(sliceby=phase_info1 join cl);

Before you go too far down this path, be sure that your RANDOM statement is specifying what you want it to specify: it currently identifies a variance among subjects, a variance among units defined by subject * phase_info1, a variance among units defined by Phoneme_stress * subject, and a variance among units defined by phase_info1 * Phoneme_stress * subject. Maybe that makes sense for your design, but maybe it does not. 

 

The name of the response variable (ResidualError_Sum) is a bit suspicious. Is your response a residual from some other model that you've fit?

 

Contributor
Posts: 66

Re: How to draw interaction figure

[ Edited ]

Thank you again, Sid.

Yes, the model includes phase_info1, Phoneme_stress, and phase_info1 * Phoneme_stress in the final equation in both fixed and random effects, because phase_info1 and Phoneme_stress are all first level variables and I am interested in the interaction of these two variables.

 And no, my dependent variable is just an error measurement from acoustic signal, so it is nothing to do with stat analysis.

Thanks for checking.

 

Please let me know if anything else can be a problem. Thank you!

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 107 views
  • 0 likes
  • 2 in conversation