CovMat.Design: covariance matrix for the multivariate normal distributed...

Description Usage Arguments Value Examples

View source: R/CovarianceMatrix.R

Description

covariance matrix of the normal distribution under cluster randomized study type given a design and a type

Usage

1
CovMat.Design(K, J, I, sigma.1.q, sigma.2.q = NULL, sigma.3.q)

Arguments

K

number of timepoints or measurments (design parameter)

J

number of subjects

I

number of clusters (design parameter)

sigma.1.q

variance of the lowest level (error variance or within subject variance)

sigma.2.q

secound level variance (e.g. within cluster and between subject variance), by default NULL and then a cross-sectional type

sigma.3.q

third level variance (e.g. between cluster variance)

Value

V covariance matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
K<-6  #measurement (or timepoints)
I<-10 #Cluster
J<-2 #number of subjects

sigma.1<-0.1
sigma.3<-0.9
CovMat.Design(K, J, I,sigma.1.q=sigma.1, sigma.3.q=sigma.3)

sigma.1<-0.1
sigma.2<-0.4
sigma.3<-0.9
CovMat.Design(K, J, I,sigma.1.q=sigma.1, sigma.2.q=sigma.2, sigma.3.q=sigma.3)

samplingDataCRT documentation built on May 2, 2019, 9:25 a.m.