Skip to contents

Computes the Hessian matrix (second derivatives with respect to \([\beta, \log\phi]\)) of the log-likelihood of the mean-precision Beta regression model documented in full at fast_beta_regression_cpp, at arbitrary caller-supplied parameters params (not necessarily the MLE). Exported standalone — independent of any optimizer run — for direct numerical diagnostics (e.g. checking curvature or building a custom variance estimate at a specific parameter value) and for use by get_beta_regression_score_cpp's sibling relationship in optimizer/inference code that needs both quantities at the same point.

Usage

get_beta_regression_hessian_cpp(X, y, params)

Arguments

X

A numeric matrix of predictors, as used to fit the model.

y

A numeric vector of responses in (0, 1).

params

A numeric vector \([\beta, \log\phi]\): the mean-model coefficients followed by the log-precision parameter.

Value

The \((p+1) \times (p+1)\) Hessian matrix of the log-likelihood (i.e. the negative of the observed information) at params.

See also

get_beta_regression_score_cpp for the corresponding gradient at the same point; fast_beta_regression_cpp for the full mean-precision Beta regression model documentation.