spflow_refit | R Documentation |
(warning: experimental functionality)
Use the statistics contained in an spflow_model-class()
to efficiently
estimate new models.
spflow_refit(
object,
refit_type = "ar_family",
sample_weights = NULL,
protected_params = "(Intercept)",
keep_data = FALSE
)
object |
a |
refit_type |
A character |
sample_weights |
A list of lists |
protected_params |
A character |
keep_data |
A logical, if |
There are three possible ways to refit the model, which can be selected via
the refit_type
argument.
"ar_family" allows to estimate the 9 forms of autocorrelation version
detailed in the docs of spflow_control()
"stepwise" implements a backward selection procedure for the explanatory variables.
"samples" allows to estimate the same model on different sub samples. the interface to this functionality will probably change in future versions.
A list of models
Lukas Dargel
# fit the most exhaustive model (default)
res <- spflow(y9 ~ . + P_(DISTANCE), multi_net_usa_ge)
# refit the family of 9 models based on different autocorrelation structures
res9_ar <- spflow_refit(res)
compare_results(res9_ar)
# refit based on stepwise selection procedure
res_Xstep <- spflow_refit(res, refit_type = "stepwise")
compare_results(res_Xstep)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.