\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\W}[1]{ \; #1 \; }\)
fix_likelihood¶
View page sourceUser Defined Fixed Likelihood Function¶
Syntax¶
vec = mixed_object . fix_likelihood ( fixed_vec )
mixed_object¶
We use mixed_object
to denote an object of a class that is
derived from the cppad_mixed base class.
a1_double¶
see a1_double .
Virtual Function¶
The following virtual function may be implemented in the derived class:
virtual CppAD::vector<a1_double> fix_likelihood (const CppAD::vector<a1_double>& fixed_vecfixed_vec¶
This argument has prototype
const CppAD::vector<a1_double>&fixed_vec
It contains a value for the fixed effects vector.
vec¶
This result has prototype
CppAD::vector<a1_double > vec
It is a Negative Log-Density Vector corresponding to the fixed likelihood g(theta) where
constant¶
Adding or subtracting a constant to vec [0] , that does not depend on the fixed effects \(\theta\), does not affect the optimal estimates for the fixed or random effects.
Default¶
The base class definition (default) for fix_likelihood
returns an empty vector;
i.e., vec . size () == 0 .
This corresponds to the case where:
Example¶
The file fix_likelihood.cpp contains an example and test of defining this virtual function. It returns true, if the test passes, and false otherwise.