Description Usage Arguments Details Value
Simulate 2x2 data with autocorrelated errors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
n_subj |
Number of subjects to simulate. Must be a positive integer that is a multiple of 2. |
n_obs |
Number of observations per subject. Must be a positive even integer. |
int |
Intercept. |
A |
Main effect of A (within-subject factor). |
B |
Main effect of B (between-subject factor). |
AB |
AB interaction effect. |
rint |
Random intercept variance. |
rslp |
Random slope variance (for factor A). |
rcorr |
Random correlation. |
version |
How to generate residuals: either an integer
representing the Scenario number (see |
rand_fn |
Name of the function to randomize trial order
(defaults to |
verbose |
Whether the data frame should include GLM components. |
extra_args |
A list of extra arguments to be passed to a user-defined function to generate residuals. |
When used with a user-defined function to generate residuals, the residuals for each subject will be standardized (i.e., converted to z-scores) before they are combined with other model components.
A data frame with n_subj * n_obs
rows and either 9
or 12 columns depending on whether verbose is TRUE or FALSE
respectively.
subj_id
A
Level of within-subject factor A.
B
Level of between-subject factor B.
A_c
Deviation-coded predictor for A.
B_c
Deviation-coded predictor for B.
tnum_r
Trial number for the fully randomized version.
tnum_b
Trial number for the blocked version.
Y_r
Response variable for the fully randomized version.
Y_b
Response variable for the fully blocked version.
rint
Random intercept effect (verbose mode only.)
rslp
Random slope effect (verbose mode only).
Y_fit
Fitted value (all effects except residual.)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.