Learn R Programming

BayesRGMM (version 2.2)

CorrMat.HSD: To compute the correlation matrix in terms of hypersphere decomposition approach

Description

The correlation matrix is reparameterized via hyperspherical coordinates angle parameters for trigonometric functions, and the angle parameters are referred to hypersphere (HS) parameters. In order to obtain the unconstrained estimation of angle parameters and to reduce the number of parameters for facilitating the computation, we model the correlation structures of the responses in terms of the generalized linear models

Usage

CorrMat.HSD(w, delta)

Arguments

w

a design matrix is used to model the HS parameters as functions of subject-specific covariates.

delta

an \(a \times 1\) vector of unknown parameters to model the HS parameters.

Value

a correlation matrix

References

Zhang:etal:2015BayesRGMM

Examples

Run this code
# NOT RUN {
library(BayesRGMM)
rm(list=ls(all=TRUE))
T = 5 #time points
HSD.para = c(-0.5,  -0.3) #the parameters in HSD model
a = length(HSD.para)
w = array(runif(T*T*a), c(T, T, a)) #design matrix in HSD model
signif(CorrMat.HSD(w, HSD.para), 4)
# }

Run the code above in your browser using DataLab