Covariance Matrices of Logit ETA {MixfMRI} | R Documentation |
Covariance Matrices of Logit ETA
Description
These functions computes covariance matrix of logit ETA.
Usage
cov.logit.ETA(x, fcobj, cov.param = NULL)
Arguments
x |
an input list of two elements |
fcobj |
a |
cov.param |
a covariance matrix of |
Details
These functions are required to compute covariance matrices of logit ETA.
Input the returns of cov.param()
to cov.logit.ETA()
to obtain the cov matrix for logit ETA
by the multivariate delta method on the cov matrix for parameters.
Value
A matrix.
Author(s)
Wei-Chen Chen and Ranjan Maitra.
References
Chen, W.-C. and Maitra, R. (2021) “A Practical Model-based Segmentation Approach for Accurate Activation Detection in Single-Subject functional Magnetic Resonance Imaging Studies”, arXiv:2102.03639.
See Also
EMCluster::lmt()
, lmt.I()
.
Examples
library(MixfMRI, quietly = TRUE)
.FC.CT$model.X <- "I"
.FC.CT$CONTROL$debug <- 0
K <- 3
.rem <- function(){
### Fit toy1.
set.seed(1234)
X.gbd <- toy1$X.gbd
X.range <- apply(X.gbd, 2, range)
X.gbd <- t((t(X.gbd) - X.range[1,]) / (X.range[2,] - X.range[1,]))
PV.gbd <- toy1$PV.gbd
fcobj <- fclust(X.gbd, PV.gbd, K = K, min.1st.prop = 0.5)
### Test cov matrix of posterior z.
x <- list(X.gbd = X.gbd, PV.gbd = PV.gbd)
post.z <- post.prob(x, fcobj)
cov.param <- cov.param(x, fcobj, post.z)
cov.logit.ETA <- cov.logit.ETA(x, fcobj, cov.param = cov.param$cov)
### Compute cov matrxi of eta_k - eta_1 for all k > 1.
A <- cbind(rep(-1, K - 1), diag(1, K - 1))
ETA <- fcobj$param$ETA
log.or <- log(ETA / (1 - ETA)) %*% t(A)
cov.log.or <- A %*% cov.logit.ETA %*% t(A)
}