lines 782-847 of file: lib/python/cppad_py/mixed.py {xrst_begin mixed_optimize_random} {xrst_spell ipopt } Optimize The Random Effects ########################### Syntax ****** {xrst_literal # BEGIN_OPTIMIZE_RANDOM # END_OPTIMIZE_RANDOM } Purpose ******* Given a value for the fixed effects :math:`\theta`, this routine maximizes the :ref:`mixed_ran_likelihood-title` with respect to the fixed effect :math:`u`; i.e., .. math:: \B{p} ( y | \theta , u ) \B{p}( u | \theta ) If there is no data, this routine maximizes :math:`\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 :math:`\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 :ref:`mixed_ctor@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 ******** {xrst_toc_list example/python/mixed/optimize_random_xam.py } {xrst_end mixed_optimize_random}