Gaussian_densities_const_Cpp function

Calculate log multivariate Gaussian densities

Calculate log multivariate Gaussian densities

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

Gaussian_densities_const_Cpp(obs, mean, cholcovmat)

Arguments

  • obs: a (T×dp)(T \times dp) matrix such that the i:th row contains the vector (yi1,...,yip)(y_{i-1}',...,y_{i-p}') ((dp)x1)((dp)x1), where yi=(y1i,...,ydi)y_{i}=(y_{1i},...,y_{di})

    (dx1)(dx1). That is, the initial values are included but the last observations not.

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

  • cholcovmat: the (dp×dp)(dp \times dp) covariance matrix that is the same for all observations.

Returns

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

Details

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

  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-02-27