plot.bcmmrm {bcmixed}R Documentation

Plot a bcmmrm Object.

Description

Plot for the model medians of each treatment groups with the 95 percent confidence intervals stored in bcmmrmObject.

Usage

## S3 method for class 'bcmmrm'
plot(
  x,
  robust = TRUE,
  ssadjust = TRUE,
  dt = 1,
  timepoint = NULL,
  tnom = TRUE,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  lwd = 2,
  col = NULL,
  lty = NULL,
  main = TRUE,
  sub = NULL,
  legend = TRUE,
  loc = "topright",
  verbose = FALSE,
  ...
)

Arguments

x

an object inheriting from class "bcmmrm", representing the Box-Cox transformed MMRM analysis.

robust

an optional logical value used to specify whether to apply the robust inference. The default is TRUE.

ssadjust

an optional logical value used to specify whether to apply the empirical small sample adjustment. The default is TRUE.

dt

an numeric value indicating shift length between groups in the longitudinal median plot. A multiplying factor for the default settings specified (e.g. if 2 is specified, shift length is twice longer than that for the default setting). The default is 1.

timepoint

an numeric value of a specified level of time variable at which median plot is created. When timepoint is NULL and number of time points is not 1, longitudinal median plot (x axis is time) is created. Otherwise, median plot where x axis is group is created. The default is NULL.

tnom

a optional logical value indicating the scale of x axis of the longitudinal median plot. When tnom is TRUE, nominal scale is used and widths between any combinations of neighbor time points are same. When tnom is FALSE, actual scale of time variable is used. The default is TRUE.

xlab

a title for the x axis. The default is NULL and the name of time or group variable is used.

ylab

a title for the y axis. The default is NULL and the name of outcome variable is used.

xlim

a numeric vector with length of 2 indicating limits of x axis. The default is NULL and limits are calculated automatically.

ylim

a numeric vector with length of 2 indicating limits of y axis. The default is NULL and limits are calculated automatically.

lwd

an optional positive numeric value indicating line width. The default is 2.

col

an integer or a character vector with length of the number of groups indicating colors of lines for each treatment group. The default is NULL and all of colors are black.

lty

an optional integer or a character vector with length of the number of groups indicating line types of lines for each treatment group. The default is NULL and 1:ng is used, where ng is number of groups.

main

a main title for the plot. The default is TRUE and default title is "(Longitudinal) Plot for median of each group".

sub

a sub title for the plot. The default is NULL.

legend

a logical optional value specifying to add legends to plots. When legend is TRUE legends are added to the plot. Otherwise, legends are not added. The default is TRUE.

loc

a character value indicating the location of the legends. The location can be specified by setting loc to a single keyword from the list "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right", and "center". The default is "topright".

verbose

a logical optional value specifying to print the detailed analysis information in the console. The default is FALSE.

...

some methods for this generic require additional arguments.

Value

a median plot.

See Also

bcmmrm, bcmmrmObject

Examples

 data(aidscd4)
 resar <- bcmmrm(outcome = cd4, group = treatment, data = aidscd4,
                time = weekc, id = id, structure = "AR(1)", glabel =
                c("Zid/Did", "Zid+Zal", "Zid+Did", "Zid+Did+Nev"))
 plot(resar, xlab = "Week", ylab = "CD4+1", col = 1:4, main = NULL)
 plot(resar, timepoint = 32, xlab = "Treatment", ylab = "CD4+1")

[Package bcmixed version 0.1.4 Index]