model_selection {SpatialModelsZAMG} | R Documentation |
this function calculates the pointwise GEV parameter estimates for each station and finds the best linear models according to Akaike Information Criterion (AIC)
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
# 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)