Learn R Programming

powerlmm (version 0.4.0)

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

Description

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

Usage

get_correlation_matrix(object)

# S3 method for plcp_multi get_correlation_matrix(object)

Arguments

object

An object created by study_parameters

Value

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

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.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab