CorrR | R Documentation |
This function obtains the correlation matrix of longitudinal data
CorrR(y, x, beta, n, k, corre)
y |
the longitudinal response. |
x |
a matrix of predictors, consisting of omics and environment factors, as well as their interactions. In the case study, the omics measurements are lipidomics data. |
beta |
the coefficient vector. |
n |
the sample size. |
k |
a vector that contains the number of repeated measurements for each subject. |
corre |
the working correlation structure that is used in estimation algorithm. interep provides three choices for the working correlation structure: "a" as "AR-1", "i" as "independence" and "e" as "exchangeable". |
the correlation matrix.
data("dat")
y=dat$y
n=dim(y)[1]
x=dat$x
data=reformat(y,x)
y=data$y
x=data$x
beta=dat$beta
corre='e'
k=rep(dat$k,n)
CorrR(y,x,beta,n,k,corre)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.