Learn R Programming

pim (version 2.0.2)

vcov.estimators: vcov estimators for pim

Description

sandwich.vcov and score.vcov are two similar estimators for the variance-covariance matrix of a probabilistic index model. These functions are meant to be used within a call to pim as a value for the argument vcov.

Usage

sandwich.vcov(fitted, X, Y, W, link, poset, ...)

score.vcov(fitted, X, Y, W, link, poset, ...)

Arguments

fitted

The fitted values (calculated as X %*% coef with X the design matrix and coef the coefficients)

X

the design matrix

Y

a numeric vector with pseudoresponses

W

a numeric vector with weights. If weights are not applicable, set to NULL (the default)

link

a character vector with the link function

poset

a list with the left and right indices. See poset for more information.

...

arguments passed to downstream methods.

Value

the variance-covariance matrix

Details

You can create your own estimating functions for the variance-covariance matrix. To do so, you have to make sure that your function allows for the exact same arguments. As the function pim.fit calculates the fitted values already, there's no need to incorporate the calculation of these inside the function.

See Also

sandwich.estimator for more information on the actual fitting process. pim for a few examples in how these are used