Description Usage Arguments Value Author(s) References Examples
getRho
is an implementation of the proposed moment estimator (see reference) for estimating the unknown correlation in repeated measurements. Based on the output from getRho
, the getSigma
function returns an estimated covariance matrix.
1 2 |
YY |
Vector or matrix of response values. If gene expression matrix, genes in columns and subjects in rows. |
xx |
Vector of covariate values. |
id |
Vector of subject IDs (for repeated measurements). |
weights |
Vector of a priori weights. If |
correction |
Logical value. If |
return.all |
Logical value. If |
The getSigma
function returns a variance-covariance matrix based on the correlation and weights.
The getRho
function returns the individual or average correlation estimate(s).
Yun Zhang, Xing Qiu
Zhang et al. (2019) Highly efficient hypothesis testing methods for regression-type tests with correlated observations and heterogeneous variance structure. BMC Bioinformatics, 20:185.
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(PBtest)
data(sim1)
## attach list elements to the global environment
list2env(sim1,globalenv())
rho.hat <- getRho(YY=simdat, xx=Grp, id=Subj, weights=ww)
rho.all <- getRho(YY=simdat, xx=Grp, id=Subj, weights=ww, return.all=TRUE)
## Given the true correlation is 0.2, the mean square error is
mse <- mean((rho.all-0.2)^2)
## Sigma matrix
Sigma <- getSigma(YY=simdat, xx=Grp, id=Subj, weights=ww)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.