simulate_data: Generate a data set using a 'study_parameters'-object

Description Usage Arguments Value Examples

Description

Generate a data set using a study_parameters-object

Usage

1
2
3
4
5
6
7
simulate_data(paras, n = 1)

## S3 method for class 'plcp'
simulate_data(paras, n = NULL)

## S3 method for class 'plcp_multi'
simulate_data(paras, n = 1)

Arguments

paras

An object created by study_parameters

n

Optional; specifies which row n should be used if object is a data.frame containing multiple setups.

Value

A data.frame with the simulated data in long form. With the following columns:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
p <- study_parameters(n1 = 11,
                      n2 = 10,
                      n3 = 4,
                      T_end = 10,
                      fixed_intercept = 37,
                      fixed_slope = -0.65,
                      sigma_subject_intercept = 2.89,
                      sigma_cluster_intercept = 0.6,
                      icc_slope = 0.1,
                      var_ratio = 0.03,
                      sigma_error = 1.5,
                      cor_subject = -0.5,
                      cor_cluster = 0,
                      cohend = 0.5)

d <- simulate_data(p)

powerlmm documentation built on May 2, 2019, 3:10 a.m.