Used to control the foehnix
mixture models.
foehnix.control(
family,
switch,
left = -Inf,
right = Inf,
truncated = FALSE,
standardize = TRUE,
maxit = 100L,
tol = 1e-08,
force.inflate = FALSE,
glmnet.control = NULL,
verbose = TRUE,
...
)
character specifying the distribution of the components in the
mixture model. Allowed: "gaussian"
and "logistic"
. For
experts: custom foehnix.family
objects can be provided as well.
logical whether or not the two components should be switched.
By default (switch = FALSE
) the component which shows
higher values of y
is assumed to be the foehn cluster!
Depending on what your covariate is you might need to switch
the clusters (by setting switch = TRUE
).
default is -Inf
, left censoring or truncation point. See
also input right
and input truncated
. Can be set to any finite
numeric value.
default is Inf
, right censoring or truncation point. See
also input left
and input truncated
. Can be set to any finite
numeric value.
logical. If set to TRUE
truncation is used instead of
censoring. This only affects the foehnix
model estimate
if input left
and/or input right
are specified.
logical flag, default is TRUE
. Whether or
not the model matrix for the concomitant model should be standardized for
model estimation (recommended).
control argument for the iterative solvers. Default is
100L
, the maximum number of iterations for the EM algorithm and the
IWLS backfitting algorithm for the concomitant model. If a vector of length
two is provided the first value is used for the EM algorithm, the second for
the IWLS backfitting.
similar as for maxit
. Used to identify convergence of the
iterative solvers. Default is 1e-8
, if two values are provided the first
will be used for the EM algorithm, the second one for the IWLS backfitting
procedure. If set to -Inf
maxit
will be used as stopping
criteria.
logical, default is FALSE
. foehnix
creates
a strictly regular time series object by inflating the data set using the
smallest time interval in the data set. If the inflation rate is larger than
2 the script will stop except the user forces inflation by specifying
force.inflate = TRUE
. See 'Details' section for more information.
an object of class glmnet.control
containing the arguments for the glmnet function (experimental).
logical, if set to FALSE
output is suppressed.
currently sent to hell.
Inflation: foehnix
models are based on time series objects.
For some methods (e.g., to create nice and easy to read time series plots and
count statistics)
foehnix
inflates the time series object using the smallest time
interval in the data set. This can, possibly, yield very large data sets. Thus,
foehnix
is pre-calculating the inflation rate, the fraction between
the length of the inflated data set versus the length of the data set provided by
the user. If this inflation rate exceeds 2 the script will raise an error!
In this case, the user is kindly asked to check if the time series object
(input data
). A possible scenario: a user is performing foehn diagnosis
using 5 years of data from one station with 10 minute observations. This yields
(neglecting leap years) 5 * 365 * 144 = 262.800
observations. Imagine that there
is one incorrect observation reported one second after one of the regular
10 minute records. The smallest time increment would thus be 1 second. This would
yield an inflated time series object with a total record length of
5 * 365 * 86.400 = 157.680.000
. Even if only filled with missing values
(NA
) this will be extremely memory demanding. To avoid this,
foehnix
will stop in such situations.
However, the user is allowed to overrule this condition by setting the
force.inflate
option to TRUE
.