Month statistics using WRTDSKalman bootstrapping approach. The input to this function is the dailyBootOut matrix which contains nReplicate sets of daily flux values for the period of interest. The results are in the form of quantiles of concentration and of flux for each of these months.
Arguments
- dailyBootOut
data frame returned from
genDailyBoot
- eList
named list with at least the Daily, Sample, and INFO dataframes. Created from the EGRET package, after running
modelEstimation
.- fluxUnit
number representing entry in pre-defined fluxUnit class array.
printFluxUnitCheatSheet
Value
a list of 2 data frames, one for average concentration, in mg/L and one for flux (unit depends on fluxUnit argument) In each data frame the first column is monthSeq that corresponds to the months in the "MonthSeq" column in the eList$Daily data frame. The remaining columns are quantiles of the flux or concentration (depending on the data frame).
Examples
eList <- EGRET::Choptank_eList
# This example is only based on 4 iterations
# Actual prediction intervals should be calculated on
# a much larger number of iterations (several hundred).
dailyBoot <- Choptank_dailyBootOut
monthPcts <- makeMonthPI(dailyBoot, eList)
head(monthPcts[["flux"]])
#> monthSeq DecYear p1 p2.5 p5 p10 p25 p50
#> 1 1558 1979.791 189.3758 189.3758 190.0509 194.0402 203.6860 220.9693
#> 2 1559 1979.874 274.0057 274.0057 279.5923 292.7802 321.9846 347.7123
#> 3 1560 1979.958 320.2276 320.2276 322.0916 331.4465 353.6233 371.3428
#> 4 1561 1980.042 387.0260 387.0260 402.9150 440.1296 479.7443 531.9095
#> 5 1562 1980.124 222.5161 222.5161 224.2839 237.7090 262.8306 276.7311
#> 6 1563 1980.206 484.8060 484.8060 488.7506 501.1748 538.7471 567.7995
#> p75 p90 p95 p97.5 p99
#> 1 231.6290 240.7188 250.9379 254.9164 254.9164
#> 2 383.8867 399.5109 407.4356 408.3045 408.3045
#> 3 388.5917 433.4687 452.6538 454.5950 454.5950
#> 4 569.9550 613.1411 637.7940 641.3565 641.3565
#> 5 297.8663 326.5420 332.9281 333.9185 333.9185
#> 6 607.0096 650.6549 673.9090 676.1889 676.1889
head(monthPcts[["conc"]])
#> monthSeq DecYear p1 p2.5 p5 p10 p25 p50
#> 1 1558 1979.791 0.4346988 0.4346988 0.4362485 0.4454055 0.4675470 0.5072194
#> 2 1559 1979.874 0.6009423 0.6009423 0.6131947 0.6421180 0.7061684 0.7625937
#> 3 1560 1979.958 1.0577505 1.0577505 1.0639076 1.0948077 1.1680604 1.2265903
#> 4 1561 1980.042 0.7145444 0.7145444 0.7438794 0.8125865 0.8857250 0.9820346
#> 5 1562 1980.124 0.9209325 0.9209325 0.9282489 0.9838118 1.0877832 1.1453134
#> 6 1563 1980.206 0.7474892 0.7474892 0.7535711 0.7727271 0.8306573 0.8754511
#> p75 p90 p95 p97.5 p99
#> 1 0.5316880 0.5525532 0.5760103 0.5851426 0.5851426
#> 2 0.8419304 0.8761971 0.8935774 0.8954828 0.8954828
#> 3 1.2835653 1.4317995 1.4951701 1.5015822 1.5015822
#> 4 1.0522758 1.1320081 1.1775233 1.1841005 1.1841005
#> 5 1.2327861 1.3514670 1.3778972 1.3819961 1.3819961
#> 6 0.9359065 1.0032003 1.0390541 1.0425694 1.0425694