Usage
fixedLRT(null.formula, formula, data, method, HLmethod = method, REMLformula=NULL, boot.repl=0, control=list(),control.boot=list(), fittingFunction = "corrHLfit", ...)
Arguments
null.formula
Either a formula
(as in glm
) or a predictor
(see Predictor
) for the null model.
formula
Either a formula
or a predictor
for the full model.
data
A data frame containing the variables in the model.
method
A method to fit the full and null models.
See HLfit
's HLmethod
argument for background information about such methods.
The two most meaningful values of method
in fixedLRT
calls are:
'ML'
for an LRT based on ML fits (generally recommended); and
'PQL/L'
for an LRT based on PQL/L fits (recommended for spatial binary data).
Also feasible, but more tricky, and not really recommended (see Rousset and Ferdy, 2014), is 'REML'
.
This will perform an LRT based on two REML fits of the data, *both* of which use the
same conditional (or restricted) likelihood of residuals for estimating dispersion parameters $\lambda$ and $\phi$ (see REMLformula
argument).
Further, REML will not be effective on a given dispersion parameter if a non-trivial init.corrHLfit value is provided for this parameter.
HLmethod
Kept for back-compatibility. Same as method
, but wll work only for fittingFunction=corrHLfit
.
REMLformula
a formula specifying the fixed effects which design matrix is used in the REML correction
for the estimation of dispersion parameters, if these are estimated by REML.
This formula is by default that for the *full* model.
boot.repl
the number of bootstrap replicates.
control
A set of control parameters for the fits of the data, mostly for development purposes. However, if an initial value is provided for a dispersion parameter, a better one may be sought if further control=list(prefits=TRUE)
(the effect appears small, however).
control.boot
Same as control
, but for the fits of the bootstrap replicates. Again, the option control.boot=list(prefits=TRUE)
may yield a small improvement in the fits, at the expense of more computation time.
fittingFunction
The function used to fit each model: either corrHLfit
or fitme
.
...
Further arguments passed to or from other methods; in particular, additional arguments passed to corrHLfit
, including mandatory ones such as data
and those ultimately passed to designL.from.Corr
. With respect to the latter, note that try.chol
affects the simulation of samples for the parametric bootstrap, and although ultimate differences in performance may be small, try.chol=FALSE
may be slightly better.