Computation of target G ('knowledge-based constant correlation model').
targetG.Rd
The \(p \times p\) target G is computed from the \(n \times p\) data matrix. It is defined as follows (\(i,j = 1,...,p\)): $$t_{ij}=\left\{ $$$$\begin {array} {ll} $$$$s_{ii}\;&\mbox{if}\;i=j\\ $$$$\bar{r}\sqrt{s_{ii}s_{jj}}\;&\mbox{if}\;i\neq j, i\sim j\\ $$$$0\;&\mbox{otherwise} $$$$\end{array} $$$$\right.$$ where \(\bar{r}\) is the average of sample correlations and \(s_{ij}\) denotes the entry of the unbiased covariance matrix in row \(i\), column \(j\). The notation \(i\sim j\) means that genes \(i\) and \(j\) are connected, i.e. genes \(i\) and \(j\) are in the same gene functional group.
Arguments
- x
A \(n \times p\) data matrix.
- genegroups
A list of genes obtained using the database KEGG, where each entry itself is a list of pathway names this genes belongs to. If a gene does not belong to any gene functional group, the entry is NA.
References
J. Schaefer and K. Strimmer, 2005. A shrinkage approach to large-scale covariance matrix estimation and implications for functional genomics. Statist. Appl. Genet. Mol. Biol. 4:32.
M. Jelizarow, V. Guillemot, A. Tenenhaus, K. Strimmer, A.-L. Boulesteix, 2010. Over-optimism in bioinformatics: an illustration. Bioinformatics. Accepted.
See also
targetCor
, targetF
,
targetG
, targetGstar
, targetGpos
.
Examples
# A short example on a toy dataset
# require(SHIP)
data(expl)
attach(expl)
#> The following objects are masked from expl (pos = 3):
#>
#> genegroups, x
#> The following objects are masked from expl (pos = 4):
#>
#> genegroups, x
#> The following objects are masked from expl (pos = 5):
#>
#> genegroups, x
tar <- targetG(x,genegroups)
#> Error in targetG(x, genegroups): could not find function "targetG"
which(tar[upper.tri(tar)]!=0) # not many non zero coefficients !
#> Error in as.vector(x, mode): cannot coerce type 'closure' to vector of type 'any'