Learn R Programming

EGRETci (version 2.0.4)

makeAnnualPI: Make Annual Prediction Intervals

Description

This function takes the output from genDailyBoot and calculates the quantiles for an annual (based on paStart/paLong) aggregation. This means that the function can be used for seasons.

Usage

makeAnnualPI(dailyBootOut, eList, paLong = 12, paStart = 10, fluxUnit = 3)

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.

paLong

numeric integer specifying the length of the period of analysis, in months, 1<=paLong<=12, default is 12

paStart

numeric integer specifying the starting month for the period of analysis, 1<=paStart<=12, default is 10

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 DecYear. The remaining columns are quantiles of the flux or concentration (depending on the data frame).

Examples

Run this code
# NOT RUN {
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
annualPcts <- makeAnnualPI(dailyBoot, eList)
head(annualPcts[["flux"]])
head(annualPcts[["conc"]])

# }

Run the code above in your browser using DataLab