Description Usage Arguments Details Value Author(s) See Also Examples
This function is used to compute bootstrap resampled predictions for each cell in a specified experimental design, using either cell means or mixed effects modelling to obtain predictions. The results can be visualized using ezPlot2
.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
data |
Data frame containing the data to be analyzed. |
dv |
Name of the column in |
wid |
Name of the column in |
within |
Names of columns in |
between |
Names of columns in |
resample_within |
Logical value specifying whether to resample within each cell of the design within each wid unit. If there is only one observation per such cells, then this should be set to FALSE to avoid useless computation. |
iterations |
Numeric value specifying the number of bootstrap iterations to complete. |
lmer |
Logical. If TRUE, predictions are obtained via mixed effects modelling; if FALSE predictions are obtained via cell means. |
lmer_family |
When obtaining predictions via mixed effects modelling (i.e. when |
parallel |
Logical. If TRUE, computation will be parallel, assuming that a parallel backend has been specified (as in |
alarm |
Logical. If TRUE, call the |
While within
and between
are both optional, at least one column of data
must be provided to either within
or between
. Any numeric or character variables in data
that are specified as either wid
, within
or between
will be converted to a factor with a warning. Prior to running, dv
is collapsed to a mean for each cell defined by the combination of wid
, within
or between
.
A list containing either two or three components:
fit |
If predictions are obtained by mixed effects modelling, an |
cells |
A data frame containing predictions for each cell of the design. |
boots |
A data frame containing predictions for each cell of the design from each iteration of the bootstrap procedure. |
Michael A. Lawrence mike.lwrnc@gmail.com
Visit the ez
development site at http://github.com/mike-lawrence/ez
for the bug/issue tracker and the link to the mailing list.
link{ezANOVA}
, ezMixed
, ezPerm
, ezPlot2
, ezResample
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #Read in the ANT data (see ?ANT).
data(ANT)
head(ANT)
ezPrecis(ANT)
#Run ezBoot on the accurate RT data
rt = ezBoot(
data = ANT
, dv = rt
, wid = subnum
, within = .(cue,flank)
, between = group
, iterations = 1e1 #1e3 or higher is best for publication
)
## Not run:
#plot the full design
p = ezPlot2(
preds = rt
, x = flank
, split = cue
, col = group
)
print(p)
#plot the effect of group across the flank*cue design
p = ezPlot2(
preds = rt
, x = flank
, split = cue
, diff = group
)
print(p)
#plot the flank*cue design, averaging across group
p = ezPlot2(
preds = rt
, x = flank
, split = cue
)
print(p)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.