Plots moderator models using ctsem
fit objects
ctmaPlotCtsemMod(
ctStanFitObject = NULL,
fitSummary = NULL,
activeDirectory = NULL,
Tipred.pos = 1,
saveFilePrefix = "Moderator Plot ",
scaleTime = 1,
mod.sd.to.plot = -1:1,
timeUnit = "not specified",
timeRange = NULL,
mod.type = "cont",
no.mod.cats = NULL,
n.x.labels = NULL,
plot.xMin = 0,
plot.xMax = NULL,
plot.yMin = -1,
plot.yMax = 1,
plot..type = "l",
plot.lty = 1,
plot.col = "grey",
plot.lwd = 1.5,
dot.plot.type = "b",
dot.plot.col = "black",
dot.plot.lwd = 0.5,
dot.plot.lty = 3,
dot.plot.pch = 16,
dot.plot.cex = 3
)
writes png figures to disc using the path specified in the activeDirectory arguments.
The fit object with moderator (TIpred) effects to be plotted
Mainl ofr debugging purpose. Saves computation time if provided in addition to the fit object
defines the active directory (where to save plots)
the Tipred that represent the moderator. Could be more than one in case of categorical moderators (e.g., Tipred.pos = c(3,4))
Prefix used for saved plots
factor to increase or decrease the time scale (e.g., 1/12 if estimates where based on yearly intervals and figure should show monthly intervals)
The standard deviation vlaues (default -1, 0, +1) for which the drift effects are plotted
Label for the x-axis
time range across which drift effects are plotted
Could be either "cont" or "cat"
Need to be specified if type = "cat". The number of categories should usually be equal the number of dummy variables used to represent the categorical moderator + 1.
How many values to be used for indicating time points on the x-axis (0 is automatically added and should not be counted)
default = 0
default = NULL
default = -1
default = 1
default = "l", # 2 dots .. are correct
default = 1
default = "grey"
default = 1.5
default = "b" for the dots indicating the moderator values
default ="black" for the dots indicating the moderator values
default = .5 for the dots indicating the moderator values
default = 3 for the dots indicating the moderator values
default = 16 for the dots indicating the moderator values
default = 3 for the dots indicating the moderator values