TMB Documentation  v1.9.10
Public Member Functions | List of all members
density::VECSCALE_t< distribution > Class Template Reference

Apply a vector scale transformation on a density. More...

#include <density.hpp>

Public Member Functions

scalartype operator() (arraytype x)
 Evaluate the negative log density.
 

Detailed Description

template<class distribution>
class density::VECSCALE_t< distribution >

Apply a vector scale transformation on a density.

Assume x has density f. Construct the density of y=scale*x where scale is a vector.

Parameters
f_distribution
scale_vector
Remarks
To scale the standard deviations of a unit-variance multivariate normal distribution of class UNSTRUCTURED_CORR_t:
vector<Type> Lx(6);
UNSTRUCTURED_CORR_t<Type> nll(Lx);
vector<Type> sds(4);
sds.fill(2.0); // Set all standard deviations to 2.0
res = VECSCALE_t(nll,sds)(x);
Another application is to scale the variance of a unit-variance AR(1) process; see AR1_t .
Examples:
mvrw_sparse.cpp.

Definition at line 1019 of file density.hpp.


The documentation for this class was generated from the following file:
License: GPL v2