------------------------------------------------ lines 5-98 of file: xrst/model/random_value.xrst ------------------------------------------------ {xrst_begin random_value} {xrst_spell ll } The Random Effects Value Density Function ######################################### u_j *** We use :math:`u_j` to denote one component of the :ref:`random effects` vector. prior_id ******** We use *prior_id* for the prior that is attached to the *j*-th random effect; see :ref:`model_variables@Prior for a Variable` . lambda_j ******** We use :math:`\lambda_j` to denote the :ref:`smooth_table@mulstd_value_prior_id` multiplier for the :ref:`smooth_table@smooth_id` corresponding to :math:`u_j`. mu_j **** We use :math:`\mu_j` to denote the :ref:`prior_table@mean` corresponding to *prior_id* . epsilon_j ********* We use :math:`\sigma_j` to denote the :ref:`prior_table@std` corresponding to *prior_id* . eta_j ***** We use :math:`\eta_j` to denote the :ref:`prior_table@eta` corresponding to *prior_id* . d_j *** We use :math:`d_j` to denote the :ref:`prior_table@density_id` corresponding to *prior_id* . In an abuse of notation, we include :ref:`prior_table@eta` and :ref:`eta` in *d_j* ; see :ref:`statistic@Notation@d` . delta_j ******* We use :math:`\delta_j` to denote the transformed standard deviation corresponding to *prior_id* .. math:: \delta_j = \left\{ \begin{array}{ll} \log ( \mu_j + \eta_j + \sigma_j ) - \log( \mu_j + \eta_j ) & \R{if \; log \; density} \\ \sigma_j & \R{otherwise} \end{array} \right. V_j^u ***** The value density for the *j*-th component of :math:`u` is .. math:: V_j^u ( u | \theta ) = \exp \left[ D \left( u_j \W{,} \mu_j \W{,} \lambda_j \delta_j \W{,} d_j \right) \right] where :math:`D` is the :ref:`log-density function` . V^u *** Let :math:`n` be the number of random effects. The value density for all the random effects :math:`u` is defined by .. math:: V^u ( u | \theta ) = \prod_{j=0}^{n-1} V_j^u ( u | \theta ) {xrst_end random_value}