runGroupsBoot: The bootstrap uncertainty analysis for runGroups results

Description Usage Arguments Details Value See Also Examples

Description

This function that does the uncertainty analysis for determining the change between two groups of years. The process is virtually identical to what is used for runPairsBoot which looks at a change between a pair of years.

Usage

1
2
runGroupsBoot(eList, groupResults, nBoot = 100, startSeed = 494817,
  blockLength = 200, jitterOn = FALSE, V = 0.2)

Arguments

eList

named list with at least the Daily, Sample, and INFO dataframes

groupResults

data frame returned from runGroups

nBoot

the maximum number of bootstrap replicates to be used, typically 100

startSeed

setSeed value. Defaults to 494817. This is used to make repeatable output.

blockLength

days, typically 200 is a good choice

jitterOn

logical, if TRUE, adds "jitter" to the data in an attempt to avoid some numerical problems. Default = FALSE. See Details below.

V

numeric a multiplier for addition of jitter to the data, default = 0.2.

Details

In some situations numerical problems are encountered in the bootstrap process, resulting in highly unreasonable spikes in the confidence intervals. The use of "jitter" can often prevent these problems, but should only be used when it is clearly needed. It adds a small amount of random "jitter" to the explanatory variables of the WRTDS model. The V parameter sets the scale of variation in the log discharge values. The standard deviation of the added jitter is V * standard deviation of Log Q. The default for V is 0.2. Larger values should generally be avoided, and smaller values may be sufficient.

Value

eBoot, a named list with bootOut, wordsOut, xConc, xFlux, pConc, pFlux values.

See Also

runPairsBoot, runGroups

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(EGRET)
eList <- Choptank_eList

## Not run: 
groupResults <- runGroups(eList, 
                          group1firstYear = 1995, 
                          group1lastYear = 2004, 
                          group2firstYear = 2005, 
                          group2lastYear = 2014, 
                          windowSide = 7, wall = TRUE, 
                          sample1EndDate = "2004-10-30", 
                          paStart = 4, paLong = 2, 
                          verbose = FALSE)

boot_group_out <- runGroupsBoot(eList, groupResults)

plotHistogramTrend(eList, boot_group_out, caseSetUp=NA)

## End(Not run)

EGRETci documentation built on April 13, 2021, 5:08 p.m.