plot.clusbootemm: Plot estimated marginal means for a cluster bootstrap GLM

Description Usage Arguments Author(s) Examples

View source: R/clusbootemm.R

Description

Plots the estimated marginal means of an clusbootglm object. Works with one within-subjects and/or one between-subjects variable.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'clusbootemm'
plot(
  x,
  within,
  between,
  pch,
  lty,
  ylab = "Estimated marginal mean",
  xlab = "Within subject",
  ...
)

Arguments

x

object of class clusbootemm.

within

within-subjects variable. Should be numeric or numerically labeled factor.

between

between-subjects variable.

pch

point character. Length must be equal to the number of between-subjects levels.

lty

linetype. Length must be equal to the number of between-subjects levels.

ylab

label for y-axis.

xlab

label for x-axis.

...

other arguments to be passed to the plot function (see par).

Author(s)

Mathijs Deen

Examples

1
2
3
4
5
6
7
8
## Not run: 
medication <- medication[medication$time %% 1 == 0,]
medication$time_f <- as.factor(medication$time)
set.seed(1)
model.1 <- clusbootglm(pos~time_f*treat, clusterid=id, data=medication)
emm.1 <- emm(object = model.1)
plot(x = emm.1, within = time_f, between = treat, pch = c(15,17), lty = c(1,2))
## End(Not run)

ClusterBootstrap documentation built on Feb. 16, 2021, 5:06 p.m.