Learn R Programming

COMPoissonReg (version 0.3.5)

CMPLeverage: Computes leverage for each record

Description

Computes leverage for each record, for purpose of detecting influential records.

Usage

CMPLeverage(x, y, betahat, nuhat, max)

Arguments

x
matrix of size n by p
y
column vector of length n
betahat
Maximum likelihood estimate for beta vector
nuhat
Maximum likelihood estimate for nu
max
maximum number to use for truncating infinite sums

Value

Details

Leverage computes the Hat matrix: H = W^(1/2) X (X'WX)^-1 X'W^(1/2) , where X is the design matrix and W is the weight matrix defined in Shmueli and Sellers (2009). The leverage for record i is then given by the i^(th) diagonal element of H. Note that, like in other non-linear models, H depends not only on the covariate values X but also on the estimated parameters (in W).

References

A Flexible Regression Model for Count Data, by Sellers & Shmueli, http://ssrn.com/abstract=1127359

See Also

ExactDeviance