simulCase: Simulation of nrep disturbance time series.

Description Usage Arguments Value

View source: R/ts_generator.R

Description

Simulation of nrep disturbance time series.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
simulCase(
  nrep,
  nyr,
  nobsYr,
  nDr,
  seasAv,
  seasAmp,
  trAv,
  remSd,
  distMaglim,
  distTy,
  distReclim,
  mval,
  mvaldist,
  distType
)

Arguments

nrep

number of time series to simulate

nyr

number of years that need to be simulated

nobsYr

number of observations per year that will be simulated

nDr

number of drought years that are introduced [i.e. setting seasonality of a year equal to its minimum value]. These drought years are randomly chosen for each of the simulated time series.

seasAv

average seasonality profile

seasAmp

seasonality amplitude

trAv

offset value of time series

remSd

standard deviation of the remainder

distMaglim

limits of the disturbance magnitude, should be a vector with the minimum and maximum value. If the minimum equals the maximum value, the disturbance magnitude is fixed for each simulated time series (and equal to the minimum value). When the minimum value does not equal the maximum value, a disturbance magnitude is randomly chosen in the given interval for each simulated time series.

distTy

year of the disturbance. If distTy equals one, the disturbance will take place in the first year. The exact disturbance date (day or year) is randomly chosen per time series.

distReclim

limits of the halftime period of the recovery [number of observations], should be a vector with the minimum and maximum value. If the minimum equals the maximum value, the recovery period is fixed for each simulated time series (and equal to the minimum value). When the minimum value does not equal the maximum value, a recovery period is randomly chosen in the given interval for each simulated time series.

mval

number of missing values to be introduced. If mval equals NA, no missing values are introduced. For missing values with a random interval (see mvaldist), this should equal the fraction of missing values (mval equal to 0.1 will result in an NA value for 10 percent of the time series). For missing values having a regular interval, every mval observations one value is kept (eg for a daily time series, a mval equal to 5 will result in one observation every 5 days).

mvaldist

the distribution of the missing values. Should equal 'random'or 'interval'.

distType

the type of disturbance. piecewise refers to a linear decay function, while exponential refers to an exponential decay

Value

a list with the simulated time series, offest, seasonality, remainder, disturbance component and parameters used for the simulation. The time series (components) are stored as matrix where each row is a time series and the columns are associated with the observation numbers.


RETURN-project/BenchmarkRecovery documentation built on July 13, 2021, 5:47 p.m.