This is the basic computing engine called by pim
to get the estimates for the coefficients and the variance-
covariance matrices. This function currently only spits out
these components using the sandwich estimators.
pim.fit(
x,
y,
link = "logit",
estim = "estimator.nleqslv",
start = rep(0, ncol(x)),
vcov.estim = "sandwich.vcov",
weights = NULL,
penv,
...
)
a model matrix with as many rows as y
.
a vector with the pseudo-responses
a character vector with a link function
a character vector or a function indicating the solver
to be used for estimating the coefficients. By default this is
the function nleqslv
. Other possibilities are
given in the help page on estimators
.
A numeric vector with the starting values for the fitting algorithm, if required.
a function to determine the variance-covariance matrix.
Possibilities are sandwich.vcov
and link{score.vcov}
.
Defaults to sandwich.vcov
currently not implemented
An environment, pim.environment
or
pim.poset
object containing the poset functions.
Alternatively this can be a list of two numeric vectors, containing the
poset indices for the left and right side of the pim.
Further arguments that need to be passed to
the estimation function. The most relevant is construct
,
allowing you to write your own score function for
the numerical optimization. See also estimators
A list with the following elements
a numeric vector with the coefficients
a numeric matrix with the variance-covarianc matrix for the coefficients
a numeric vector with the raw fitted values
a list with two components named coef
and vcov
containing information on the used estimators for both.
model.matrix
for how to construct a valid model matrix
for a pim, pim
for the general user interface