Description Usage Arguments Details Value
View source: R/compute.leaps.for.R
The function compute.leaps.for
explores the wide
set of candidate best-subsets models for each quantile.
The function compute.leaps.foreach
accomplishes the same thing using
a parallel for
loop.
1 2 3 | compute.leaps.for(unfilled_FDCs, filled_FDCs, comp.wys, expl, nvmax, nb,
WY.lim = 10, zero.val = 0.001, cens_level = 0.005, max.VIF = 10,
plunge.ahead = T, forced.BC = NULL)
|
unfilled_FDCs |
A matrix of the raw FDC quantiles for each site.
This is derived from the output of |
filled_FDCs |
A matrix of the censor-filled FDC quantiles
for each site. This is derived from the output of |
comp.wys |
A vector indicating how many complete water years
were present for each site. This is derived from the output of
|
expl |
A data frame of the potential explanatory variables,
derived from the output of |
nvmax |
The maximum number of variables that will be
considered in a regression. When specifying this number, the user should
take into consideration the number of sites. Prior to 9/2016 the default was |
nb |
The maximum number of models that will be considered
for each quantile. Prior to 9/2016 the default was |
WY.lim |
(optional) The minimum number of water years required to be
included in the formation of regional regressions. Only reference-quality
sites with at least this many complete water years will be used.
The default is |
zero.val |
(optional) The value to which zeroes or negative quantiles
will be set to. The default is |
cens_level |
(optional) The value establishing left censoring.
The default is |
max.VIF |
(optional) The maximum variance inflation factor permitted
in a candidate model. The default is |
plunge.ahead |
(optional) A logical vector indicating if zero values
should or should not be handled with the |
forced.BC |
(optional) A single basin characteristic that candidate models
are required to include.
The default is |
This function creates and ranks regression models. It runs regsubsets on
the filled FDCs, and then uses those models in censReg
on the
unfilled FDCs. All of the FDCs are transformed using the common logarithm.
Any model with a variable that has a VIF higher than the user defined
limit max.VIF
will be dropped. The models are automatically ranked
by regsubsets' weighted least-sqaures method, but the reported R^2 and BIC
are calculated from censReg
.
A list of lists, one for each quantile, with each of those
containing one array of models per variable level. The models are
automatically ranked by regsubsets' weighted least-sqaures method,
but the reported R^2 and BIC are calculated from censReg
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.