evalmodels: Fitting and Comparing Zero-Censored Gaussian Models on...

Description Usage Arguments Value Examples

View source: R/evalmodels.R

Description

The function evalmodels fits distributional trees (disttree), distributional forests (distforest), a prespecified GAMLSS (gamlss), a boosted GAMLSS (gamboostLSS), and an EMOS model (crch) to precipitation data. The results are compared based on CRPS, log-likelihood and RMSE.

Usage

1
2
3
4
5
6
evalmodels(station, train, test, 
           ntree = 100, distfamily = "gaussian",
           tree_minsplit = 50, tree_minbucket = 20, tree_mincrit = 0.95,
           forest_minsplit = 50, forest_minbucket = 20, forest_mincrit = 0,
           forest_mtry = 27,
           gamboost_cvr = FALSE)

Arguments

station

character, name of the selected observation station.

train

numeric, (vector of) years the models should be trained on (available: 1985–2012)

test

numeric, (vector of) years the models should be tested on (available: 1985–2012)

ntree

numeric, number of trees in the distributional forest.

distfamily

character, name of the distribution that should be used, can be either a gaussian or a logistic distribution.

tree_minsplit

numeric, the minimum sum of weights in a node in order to be considered for splitting in the distributional tree.

tree_mincrit

numeric, the value of the test statistic or 1 - p-value that must be exceeded in order to implement a split in the distributional tree.

tree_minbucket

numeric, the minimum sum of weights in a terminal node in the distributional tree.

forest_minsplit

numeric, the minimum sum of weights in a node in order to be considered for splitting in the distributional forest.

forest_minbucket

numeric, the minimum sum of weights in a terminal node in the distributional forest.

forest_mincrit

numeric, the value of the test statistic or 1 - p-value that must be exceeded in order to implement a split in the distributional forest.

forest_mtry

numeric, number of input variables randomly sampled as candidates at each node for random forest like algorithms. The default mtry = Inf means that no random selection takes place.

gamboost_cvr

logical, Should cvrisk be applied to find the optimal value for 'mstop'.

Value

evalmodels returns a list with the following components:

CRPS

CRPS (continuos ranked probability score) of all methods, average over testing data.

LS

Logarithmic score (= log-likelihood) of all methods, average over testing data.

RMSE

Root mean squared error of all methods, average over testing data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
if(require("crch") &
   require("disttree") &
   require("gamlss") &
   require("gamlss.dist") &
   require("gamlss.cens") &
   require("gamboostLSS") &
   require("mboost") &
   require("partykit") &
   require("scoringRules") &
   require("survival")
) {

evalmodels(station = "Axams", train = 1985:2008, test = 2009:2012, distfamily = "gaussian")

}

RainTyrol documentation built on Jan. 14, 2020, 3:02 a.m.