# Objectives to be profiled

### Description

Objectives to be used in profileModel.

### Usage

1 2 3 | ```
ordinaryDeviance(fm, dispersion = 1)
RaoScoreStatistic(fm, X, dispersion = 1)
``` |

### Arguments

`fm` |
the |

`X` |
the model matrix of the fit on all parameters. |

`dispersion` |
the dispersion parameter. |

### Details

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(β)^Ti^{-1}(β)s(β)/φ*, where *s* is the vector of
estimating equations, *φ* is the dispersion parameter and

*i(β) = cov(s(β)) = X' W(β) X/φ ,*

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).

### Value

A scalar.

### Note

Because the objective functions are evaluated many times in
`profiling`

, `prelim.profiling`

and
`profileModel`

, they should be as computationally
efficient as possible.

### Author(s)

Ioannis Kosmidis <email: ioannis@stats.ucl.ac.uk>

### References

Lindsay, B. G. and Qu, A. (2003). Inference functions and quadratic
score tests. *Statistical Science* **18**, 394–410.

### See Also

`profiling`

, `prelim.profiling`

, `profileModel`

.