cum_uncertainty: Cumulative uncertainty(DEPRECATED)

Description Usage Arguments Value Examples

View source: R/cum_uncertainty.R

Description

This function performs uncertainty decomposition based on the cumulative uncertainty.

Usage

1
2
cum_uncertainty(data, var_name, stages = setdiff(names(data), var_name),
  U = var0)

Arguments

data

a data frame containing scenarios(factor or character) for each stages and the variable of interest(numeric). data should contain all combinations of scenarios.

var_name

the name of the variable of interest

stages

names of the stages in the modeling chain. should be ordered by the order of the modeling chain

U

a function that returns uncertainty such as range and variance of a given numeric vector. This package have built-in uncertainty functions var0() and drange(). Default is var0().

Value

summary of uncertainties

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
stage1 <- LETTERS[1:3]
stage2 <- LETTERS[1:2]
stage3 <- LETTERS[1:4]
y <- rnorm(3*2*4)
data <- expand.grid(stage1=stage1,
                    stage2=stage2,
                    stage3=stage3)
data <- cbind(data, y)
# cum_uncertainty() is deprecated. Use UD_cum_stage()
# cum_uncertainty(data,"y", names(data)[-4])
# cum_uncertainty(data,"y", names(data)[-4],drange)

UncDecomp documentation built on Nov. 7, 2019, 5:09 p.m.