f2_logit_ETA: Covariance Matrices of Logit ETA

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

These functions computes covariance matrix of logit ETA.

Usage

1

Arguments

x

an input list of two elements X.gbd and PV.gbd.

fcobj

a fclust object.

cov.param

a covariance matrix of dim = d * d for parameters, which is also a return of cov.param(). d is total number of parameters which is dependent on data and models.

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

http://maitra.public.iastate.edu/

See Also

EMCluster::lmt(), lmt.I().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(MixfMRI, quietly = TRUE)
.FC.CT$model.X <- "I"
.FC.CT$CONTROL$debug <- 0
K <- 3
  

  ### 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)

MixfMRI documentation built on April 26, 2018, 5:03 p.m.