simts: Simulate dichotomous binary time-series

View source: R/simts.R

simtsR Documentation

Simulate dichotomous binary time-series

Description

A simple algorithm for producing a time-series that drives a second time-series (1 for event occurrence; 0 otherwise) using parameters, which change independent and conditional probability of an event to occur.

Usage

 simts(BL1, BL2, BLR1, BLR2, BL2C1, tsL) 

Arguments

BL1

Base event rate of the first time-series

BL2

Base event rate of the second time-series

BLR1

Rate of repetition in the first series

BLR2

Rate of repetition in the second series

BL2C1

Conditional probability of repetition.

tsL

Length of the simulated time-series

Value

A matrix with two-rows, where the first row is the 'driving' time-series and the second row is the second time-series. The columns are the number of simulated points as selected by the argument tsL.

Author(s)

Rick Dale and Moreno I. Coco (moreno.cocoi@gmail.com)

Examples


## set up parameters

BL1 = .08; BL2 = .05; BLR1 = .5; BLR2 = .5;
BL2C1 = .33; tsL = 100

ts = simts(BL1, BL2, BLR1, BLR2, BL2C1, tsL)


crqa documentation built on June 22, 2024, 9:17 a.m.