The fitting functions allow some parameters to be fixed rather than estimated, by way of etaFix
(linear predictor coefficents) for all fitting functions, of the fixed
argument for all (co-)variance parameters in fitme
, of ranFix
(random-effect and residual dispersion parameters) in HLfit
and corrHLfit
, and of ranPars
in HLCor
. The diversity of names may be confusing, but keep in mind that ranFix
allows one to fix parameters that HLfit
and corrHLfit
would otherwise estimate, while ranPars
can be used to set required parameters for HLCor
, which it would otherwise be unable to estimate (e.g., Matern correlation parameters).
Each of these arguments is a list.
ranFix
elements taken into account by HLfit
include phi
(variance of residual error, for gaussian and Gamma HGLMs), lambda
(random-effect variances), and ranCoefs
(variance-correlation information for random-coefficient terms). To assign values for only some random-effect terms, lambda
and ranCoefs
can be incomplete, e.g. lambda=c(NA,1)
or lambda=c("2"=1)
(note the name) to assign a value only to the variance of the second of two random effects.
ranCoefs
is a list
of numeric vectors, each numeric vector specifying the variance and correlation parameters for a random-coefficient term. This input matches the printed summary of a fit. The elements must be given in the order of the lower.tri
of a covariance matrix, as shown e.g. by
m2 <- matrix(NA, ncol=2,nrow=2); m2[lower.tri(m2,diag=TRUE)] <- seq(3); m2
.
For example, to assign variances values 3 and 7, and correlation value -0.05, to a second random effect, one can use ranCoefs=list("2"=c(3,-0.05,7))
(note the name).
Additional ranFix
elements are taken into account by corrHLfit
, as follows.
For the Mat<U+00E9>rn model, these are the correlation parameters are rho
(scale parameter(s)), nu
(smoothness parameter), and (optional) Nugget
(see Matern
). The rho
parameter can itself be a vector with different values for different geographic coordinates.
For the adjacency
model, the only correlation parameter is a scalar rho
(see adjacency
).
For the AR1
model, the only correlation parameter is a scalar ARphi
(see AR1
).
ranPars
elements taken into account by HLCor
include all the above ranFix
elements.
The only etaFix
element considered here is beta
, which should be a vector of (a subset of) the coefficients (\(\beta\)) of the fixed effects, with names as shown in a fit without such given values. In contrast to an offset specification, it affects by default the REML correction for estimation of dispersion parameters, which depends only on which \(\beta\) coefficients are estimated rather than given. This default behaviour will be overridden whenever a non-null REMLformula
is provided to HLfit
or the other fitting functions (see Example).
fixed
elements taken into account by fitme
include all the above ranFix
and etaFix
elements.