Learn R Programming

sstvars (version 1.1.0)

Gaussian_densities_const_Cpp: Calculate log multivariate Gaussian densities

Description

Calculates logs of multivariate Gaussian densities with constant mean and constant covariance matrix AND EXCLUDING the constant term of the density (the constant is calculated and added in R code).

Usage

Gaussian_densities_const_Cpp(obs, mean, cholcovmat)

Value

a numeric vector containing the multivariate Gaussian densities, excluding the constant term.

Arguments

obs

a \((T \times dp)\) matrix such that the i:th row contains the vector \((y_{i-1}',...,y_{i-p}')\) \(((dp)x1)\), where \(y_{i}=(y_{1i},...,y_{di})\) \((dx1)\). That is, the initial values are included but the last observations not.

mean

the \(((dp)x1)\) mean vector, rep(all_mu[,m], times=p), that is the same for all observations.

cholcovmat

the \((dp \times dp)\) covariance matrix that is the same for all observations.

Details

This function is used in the relative density transition weights with Gaussian regimes.