help for mlmplot

Title

mlmplot -- Publication-ready interaction plot for two-way MLM

Syntax

mlmplot , pred(string) modx(string)
[options]

pred(string) focal predictor (x-axis)

modx(string) moderator (separate lines)

at(numlist) custom moderator values

values(string) meansd (default), quartiles, or tertiles

level(#) confidence level for bands; default 95

xlabel(string) x-axis label

ylabel(string) y-axis label

legendtitle(string) legend title; defaults to moderator name

npred(#) number of x-axis grid points; default 50

nointerval suppress confidence bands

saving(filename) save graph to file

Description

mlmplot produces a publication-ready interaction plot showing
predicted values of the outcome across the range of pred, with
separate lines for selected values of modx. Confidence bands are
drawn by default using the delta method over fixed-effect uncertainty.

mlmplot must be run immediately after mixed. The model must
include the interaction as c.pred##c.modx.

Example

. mixed math c.ses_c##c.climate_c gender || school:, reml

. mlmplot, pred(ses_c) modx(climate_c)

. mlmplot, pred(ses_c) modx(climate_c) values(quartiles)

. mlmplot, pred(ses_c) modx(climate_c) at(-1 0 1) ///

xlabel("Student SES") ylabel("Math Score") legendtitle("School Climate")

Author

Subir Hait, Michigan State University.

Also see

mlmprobe, mlmjn, mlmsummary, mlmcenter