Learn R Programming

kernDeepStackNet (version 2.0.2)

calcWdiag: Calculation of weight matrix

Description

Calculates the weight matrix in the pseudo iterative reweighted least squares step of a generalized linear model. It is based on the variance function and the first derivative of the link function. The values are calculated at the actual expected values. The dimension of the matrix is n x n (n = number of observations). For details see reference.

Usage

calcWdiag(varMu, gDerivMu)

Arguments

varMu

Value of the variance function of the exponential family on the expected value mu (numeric scalar).

gDerivMu

Value of the first derivative of the link function evaluated at the expected value. (numeric scalar).

Value

Weight matrix (numeric vector).

References

Simon N. Wood, (2006), Generalized Additive Models: An Introduction with R, Taylor \& Francis Group LLC

See Also

calcTrA, varMu, gDerivMu