Objectives to be used in profileModel.
ordinaryDeviance(fm, dispersion = 1)RaoScoreStatistic(fm, X, dispersion = 1)
the restricted fit.
the model matrix of the fit on all parameters.
the dispersion parameter.
A scalar.
The objectives used in profileModel have to be functions of the
restricted fit. Given a fitted object, the restricted fit is an
object resulted by restricting a parameter to a specific value and
then estimating the remaining parameters. Additional arguments
could be used and are passed to the objective matching the … in
profileModel
or in other associated functions. An objective
function should return a scalar which is the value of the objective at the
restricted fit.
The construction of a custom objective should follow the above simple
guidelines (see also Example 3 in profileModel
and the
sources of either ordinaryDeviance
or RaoScoreStatistic
).
ordinaryDeviance
refers to glm
-like objects. It takes as
input the restricted fit fm
and optionally the value of the
dispersion parameter and returns the deviance corresponding to the
restricted fit divided by dispersion
.
RaoScoreStatistic
refers to glm
-like objects. It returns
the value of the Rao score statistic
\(s(\beta)^Ti^{-1}(\beta)s(\beta)/\phi\), where \(s\) is the vector of
estimating equations, \(\phi\) is the dispersion parameter and
$$i(\beta) = cov(s(\beta)) = X^T W(\beta) X/\phi ,$$
in standard GLM notation. The additional argument X
is
the model matrix of the full (not the restricted) fit. In this
way the original fit has always smaller or equal Rao score statistic
from any restricted fit. The Rao score statistic could be used for the
construction of confidence intervals when quasi-likelihood estimation
is used (see Lindsay and Qu, 2003).
Lindsay, B. G. and Qu, A. (2003). Inference functions and quadratic score tests. Statistical Science 18, 394--410.