addDrift {rSHAPE}R Documentation

This is a simple little function used to represent drift by introducing stochasticity to the vector passed by making poisson distribution calls. At present it forces values to integers because I've not been able to implement an appropriate continuous distribution for such calls that works with tested models and expected outcome.

Description

This is a simple little function used to represent drift by introducing stochasticity to the vector passed by making poisson distribution calls. At present it forces values to integers because I've not been able to implement an appropriate continuous distribution for such calls that works with tested models and expected outcome.

Usage

addDrift(func_inVector, func_integerValues = TRUE)

Arguments

func_inVector

A vector of value to which stochasticity is to be added, integer values will be returned.

func_integerValues

Logical toggle if a discrete or continous distribution is to be used for draws. DISABLED - as testing could not identify a continuous distribution which works for obtaining expected results from established models.

Value

A vector of values, with same length as func_inVector

Examples

# This adds drift by making draws from the Poisson distribution with a location parameter based on
# the elements to which drift is to be added.
replicate(10,addDrift(c(0.5,1,5,10,14.1)))


[Package rSHAPE version 0.3.2 Index]