Learn R Programming

powerlmm (version 0.4.0)

sim_formula_compare: Compare multiple simulation formulas

Description

This functions allows comparing multiple models fit to the same data set during simulation.

Usage

sim_formula_compare(...)

Arguments

...

Named formulas that should be compared, see Examples.

Value

Object with class plcp_compare_sim_formula

See Also

sim_formula

Examples

Run this code
# NOT RUN {
# Formulas can be a named character
# uses the defaults 'sim_formula()'
f <- sim_formula_compare("m0" = "y ~ time * treatment + (1 | subject)",
                         "m1" = "y ~ time * treatment + (1 + time | subject)")

# Can also use sim_formula()
f0 <- sim_formula("y ~ time * treatment + (1 | subject)")
f1 <- sim_formula("y ~ time * treatment + (1 + time | subject)")
f <- sim_formula_compare("m0" = f0, "m1" = f1)

# }

Run the code above in your browser using DataLab