View source: R/utility_functions.R
reset_contrasts | R Documentation |
reset_contrasts()
makes sure that contrasts in the simulated
dataset equals the contrasts in the pilotdata used for simulation.
Because the simulate_sanplesize function loses specified contrasts,
they need to be re-specified.
reset_contrasts()
checks all contrasts on the fixed-effect-variables
in the pilot dataset and copies them to the simulated dataset.
reset_contrasts(simulated_data, data, model, fixed_effects)
simulated_data |
simulated data set (= output of simulate_samplesize) |
data |
pilot data used for power simulation |
model |
mixed model used for power simulation. Needs to fit data. |
fixed_effects |
names of variables in data that are used as fixed effects in model |
Date frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.