rspde_lme {rSPDE} | R Documentation |
rSPDE linear mixed effects models
Description
Fitting linear mixed effects model with latent Whittle-Matern models.
Usage
rspde_lme(
formula,
loc,
loc_time = NULL,
data,
model = NULL,
repl = NULL,
which_repl = NULL,
optim_method = "L-BFGS-B",
possible_methods = c("L-BFGS-B", "Nelder-Mead"),
use_data_from_graph = TRUE,
rspde_order = NULL,
mean_correction = FALSE,
previous_fit = NULL,
fix_coeff = FALSE,
model_options = list(),
smoothness_upper_bound = 4,
parallel = FALSE,
n_cores = parallel::detectCores() - 1,
optim_controls = list(),
improve_hessian = FALSE,
hessian_args = list(),
alpha = lifecycle::deprecated(),
nu = lifecycle::deprecated(),
beta = lifecycle::deprecated(),
starting_values_latent = lifecycle::deprecated(),
start_sigma_e = lifecycle::deprecated(),
start_alpha = lifecycle::deprecated(),
start_nu = lifecycle::deprecated(),
start_beta = lifecycle::deprecated(),
nu_upper_bound = lifecycle::deprecated()
)
Arguments
formula |
Formula object describing the relation between the response variables and the fixed effects. If the response variable is a matrix, each column of the matrix will be treated as a replicate. |
loc |
A vector with the names of the columns in |
loc_time |
For spatio-temporal models, the name of the column in |
data |
A |
model |
Object generated by |
repl |
Vector indicating the replicate of each observation.
If |
which_repl |
Which replicates to use? If |
optim_method |
The method to be used with |
possible_methods |
The optimization methods to try if the model fitting fails. |
use_data_from_graph |
Logical. Only for models generated from graphs from
|
rspde_order |
The order of the rational approximation to be used while fitting the model. If not given, the order from the model object will be used. Not used for spatio-temporal models. |
mean_correction |
If TRUE, use mean correction for intrinsic models. Default FALSE. |
previous_fit |
An object of class |
fix_coeff |
If using a previous fit, should all coefficients be fixed at the starting values? |
model_options |
A list containing additional options to be used in the model. This will take preference over the values extracted from previous_fit. Currently, it is possible to fix parameters during the estimation or change the starting values of the parameters. The general structure of the elements of the list is |
smoothness_upper_bound |
Upper bound for |
parallel |
logical. Indicating whether to use optimParallel or not. |
n_cores |
Number of cores to be used if parallel is true. |
optim_controls |
Additional controls to be passed to |
improve_hessian |
Should a more precise estimate of the hessian be obtained? Turning on might increase the overall time. |
hessian_args |
List of controls to be used if |
alpha |
|
nu |
|
beta |
|
starting_values_latent |
|
start_sigma_e |
|
start_alpha |
|
start_nu |
|
start_beta |
|
nu_upper_bound |
Value
A list containing the fitted model.