phenoSim: Simulate Green-up Phenology Data

Description Usage Arguments Examples

View source: R/phenoSim.R

Description

This function return a set of simulated data for multiple green-up phenology time-series.

Usage

1
2
phenoSim(nSites = 1000, nTSet = c(3:6), p = 2, beta = NULL, sig = 0.1,
  tau = 0.01, miss = 0, plotFlag = FALSE, ymax = 1, trend = +1)

Arguments

nSites

Number of sites/seasons

nTSet

A vector of integer values. Length of each time-series will be randomly sampled from this vector.

p

Number of predictors in the model.

beta

Beta coefficients

sig

Process error.

tau

Observation error.

miss

Fraction of missing data.

plotFlag

logical value indicating whether to plot the resulted time-series.

ymax

Asymptotic maximum values.

trend

time-series expected trend as -1:decreasing, +1:increasing, 0: not constrained

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Simulate Phenology Data
ssSim <- phenoSim(nSites = 2, #number of sites
                  nTSet = 30, #number of time steps
                  beta = c(1, 2), #beta coefficients
                  sig = .01, #process error
                  tau = .1, #observation error
                  plotFlag = TRUE, #whether plot the data or not
                  miss = 0.05, #fraction of missing data
                  ymax = c(6, 3) #maximum of saturation trajectory
)

phenoCDM documentation built on May 1, 2019, 9:26 p.m.