sim_mixed_cc: Generate a cross-classified sample

Description Usage Arguments Value Examples

View source: R/sim_mixed_cc.R

Description

Makes a basic cross-classified design with random intercepts for subjects and items. See vignette("sim_mixed", package = "faux") for examples and details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sim_mixed_cc(
  sub_n = 100,
  item_n = 20,
  grand_i = 0,
  sub_sd = 1,
  item_sd = 1,
  error_sd = 1,
  empirical = FALSE,
  seed = NULL
)

Arguments

sub_n

the number of subjects

item_n

the number of items

grand_i

the grand intercept (overall mean)

sub_sd

the SD of subject random intercepts (or a sub_n-length named vector of random intercepts for each subject)

item_sd

the SD of item random intercepts (or an item_n-length named vector of random intercepts for each item)

error_sd

the SD of the error term

empirical

Should the returned data have these exact parameters? (versus be sampled from a population with these parameters)

seed

DEPRECATED use set.seed() instead before running this function

Value

a tbl

Examples

1
sim_mixed_cc(10, 10)

faux documentation built on Sept. 14, 2021, 1:08 a.m.