# fdbk_dt_reliability_diagram: Calculate the reliability diagram statistics In rfxf/Rfdbk: Handling NetCDF feedback files

## Description

Calculate the reliability diagram statistics

## Usage

 `1` ```fdbk_dt_reliability_diagram(DT, thresholds = "", by = "", breaks = "") ```

## Arguments

 `DT` data.table (columns 'veri_ens_member','obs' and 'veri_data' plus all variables to make forecasts distinguishable are required!!!) `thresholds` list of threshold for variable names in DT (if "" uses obs median) `by` stratify crps by (e.g. c('varno','veri_forecast_time')) `breaks` breaks used to bin the forecast probabilities

## Value

data.table with columns forecast bin and observed frequency for each varno/threshold

## Author(s)

Felix <[email protected]>

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```require(ggplot2) fnames = system("/bin/ls ~/examplesRfdbk/eps/*12/verSYNOP*",intern=T) condition = list(veri_description="grepl('member',veri_description)", state="state%in%c(0,1)", statid="!is.na(as.numeric(statid)) & !duplicated(statid)", veri_forecast_time="veri_forecast_time>=1200") columns = c("obs","veri_data","varno","veri_ens_member","veri_forecast_time","statid","veri_initial_date") DT = fdbk_dt_multi_large(fnames,condition,columns,5) ATTR = fdbk_dt_reliability_diagram(DT,thresholds="",by=c("varno","veri_forecast_time"),breaks="") ggplot(ATTR,aes(x=fbin,y=obin,color=factor(veri_forecast_time),group=veri_forecast_time))+geom_line()+geom_point()+facet_wrap(~varno)+ geom_abline(intercept = 0, slope = 1)+theme_bw() ```

rfxf/Rfdbk documentation built on Dec. 17, 2018, 9:14 a.m.