Description Usage Arguments Value Examples
View source: R/CovarianceMatrix.R
covariance matrix of the normal distribution under cluster randomized study type given a design and a type
1 | CovMat.Design(K, J, I, sigma.1.q, sigma.2.q = NULL, sigma.3.q)
|
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) |
V covariance matrix
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.