mixed_optimize_random#

View page source

Optimize The Random Effects#

Syntax#

   # random_opt = mixed_obj.optimize_random(
      random_ipopt_options = None ,
      fixed_vec            = None ,
      random_lower         = None ,
      random_upper         = None ,
      random_in            = None ,
   # )

Purpose#

Given a value for the fixed effects \(\theta\), this routine maximizes the Random Effects Likelihood with respect to the fixed effect \(u\); i.e.,

\[\B{p} ( y | \theta , u ) \B{p}( u | \theta )\]

If there is no data, this routine maximizes \(\B{p} ( u | \theta )\).

Argument Types#

The argument random_ipopt_options has type str. All the other arguments are numpy vectors with elements of type float.

fixed_vec#

has length n_fixed and is the value of the fixed effects \(\theta\) in the objective function. This vector can’t be None.

random_lower (random_upper)#

has length n_random and is the lower (upper) limit for the random effects. As a lower (upper) limit, the value None is minus (plus) infinity; i.e., no lower (upper) limit.

random_in#

has length n_random and is the initial value used during optimization of the random effects. If random_in is None the value random_init is used; see random_init .

random_opt#

The return value random_opt is a numpy vector, with length n_random an elements of type float, that maximizes the random likelihood with respect to the random effects.

Examples#