get_inits_from_fit {spaMM} | R Documentation |
Initiate a fit from another fit
Description
get_inits_from_fit
is an extractor of some fitted values from a fit in a convenient format to initiate a next fit.
Usage
get_inits_from_fit(from, template = NULL, to_fn = NULL, inner_lambdas=FALSE)
Arguments
from |
Fit object (inheriting from class |
template |
Another fit object. Usage with a |
to_fn |
NULL or character: the name of the function to be used the next fit. If NULL, taken from |
inner_lambdas |
Boolean;
Whether the output should include estimates of the dispersion parameters estimated by the iterative methods implemented in |
Value
A list with elements
init , init.corrHLfit |
(depending on the fitting function) giving initial values for outer-optimization; |
init.HLfit |
giving initial values for the iterative algorithms in
|
See Also
get_ranPars
and VarCorr
.
Examples
## Not run:
data("blackcap")
(corrhlfit <- corrHLfit(migStatus ~ means+ Matern(1|longitude+latitude),data=blackcap,
method="ML"))
inits <- get_inits_from_fit(corrhlfit, to_fn = "fitme")
(fitfit <- fitme(migStatus ~ means+ Matern(1|longitude+latitude),data=blackcap,
init=inits[["init"]]))
inits <- get_inits_from_fit(corrhlfit, template = fitfit)
fitme(migStatus ~ means+ Matern(1|longitude+latitude),data=blackcap,
init=inits[["init"]])
# In these examples, inits$init.HLfit is useless
# as it is ignored when LMMs are fitted by fitme().
## End(Not run)