plot.clusbootemm {ClusterBootstrap} | R Documentation |
Plot estimated marginal means for a cluster bootstrap GLM
Description
Plots the estimated marginal means of an clusbootglm
object. Works with one within-subjects and/or one between-subjects variable.
Usage
## S3 method for class 'clusbootemm'
plot(
x,
within,
between,
pch,
lty,
ylab = "Estimated marginal mean",
xlab = "Within subject",
...
)
Arguments
x |
object of class |
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 |
Author(s)
Mathijs Deen
Examples
## 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)
[Package ClusterBootstrap version 1.1.2 Index]