Learn R Programming

powertools (version 1.0.0)

crt.means.r: Correlation between a cluster mean at baseline and follow up

Description

For a cluster randomized trial with a continuous outcome, this function calculates the correlation between a cluster's mean at baseline and at follow up based on various inputs. For cross-sectional sampling of subjects, that is, different subjects are measured at baseline and follow up, specify sac = 0.

Usage

crt.means.r(m, icc, cac, sac)

Value

The computed correlation.

Arguments

m

The number of measurements in each cluster at baseline and follow up.

icc

The intraclass correlation coefficient.

cac

The cluster autocorrelation.

sac

The subject autocorrelation.

Examples

Run this code
crt.means.r(m = 30, icc = 0.05, cac = 0.4, sac = 0.5)

Run the code above in your browser using DataLab