foehnix | R Documentation |
This is the main method of the foehnix package to estimate two-component mixture models for automated foehn classification.
foehnix(
formula,
data,
switch = FALSE,
filter = NULL,
family = "gaussian",
control = foehnix.control(family, switch, ...),
...
)
## S3 method for class 'foehnix'
logLik(object, ...)
## S3 method for class 'foehnix'
nobs(object, ...)
## S3 method for class 'foehnix'
AIC(object, ...)
## S3 method for class 'foehnix'
BIC(object, ...)
## S3 method for class 'foehnix'
IGN(object, ...)
## S3 method for class 'foehnix'
edf(object, ...)
## S3 method for class 'foehnix'
print(x, ...)
## S3 method for class 'foehnix'
formula(x, ...)
## S3 method for class 'foehnix'
summary(object, eps = 1e-04, detailed = FALSE, ...)
formula |
an object of class |
data |
a regular (not necessarily strictly regular)
time series object of class |
switch |
logical. If set to |
filter |
a named list can be provided to apply a custom (simple) filter
to the observations on |
family |
character (at the moment |
control |
additional control arguments, see |
... |
forwarded to |
object |
a |
x |
a |
eps |
threshold for posterior probabilities used in |
detailed |
boolean, default |
The two-component mixture model can be specified via formula object where
the left hand side of the formula contains the 'main' variable explaining the two
components (only one variable), the right hand side of the formula specifies
the concomitant variables (multiple variables allowed). As an example:
let's assume that our zoo object data
contains the following
columns:
ff
: observed wind speed at target site
rh
: observed relative humidity at target site
diff_t
: (potential) temperature difference between target site and a station
upstream of the foehn wind direction
The specification for formula
could e.g. look as follows:
ff ~ 1
: the two components of the mixture model will be
based on the observed wind speed (ff
), no concomitant
model (right hand side is simply 1
).
ff ~ rh
: similar to the specification above, but using
observed relative humidity (rh
) as concomitant.
ff ~ rh + diff_t
: as above but with an additional second
concomitant variable (observed temperature difference, diff_t
).
diff_t ~ ff + rh
: using temperature difference as the main
variable for the two components while ff
and rh
are
used as concomitants. Note: in this case it will be required to set
switch = TRUE
as lower values of diff_t
indicate
less stratified conditions where the occurrence of foehn is
more likely. If switch = FALSE
the two components (foehn
and no foehn) may be interchanged and the model will return
"probabilities of not observing foehn".
Note that these are just examples and have to be adjusted given data
availability, location, structure/names of the variables in the data
object.
The optional input filter
allows to specify simple or complex
filters (see foehnix_filter
for details).
This allows to add additional constraints, e.g., adding a filter on the
observed wind direction to ensure that only events within a specific wind
sector (the main foehn wind direction) are classified as "foehn".
Returns an object of class foehnix
.
Log-likelihood sum (numeric
).
Number of observations (integer
) used to train the model.
Returns the Akaike information criterion (numeric
).
Bayesian information criterion (numeric
).
Ignorance (mean negative log-likelihood; numeric
).
Effective degrees of freedom.
Returns the formula of the model (formula
).
Object of class summary.foehnix
.
Reto Stauffer
Plavcan D, Mayr GJ, Zeileis A (2014). Automatic and Probabilistic Foehn Diagnosis with a Statistical Mixture Model. Journal of Applied Meteorology and Climatology. 53(3), 652–659. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1175/JAMC-D-13-0267.1")}
Gr\"un B, Leisch F (2007). Fitting Finite Mixtures of Generalized Linear Regressions in R. Computational Statistics \& Data Analysis. 51(11), 5247–5252. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.csda.2006.08.014")}
Gr\"un B, Leisch F (2008). FlexMix Version 2: Finite Mixtures with Concomitant Variables and Varying and Constant Parameters. Journal of Statistical Software, Articles. 28(4), 1–35. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v028.i04")}
Fraley C, Raftery AE (2002). Model-Based Clustering, Discriminant Analysis, and Density Estimation. Journal of the American Statistical Association. 97(458), 611–631. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/016214502760047131")}
See foehnix_filter
for more information about the
filter
option. See also: tsplot
, windrose
.
Foehnix family objects: foehnix.family
.
S3 methods for foehnix
objects:
plot.foehnix
,
predict.foehnix
,
fitted.foehnix
,
print.foehnix
,
summary.foehnix
,
windrose.foehnix
,
coef.foehnix
,
nobs.foehnix
,
edf.foehnix
,
AIC.foehnix
,
BIC.foehnix
,
IGN.foehnix
,
logLik.foehnix
,
...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.