Function to fit a model among all possible
fit_model( x, model, fixXI, modeltype, x_lcc, MaxDist, Phi, Model, fix.lambda, lambda )
| x | data.frame or SpatialPointsDataFrame of observations with covariates |
|---|---|
| model | model formula written as character |
| fixXI | Power of the Tweedie model ( |
| modeltype | sub-model type |
| x_lcc | Projected version of x for kriging |
| MaxDist | Maximum distance for variogram ("Krige*" modeltype only) |
| Phi | Range for Phi fitting ("Krige*" modeltype only) |
| Model | Model type for variogram ("Krige*" modeltype only) |
| fix.lambda | logical, indicating whether the Box-Cox transformation parameter lambda should be regarded as fixed (fix.lambda = TRUE) or should be be estimated (fix.lambda = FALSE). Defaults to TRUE. |
| lambda | value of the Box-Cox transformation parameter lambda. Regarded as a fixed value if fix.lambda = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to 1. Two particular cases are lambda = 1 indicating no transformation and lambda = 0 indicating log-transformation. |