get_correlation_matrix: Calculate the subject-level (ICC) correlations among time...

Description Usage Arguments Details Value Examples

Description

Calculate the subject-level (ICC) correlations among time points

Usage

1
2
3
4
get_correlation_matrix(object)

## S3 method for class 'plcp_multi'
get_correlation_matrix(object)

Arguments

object

An object created by study_parameters

Details

The correlation between time point T_i and T_{i+1} within the same subject is also called the intraclass correlation (ICC) at level two. If the random slopes are non-zero this ICC change over time.

Value

A n1 x n1 matrix with the marginal subject-level correlations between time points.

Examples

1
2
3
4
5
6
7
8
9
paras <- study_parameters(n1 = 11,
                          n2 = 10,
                          n3 = 3,
                          T_end = 10,
                          icc_pre_subject = 0.5,
                          icc_pre_cluster = 0,
                          icc_slope = 0.05,
                          var_ratio = 0.03)
get_correlation_matrix(paras)

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