pystra.integration.drho0_dtheta#
- drho0_dtheta(rho0, margi, margj, Z1, Z2, X1, X2, WIP, detJ, var_idx, param)[source]#
Sensitivity of the modified correlation to a marginal parameter.
Solves Eq. (23) of Bourinet (2017) for \(\partial\rho_{0,ij}/\partial\theta_k\) by setting \(\partial\rho_{ij}/\partial\theta_k = 0\) (physical correlation is fixed) and using Eq. (21) for the denominator:
\[\frac{\partial\rho_{0,ij}}{\partial\theta_k} = -\frac{\displaystyle\int\!\!\int \frac{\partial h}{\partial\theta_k}\,\varphi_2\, \mathrm{d}z_i\,\mathrm{d}z_j} {\displaystyle\frac{\partial\rho_{ij}} {\partial\rho_{0,ij}}}\]The derivative \(\partial h/\partial\theta_k\) uses the general formula derived from \(h = (X - \mu)/\sigma\):
\[\frac{\partial h}{\partial\theta_k} = \frac{1}{\sigma}\!\left( \frac{\partial X}{\partial\theta_k} - \frac{\partial\mu}{\partial\theta_k}\right) - \frac{h}{\sigma}\, \frac{\partial\sigma}{\partial\theta_k}\]For
"mean"this reduces to \((\partial X/\partial\mu - 1)/\sigma\) and for"std"to \(\partial X/\partial\sigma / \sigma - h/\sigma\). For any other parameter (e.g. a shape parameter), the moment derivatives \(\partial\mu/\partial\theta\) and \(\partial\sigma/\partial\theta\) are obtained fromDistribution._dmoments_dtheta().- Parameters:
rho0 (float) – Modified correlation coefficient for this pair.
margi (Distribution) – Marginal distributions of variables i and j.
margj (Distribution) – Marginal distributions of variables i and j.
Z1 – Quadrature grid from
zi_and_xi().Z2 – Quadrature grid from
zi_and_xi().X1 – Quadrature grid from
zi_and_xi().X2 – Quadrature grid from
zi_and_xi().WIP – Quadrature grid from
zi_and_xi().detJ – Quadrature grid from
zi_and_xi().var_idx ({0, 1}) – Which variable the parameter belongs to (0 → margi, 1 → margj).
param (str) – Parameter name — any key from the distribution’s
sensitivity_params(e.g."mean","std","shape").
- Returns:
\(\partial\rho_{0,ij}/\partial\theta_k\).
- Return type:
float