Description Usage Arguments Value See Also Examples
View source: R/model_selection.R
this function calculates the pointwise GEV parameter estimates for each station and finds the best linear models according to Akaike Information Criterion (AIC)
1 2 | model_selection(max_data, covariables, at_least_data = 30,
plot_station_distr = FALSE)
|
max_data |
a matrix with the yearly maxima of snow depth (sd) or snow water equivalent (swe). each row corresponds to one station, columns are the corresponding years. matrix might contain |
covariables |
a matrix with the covariables for each station. each row corresponds to one station, columns should include at least lon (longitude), lat (latitude) and alt (altitude) |
at_least_data |
how many measurements does each station has to have at least for the model selection. |
plot_station_distr |
logical value; if |
a list with
max_data |
the given |
covariables |
the given |
point_est |
a matrix with the pointwise GEV parameter estimates. each row corresponds to one station, columns are loc (location parameter), scale (scale parameter) and shape (shape parameter) |
models |
a list of |
used_for_model_selection |
the indices of the stations which were used for the model selection. you can use it for example as |
get_data_from_Robj
, optimizer_smooth_model
, optimizer_biv_hr_model
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # load function output from get_data_from_Robj
get_data = get(data("get_data"))
# define covariables for sd and swe in order
# to perform model selection (drop swe_mmax
# for sd and sd_mmax for swe model selection)
sd_covariables = get_data$covariables[,-6]
swe_covariables = get_data$covariables[,-5]
# perform model selection
sd_m_select =
model_selection(max_data = get_data$sd_max_data,
covariables = sd_covariables,
at_least_data = 10)
swe_m_select =
model_selection(max_data = get_data$swe_max_data,
covariables = swe_covariables,
at_least_data = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.