CovMat.Design {samplingDataCRT} | R Documentation |
covariance matrix for the multivariate normal distributed variables
Description
covariance matrix of the normal distribution under cluster randomized study type given a design and a type
Usage
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
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)
[Package samplingDataCRT version 1.0 Index]