Learn R Programming

bcmixed (version 0.1.5)

boxplot.bcmmrm: Box-whisker plot for a bcmmrm Object.

Description

Box-whisker plot for the transformed residuals of each treatment groups at a specified time point with error bar plot (mean +- SD) using bcmmrmObject.

Usage

# S3 method for bcmmrm
boxplot(
  x,
  timepoint = NULL,
  xlab = NULL,
  ylab = NULL,
  main = TRUE,
  sub = NULL,
  verbose = FALSE,
  ...
)

Value

a box-whisker plot for transformed residual.

Arguments

x

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

timepoint

an numeric value of a specified level of time variable. The default is NULL and the last level is specified.

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 default title is "Transformed residuals".

main

a main title for the plot. The default is TRUE and default title is "Box-whisker plot for transformed residuals".

sub

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

verbose

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

...

some methods for this generic require additional arguments.

See Also

bcmmrm, bcmmrmObject

Examples

Run this code
 data(aidscd4)
 lmd.bl <- bcreg(cd4.bl ~ 1, data = aidscd4[aidscd4$weekc == 8, ])$lambda
 aidscd4$cd4.bl.tr <- (aidscd4$cd4.bl ^ lmd.bl - 1) / lmd.bl
 resar <- bcmmrm(outcome = cd4, group = treatment, data = aidscd4,
                time = weekc, id = id, covv = c("cd4.bl.tr", "sex"),
                cfactor = c(0, 1), structure = "AR(1)", glabel =
                c("Zid/Did", "Zid+Zal", "Zid+Did", "Zid+Did+Nev"))
 boxplot(resar, xlab = "Treatment", col = 1:4)

Run the code above in your browser using DataLab