Some details.

# S3 method for foehnix
predict(object, newdata = NULL, type = "response", ...)

Arguments

object

a foehnix mixture model object.

newdata

if NULL (default) the prediction of the underlying training data set will be returned (see also fitted.foehnix). Else newdata has to be a zoo object providing the required variables which have been used for model fitting and filtering (see foehnix).

type

character, one of "response" (default), "all".

...

additional arguments, ignored.

Value

Returns a zoo object with foehn probabilities and (if type = "all") additional information. See 'Details' section for more information.

Details

Used for prediction (perform foehn diagnosis given the estimated parameters on a new data set (newdata). If no new data set is provided (newdata = NULL) the prediction is made on the internal data set, the data set which has been used to train the foehnix mixture model. If a new data set is provided (newdata) the foehn diagnosis will be performed on this new data set, e.g., based on a set of new observations when using foehnix for operational near real time foehn diagnosis.

Note that newdata has to be a zoo object containing the required information to perform the foehnix diagnosis, namely the variables used for classification (see formula.foehnix plus the ones used to filter the data (see foehnix input argument filter).

Usually type = "response" is used which returns the foehn probabilities. If type = "all" a set of additional values will be returned, namely:

  • density1 density of the first component of the mixture model.

  • density2 density of the second component (foehn component) of the mixture model.

  • ccmodel probability from the concomitant model.

Note that the foehn probability is simply given by:

  • ccmodel * density2 / ((1 - ccmodel) * density1 + ccmodel * density2)

Author

Reto Stauffer