mixed_ctor#

View page source

Mixed Class Constructor#

Syntax#

   # mixed_obj = cppad_py.mixed(
      fixed_init       = None,
      random_init      = None,
      quasi_fixed      = False,
      bool_sparsity    = False,
      A_rcv            = None,
      warning          = None,
      fix_likelihood   = None,
      fix_constraint   = None,
      ran_likelihood   = None,
   # )

mixed_obj#

We refer to the value returned by this constructor as mixed_obj.

fixed_init#

is a numpy vector with float elements. It specifies a value of the fixed effects for which the likelihood and prior functions can be evaluated and is used to initialize mixed_obj. This vector must be non-empty and the default value None is not valid.

n_fixed#

We use the notation n_fixed for the length of fixed_init .

random_init#

is a numpy vector with float elements. It specifies a value of the random effects for which the likelihood and prior functions can be evaluated and is used to initialize mixed_obj. The default value for this argument None corresponds to the empty vector.

n_random#

We use the notation n_random for the length of random_init .

quasi_fixed#

is True (False) if a quasi-Newton method (Newton method) is used to optimize the fixed effects. The Newton method requires computation of second derivatives.

bool_sparsity#

is True (False) if CppAD should use boolean sparsity patterns (set sparsity patterns) for its internal calculations

A_rcv#

Is a sparse_rcv representation of the random constraint matrix \(A\); i.e. \(A \cdot \hat{u} ( \theta ) = 0\) where \(\hat{u} ( \theta )\) is the optimal random effects as a function of the fixed effects. The value None corresponds to no random constraint.

warning#

is a python function that gets called when mixed_obj has a warning to report; see Mixed Class Warnings. The value None corresponds to ignoring all warning messages.

fix_likelihood#

see Fixed Effects Likelihood . The value None corresponds to no fixed effects likelihood.

fix_constraint#

see Fixed Effects Constraint Function . The value None corresponds to no constraint function for the fixed effects (one can still have bound constraints).

ran_likelihood#

see Random Effects Likelihood . The value None corresponds to no random effects likelihood.

Example#

mixed_ctor_xam.py