update.plcp: Update a 'study_parameters'-object with new settings

View source: R/setup.R

update.plcpR Documentation

Update a study_parameters-object with new settings

Description

Update a study_parameters-object with new settings

Usage

## S3 method for class 'plcp'
update(object, ...)

Arguments

object

An object created by study_parameters

...

Any number of named arguments that should be updated

Details

Currently only the arguments used to construct the original object can be updated.

Examples

p <- study_parameters(n1 = 11,
                      n2 = 10,
                      n3 = 3,
                      T_end = 10,
                      icc_pre_subject = 0.5,
                      icc_pre_cluster = 0,
                      var_ratio = 0.03,
                      icc_slope = 0.05,
                      cohend = -0.8)

p <- update(p, icc_slope = 0.1)
get_ICC_slope(p)

## Not run: 
# Using a "new" argument does not work (yet)
update(p, sigma_cluster_slope = 2)

## End(Not run)

rpsychologist/powerlmm documentation built on May 11, 2023, 12:24 a.m.