Description Usage Arguments Details Value Author(s) References Examples
This function identifies the first k projection directions that satisfies the log-linear model assumption.
1 2 3 |
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. |
CAP.OC |
a logic variable. Whether the orthogonal constraint is imposed when identifying higher-order PCs. When |
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 |
score.return |
a logic variable. Whether the log-variance in the transformed space is reported. Default is |
gamma0.mat |
a data matrix, the initial value of γ. Default is |
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 |
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
H=\bar{Σ}, \quad \bar{Σ}=\frac{1}{n}∑_{i=1}^{n}\frac{1}{T_{i}}S_{i}.
For higher order projecting directions, an orthogonal constraint is imposed as well.
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 |
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 |
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 |
score |
an output when |
Yi Zhao, Johns Hopkins University, <zhaoyi1026@gmail.com>
Bingkai Wang, Johns Hopkins University, <bwang51@jhmi.edu>
Stewart Mostofsky, Johns Hopkins University, <mostofsky@kennedykrieger.org>
Brian Caffo, Johns Hopkins University, <bcaffo@gmail.com>
Xi Luo, Brown University, <xi.rossi.luo@gmail.com>
Zhao et al. (2018) Covariate Assisted Principal Regression for Covariance Matrix Outcomes <doi:10.1101/425033>
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"))
#############################################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.