# capReg: Covariate Assisted Principal Regression for Covariance Matrix... In neuroconductor-devel-releases/cap: Covariate Assisted Principal (CAP) Regression for Covariance Matrix Outcomes

## Description

This function identifies the first k projection directions that satisfies the log-linear model assumption.

## Usage

 1 2 3 capReg(Y, X, nD = 1, method = c("CAP", "CAP-C"), CAP.OC = FALSE, max.itr = 1000, tol = 1e-04, trace = FALSE, score.return = TRUE, gamma0.mat = NULL, ninitial = NULL) 

## Arguments

 Y a data list of length n. Each list element is a T\times p matrix, the data matrix of T observations from p features. X a n\times q data matrix, the covariate matrix of n subjects with q-1 predictors. The first column is all ones. nD an integer, the number of directions to be identified. Default is 1. method a character of optimization method. method = "CAP" considers a weighted L2-norm on the γ vector and solve for the optimizer by block coordinated descent; method = "CAP-C" assumes the complete common principal component assumption which identifies the common principal component first and then searches for the optimal PC. CAP.OC a logic variable. Whether the orthogonal constraint is imposed when identifying higher-order PCs. When method = "CAP-C", this is ignored. Default is FALSE. max.itr an integer, the maximum number of iterations. tol a numeric value of convergence tolerance. trace a logic variable. Whether the solution path is reported. Default is FALSE. score.return a logic variable. Whether the log-variance in the transformed space is reported. Default is TRUE. gamma0.mat a data matrix, the initial value of γ. Default is NULL, and initial value is randomly chosen. ninitial an integer, the number of different initial value is tested. When it is greater than 1, multiple initial values will be tested, and the one yields the minimum objective function will be reported. Default is NULL.

## Details

Considering y_{it} are p-dimensional independent and identically distributed random samples from a multivariate normal distribution with mean zero and covariance matrix Σ_{i}. We assume there exits a p-dimensional vector γ such that z_{it}:=γ'y_{it} satisfies the multiplicative heteroscedasticity:

\log(\mathrm{Var}(z_{it}))=\log(γ'Σ_{i}γ)=β_{0}+x_{i}'β_{1}

, where x_{i} contains explanatory variables of subject i, and β_{0} and β_{1} are model coefficients.

Parameters γ and β=(β_{0},β_{1}')' are study of interest, and we propose to estimate them by maximizing the likelihood function,

\ell(β,γ)=-\frac{1}{2}∑_{i=1}^{n}T_{i}(x_{i}'β)-\frac{1}{2}∑_{i=1}^{n}\exp(-x_{i}'β)γ'S_{i}γ,

where S_{i}=∑_{t=1}^{T_{i}}y_{it}y_{it}'. To estimate γ, we impose the following constraint

γ' Hγ=1,

where H is a positive definite matrix. In this study, we consider the choice that

For higher order projecting directions, an orthogonal constraint is imposed as well.

## Value

When method = "CAP",

 gamma the estimate of γ vectors, which is a p\times nD matrix. beta the estimate of β for each projecting direction, which is a q\times nD matrix, where q-1 is the number of explanatory variables. orthogonality an ad hoc checking of the orthogonality between γ vectors. DfD output of both average (geometric mean) and individual level of “deviation from diagonality”. score an output when score.return = TRUE. A n\times nD matrix of \log(\hat{γ}'S_{i}\hat{γ}) value.

When method = "CAP-C",

 gamma the estimate of γ vectors, which is a p\times nD matrix. beta the estimate of β for each projecting direction, which is a q\times nD matrix, where q-1 is the number of explanatory variables. orthogonality an ad hoc checking of the orthogonality between γ vectors. PC.idx a vector of length nD, the order index of identified γ vectors among all the common principal components. aPC.idx the order index of all the principal components that satisfy the log-linear model and the eigenvalue condition. minmax a logic output, whether the identified γ vectors are estimated from the minmax approach. If FALSE, indicating the eigenvalue condition is not satisfied for any principal component. score an output when score.return = TRUE. A n\times nD matrix of \log(\hat{γ}'S_{i}\hat{γ}) value.

## Author(s)

Yi Zhao, Johns Hopkins University, <[email protected]>

Bingkai Wang, Johns Hopkins University, <[email protected]>

Stewart Mostofsky, Johns Hopkins University, <[email protected]>

Brian Caffo, Johns Hopkins University, <[email protected]>

Xi Luo, Brown University, <[email protected]>

## References

Zhao et al. (2018) Covariate Assisted Principal Regression for Covariance Matrix Outcomes <doi:10.1101/425033>

## Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 ############################################# data(env.example) X<-get("X",env.example) Y<-get("Y",env.example) # method = "CAP" # without orthogonal constraint re1<-capReg(Y,X,nD=2,method=c("CAP"),CAP.OC=FALSE) # with orthogonal constraint re2<-capReg(Y,X,nD=2,method=c("CAP"),CAP.OC=TRUE) # method = "CAP-C" re3<-capReg(Y,X,nD=2,method=c("CAP-C")) ############################################# 

neuroconductor-devel-releases/cap documentation built on July 12, 2019, 12:35 p.m.