Covariance Matrices of Logit ETA | R Documentation |
These functions computes covariance matrix of logit ETA.
cov.logit.ETA(x, fcobj, cov.param = NULL)
x |
an input list of two elements |
fcobj |
a |
cov.param |
a covariance matrix of |
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.
A matrix.
Wei-Chen Chen and Ranjan Maitra.
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.
EMCluster::lmt()
, lmt.I()
.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.