Skip to contents

Add shock to shock object

Usage

add_shock(
  shock,
  variable,
  value = NA,
  rate = NA,
  absolute = NA,
  start = NA,
  end = NA,
  desc = ""
)

Arguments

shock

tibble from create_shock()

variable

string variable name

value

numeric, an explicit value or values for the variable, will be extended with last value

rate

numeric, multiplier to influence the original value of the variable

absolute

numeric, absolute value to influence the original value of the variable

start

numeric or date period number for the shock to take place, defaults to NA

end

numeric or date period number for the shock to take place, defaults to NA

desc

string variable description

Value

updated shock object containing added shock