simulateLatinsquare.fnc {languageR} | R Documentation |
Simulate simple Latin Square data and compare models
Description
This function creates a user-specified number of simulated datasets with a Latin Square design, and compares mixed-effects models with the by-subject anova.
Usage
simulateLatinsquare.fnc(dat, with = TRUE, trial = 0, nruns = 100,
nsub = NA, nitem = NA, ...)
Arguments
dat |
A data frame with the structure of the data set |
with |
Logical, if TRUE, effect of SOA built into the data. |
trial |
A number which, if nonzero, gives the magnitude of a learning or a fatigue effect. |
nruns |
A number indicating the required number of simulation runs. |
nsub |
A number for the number of subjects. |
nitem |
A number for the number of items. |
... |
other parameters to be passed through to plotting functions. |
Value
A list with components
alpha05 |
Description of 'comp1' |
alpha01 |
proportion of runs in which predictors are significant at the 05 significance level. |
res |
Data frame with simulation results. |
with |
Logical, TRUE if SOA effect is built into the simulations. |
Author(s)
R. H. Baayen
Examples
## Not run:
data(latinsquare)
\dontrun{
library(lme4)
simulateLatinsquare.fnc(latinsquare, nruns=100)
}
## End(Not run)