Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/flexgam_start.R
Controls if the values of the control parameters are correct. If any control parameters are missing those are set to default. For internal use only.
1 |
control |
List of control parameters or NULL. |
formula |
Formula of the model to calculate the initial smoothing parameters. |
data |
Data of the model to calculate the initial smoothing parameters. |
Controls if the values of the control parameters are correct. If control parameters are missing they are set to default:
"max_iter_in"
= 100
Maximal number of inner iterations.
"max_iter_out"
= 100
Maximal number of outer iterations.
"delta_in"
= 1e-06
Convergence of inner iterations.
"delta_out"
= 1e-06
Convergence of outer iterations.
"min_mu_k"
= 1e-06
Minimal value of the fitted value. Also used to generate the upper limit for binomial data. Used to truncate the fitted values for numeric stability. (Occurrence can be read in the details).
"min_Psi_d"
= 1e-06
Minimal value of the derivative of the outer function. Used to truncate the derivatives for numeric stability. (Occurrence can be read in the details).
"min_increase"
= 1e-04
Minimal increase of the outer function.
"delta_halving"
= 1e-06
Minimal difference at step-halving.
"min_iter_halving_in"
= 1
From which inner iteration should step halving be possible?
"min_iter_halving_out"
= 2
From which outer iteration the deviance stopping criterion should be applied? The minimum value is 2, to get the algorithm always starting.
"opt_function"
= "optim"
Which optimization function should be used to optimize the smoothing parameters? (nlminb
or optim(Nelder-Mead)
)
"initial_sm"
= TRUE
Should the smoothing parameters of the standard mgcv::gam
be used as initial values for the covariates smoothing parameters and a grid search be applied to get initial values for the smoothing parameter of the outer function?
"fix_smooth"
= FALSE
Should the initial smoothing parameters (sm_par_vec
) be used without optimization?
"sm_par_vec"
= c("lambda"=1,"s(x1)"=...)
Initial smoothing parameters. Vector must start with "lambda"
for the response function. The names of the covariate effects must fit to the mgcv
output of the specified formula. There is no need to specify the initial parameters, if initial_sm = TRUE
and fix_smooth = FALSE
.
"sp_range"
= c(1e-8, 1e15)
Range of all smoothing parameters.
"reltol_opt"
= 1e-06
Relative tolerance for optimizing the smoothing parameters.
"quietly"
= FALSE
Should the algorithm print steps of optimizing the smoothing parameters and iteration procedure for the final model?
"save_step_response"
= FALSE
Should the steps of the algorithm be saved for convergences checks?
"initial_model"
= c("with_intercept","no_intercept")
Whether the initial model should be estimated with or without intercept.
List of control parameters to fit the flexgam
model.
The function is designed for internal usage.
Elmar Spiegel
Spiegel, Elmar, Thomas Kneib and Fabian Otto-Sobotka. Generalized additive models with flexible response functions. Statistics and Computing (2017). https://doi.org/10.1007/s11222-017-9799-6
1 | # Only for internal usage.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.