Learn R Programming

hmmhdd (version 1.0)

dmdistr: Copula density Function for multivariate data

Description

This function returns the value of a multivariate density defined on a gaussian copula

Usage

dmdistr(x, params, corr = diag(ncol(x)), distr)

Arguments

x

a n x d matrix containing the multivariate data

params

a list of D elements corresponding to the matrices corresponding to the parameters:

corr

a matrix containing the correlation parameters of the multivariate distribution related to the states of the HMM;

distr

a vector containing the distribution for each component, "gaussian" for the normal distribution, "gamma" for the gamma distribution, "exp" for the exponential distribution

Value

The function returns a numeric value corresponding to the value of the density of the multivariate distribution where the dependence is computed using a copula.

References

Song, P. X.-K.(2000). Multivariate dispersion models generated from Gaussian copula. Scandinavian Journal of Statistics, 27(2), 305-320.

Examples

Run this code
# NOT RUN {
#Load the copuladata
data(copuladata)
params <- list(t(c(1.5, 1)), as.matrix(0.5))
corr <- cbind(c(1,0.7), c(0.7,1))
distr <- c("gaussian", "exp")

density <- dmdistr(copuladata, params = params, corr = corr, distr = distr)
# }

Run the code above in your browser using DataLab