TMB Documentation  v1.9.11
Classes | Functions
density Namespace Reference
Multivariate distributions

Collection of multivariate Gaussian distributions (members listed in density.hpp) More...

Classes

class   AR1_t
  Stationary AR1 process. More...
 
class   ARk_t
  Stationary AR(k) process. More...
 
class   contAR2_t
  Continuous AR(2) process. More...
 
class   GMRF_t
  Gaussian Markov Random Field. More...
 
class   MVNORM_t
  Multivariate normal distribution with user supplied covariance matrix. More...
 
class   N01
  Standardized normal distribution. More...
 
class   PROJ_t
  Projection of multivariate gaussian variable. More...
 
class   SCALE_t
  Apply scale transformation on a density. More...
 
class   SEPARABLE_t
  Separable extension of two densitites. More...
 
  Multivariate normal distribution with unstructered correlation matrix. More...
 
class   VECSCALE_t
  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 >
MVNORM_t< scalartype >  MVNORM (matrix< scalartype > Sigma, bool use_atomic=true)
  Construct object to evaluate multivariate zero-mean normal density with user supplied covariance matrix. More...
 
template<class distribution1 , class distribution2 >
SEPARABLE_t< distribution1, distribution2 >  SEPARABLE (distribution1 f_, distribution2 g_)
  Construct object to evaluate the separable extension of two multivariate zero-mean normal densities. See SEPARABLE_t for details. More...
 
template<class scalartype >
UNSTRUCTURED_CORR_t< scalartype >  UNSTRUCTURED_CORR (vector< scalartype > x)
  Construct object to evaluate the density with unstructured correlation matrix. See UNSTRUCTURED_CORR_t for details.
 
template<class vectortype , class distribution >
VECSCALE_t< distribution >  VECSCALE (distribution f_, vectortype scale_)
  Construct object to evaluate a scaled density. See VECSCALE_t for details.
 

Detailed Description

Collection of multivariate Gaussian distributions (members listed in density.hpp)

For use of the namespace see Multivariate distributions

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 >
MVNORM_t<scalartype> density::MVNORM ( matrix< scalartype >  Sigma,
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:

MVNORM(Sigma)(x);

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:

PARAMETER_ARRAY(x); // 2D array
SEPARABLE(AR1(phi), MVNORM(Sigma))(x);

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.

License: GPL v2

AltStyle によって変換されたページ (->オリジナル) /