gethats function

Calculates the Leverages for a GLM through a C Routine

Calculates the Leverages for a GLM through a C Routine

Calculates the leverages of a GLM through a C routine. It is intended to be used only within brglm.fit.

gethats(nobs, nvars, x.t, XWXinv, ww)

Arguments

  • nobs: The number of observations, i.e. dim(X)[1].
  • nvars: The number of parameters, i.e. dim(X)[1], where X is the model matrix, excluding the columns that correspond to aliased parameters.
  • x.t: t(X).
  • XWXinv: The inverse of the Fisher information.
  • ww: The working weights.

Returns

A vector containing the diagonal elements of the hat matrix.

Author(s)

Ioannis Kosmidis, ioannis.kosmidis@warwick.ac.uk

See Also

hatvalues, brglm.fit

  • Maintainer: Ioannis Kosmidis
  • License: GPL (>= 2)
  • Last published: 2021-04-22