computeX2M1X2 {WALS}R Documentation

Internal function: Computes X2M1X2 for walsNB when SVD is applied to Z1

Description

Exploits the SVD of \bar{Z}_1 to compute \bar{X}_{2}^{\top} \bar{M}_{1} \bar{X}_{2} to avoid directly inverting \bar{Z}_{1}^{\top} \bar{Z}_{1}.

Usage

computeX2M1X2(
  X2,
  X2start,
  qStart,
  U,
  UellStart,
  ellStart,
  psiStart,
  gStart,
  epsilonStart,
  geB
)

Arguments

X2

Design matrix for auxiliary regressors

X2start

Transformed design matrix for auxiliary regressors. Refers to \bar{X}_{2} = \bar{\Psi}^{1/2} X_{2}.

qStart

Vector \bar{q}, see section "One-step ML estimator" of Huynh (2024a) for definition.

U

U of SVD of Z_1. See details.

UellStart

Vector U \bar{\ell}, see details.

ellStart

Vector \bar{\ell} see details.

psiStart

Diagonal matrix \bar{\Psi}, see section "One-step ML estimator" of Huynh (2024a) for definition.

gStart

Derivative of dispersion parameter \rho of NB2 with respect to \alpha = \log(\rho) evaluated at starting values of one-step ML. gStart is a scalar. See section "ML estimation" of Huynh (2024a).

epsilonStart

Scalar \bar{\epsilon}, see section "One-step ML estimator" of Huynh (2024a) for definition.

geB

\bar{g} \bar{\epsilon} / (1 + B). In code gStart*epsilonStart / (1+B). See details for definition of B. gStart is \bar{g} and epsilonStart is \bar{\epsilon}.

Details

See section "Simplification for computing \bar{X}_{2}^{\top} \bar{M}_{1} \bar{X}_{2}" in the appendix of Huynh (2024b) for details of the implementation and for the definitions of arguments Uellstart, ellStart, and geB.

All parameters that contain "start" feature the starting values for the one-step ML estimation of submodels. See section "One-step ML estimator" of Huynh (2024a) for details.

References

Huynh K (2024a). “Weighted-Average Least Squares for Negative Binomial Regression.” arXiv 2404.11324, arXiv.org E-Print Archive. doi:10.48550/arXiv.2404.11324.

Huynh K (2024b). “WALS: Weighted-Average Least Squares Model Averaging in R.” University of Basel. Mimeo.


[Package WALS version 0.2.5 Index]