plot.mscmt
plots results of mscmt
.
# S3 method for mscmt
plot(
x,
what,
type = c("gaps", "comparison", "placebo.gaps", "placebo.data"),
treatment.time,
zero.line = TRUE,
ylab,
xlab = "Date",
main,
sub,
col,
lty,
lwd,
legend = TRUE,
bw = FALSE,
...
)
Nothing useful (function is called for its side effects).
An object of class "mscmt"
, usually obtained as
the result of a call to function mscmt
.
A character scalar. Name of the variable to be plotted. If missing, the (first) dependent variable will be used.
A character scalar denoting the type of the plot containing
either "gaps"
, "comparison"
, "placebo.gaps"
,
or "placebo.data"
.
Partial matching allowed, defaults to "placebo.gaps"
, if results
of a placebo study are present, and to "gaps"
, else.
An optional numerical scalar. If not missing, a
vertical dotted line at the given point in time is included in the plot.
treatment.time
is measured in years, but may as well be a decimal
number to reflect treatment times different from January 1st.
A logical scalar. If TRUE
(default), a horizontal
dotted line (at zero level) is plotted for "gaps"
and "placebo"
plots.
Optional label for the y-axis, automatically generated if missing.
Optional label for the x-axis, defaults to "Date"
.
Optional main title for the plot, automatically generated if missing.
Optional subtitle for the plot. If missing, the subtitle is
generated automatically for "comparison"
and "gaps"
plots.
Optional character vector with length corresponding to the number of units. Contains the colours for the different units, automatically generated if missing.
Optional numerical vector with length corresponding to the number of units. Contains the line types for the different units, automatically generated if missing.
Optional numerical vector with length corresponding to the number of units. Contains the line widths for the different units, automatically generated if missing.
A logical scalar. If TRUE
(default), a legend is
included in the plot.
A logical scalar. If FALSE
(default), the automatically
generated colours and line types are optimized for a colour plot,
if TRUE
, the automatic colours and line types are set for a black and
white plot.
Further optional parameters for the underlying
plot
function.
A unified basic plot function for gaps plots, comparison of treated and
synthetic values, as well as plots for placebo studies.
Consider using ggplot.mscmt
instead, which is the preferred
plot method and has more functionality than plot.mscmt
.