Collection of multivariate Gaussian distributions (members listed in density.hpp)
More...
Classes
Gaussian Markov Random Field.
More...
Multivariate normal distribution with user supplied covariance matrix.
More...
Standardized normal distribution.
More...
Projection of multivariate gaussian variable.
More...
Apply scale transformation on a density.
More...
Separable extension of two densitites.
More...
Multivariate normal distribution with unstructered correlation matrix.
More...
Apply a vector scale transformation on a density.
More...
Functions
template<class scalartype >
GMRF_t< scalartype >
GMRF (Eigen::SparseMatrix< scalartype > Q, int
order, bool normalize=true)
Construct object to evaluate density of Gaussian Markov Random Field (GMRF) for sparse Q.
More...
template<class scalartype >
Construct object to evaluate multivariate zero-mean normal density with user supplied covariance matrix.
More...
template<class distribution1 , class distribution2 >
Construct object to evaluate the separable extension of two multivariate zero-mean normal densities. See
SEPARABLE_t for details.
More...
template<class scalartype >
Construct object to evaluate the density with unstructured correlation matrix. See
UNSTRUCTURED_CORR_t for details.
template<class vectortype , class distribution >
Construct object to evaluate a scaled density. See
VECSCALE_t for details.
Detailed Description
Function Documentation
§ GMRF()
template<class scalartype >
GMRF_t<scalartype> density::GMRF
(
Eigen::SparseMatrix< scalartype >
Q,
int
order,
bool
normalize = true
)
Construct object to evaluate density of Gaussian Markov Random Field (GMRF) for sparse Q.
For detailed explanation of GMRFs see the class definition GMRF_t
- Parameters
-
Q precision matrix
order Convolution order, i.e. the precision matrix is Q^order (matrix product)
normalize Add normalizing constant ?
- Examples:
- spde.cpp, spde_aniso.cpp, spde_aniso_speedup.cpp, and TMBad/spde_epsilon.cpp.
Definition at line 934 of file density.hpp.
§ MVNORM()
template<class scalartype >
bool
use_atomic = true
)
Construct object to evaluate multivariate zero-mean normal density with user supplied covariance matrix.
- Parameters
-
Sigma Positive definite covariance matrix.
use_atomic Determines if "atomic functions" are used for the linear algebra (default).
Shortform version for working with the density of the MVNORM_t distribution (C++ class). Typical use:
where Sigma is a covariance matrix. The part MVNORM(Sigma) creates an object of MVNORM_t, which is then evaluated by the part (x).
- Examples:
- multivariate_distributions.cpp, and sdv_multi.cpp.
Definition at line 208 of file density.hpp.
§ SEPARABLE()
template<class distribution1 , class distribution2 >
SEPARABLE_t<distribution1,distribution2> density::SEPARABLE
(
distribution1
f_,
distribution2
g_
)
Construct object to evaluate the separable extension of two multivariate zero-mean normal densities. See SEPARABLE_t for details.
- Parameters
-
f_ First density object.
g_ Second density object.
Shortform version to combine two densities using the class SEPARABLE_t . Typical use:
where MVNORM(Sigma) acts in the first dimension of x and AR1(phi) acts in the second dimension of x.
- Note
- The order of array dimensions is reversed in the sense that f_ acts in the second dimension and g_ acts in the first dimension (This order is consistent with how Kronecker products work in R).
Definition at line 1247 of file density.hpp.