ordinaryDeviance(fm, dispersion = 1)RaoScoreStatistic(fm, X, dispersion = 1)
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).
profiling, prelim.profiling, profileModel.