An internal helper function that takes the design specification and a sample size to generate a single data frame representing all observations for one simulation run. It handles within-, between-, nested, and crossed factors.
.create_design_matrix(design, current_n, n_is_total = TRUE)A tibble (data frame) with predictor variables.
A PowRPriori_design object from define_design().
The sample size for which the design matrix should be generated.
A boolean that controls how current_n is interpreted. TRUE assumes that the whole sample used for the simulation should be size
current_n, FALSE assumes that current_n specifies the size of each cell as defined by design.