---------------------------------------------- lines 6-45 of file: example/user/no_random.cpp ---------------------------------------------- {xrst_begin no_random.cpp} No Random Effects: Example and Test ################################### Model ***** .. math:: \B{p}( z_i | \theta ) \sim \B{N} ( \theta_i , 1 ) .. math:: \B{p}( \theta_i ) \sim \B{N} ( 0 , 1 ) The corresponding fixed likelihood :ref:`g(theta)` is .. math:: g( \theta ) = \frac{1}{2} \sum_{i} \left[ \log ( 2 \pi ) + \theta_i^2 + \log ( 2 \pi ) + ( z_i - \theta_i )^2 \right] The optimal solution (with no constraints) is .. math:: \hat{\theta}_i = z_i / 2 {xrst_literal // BEGIN C++ // END C++ } {xrst_end no_random.cpp}