make_binary_series: Create an autocorrelated binary series

Description Usage Arguments Value Examples

View source: R/markov_transitions.R

Description

Generate a binary series that is autocorrelated using the Markov method from make_markov_series

Usage

1
make_binary_series(n = 100, mean = 0.5, corr = 0)

Arguments

n

integer, length of series to generate

mean

numeric between 0 and 1, proportion of cases with value 1

corr

numeric between -1 and 1, how correlated should series be?

Value

A binary series

Examples

1
2
make_binary_series(n=12,mean=0.5,corr=0.9)
make_binary_series(n=100,mean=0.5,corr=0.1)

OpenSDP/OpenSDPsynthR documentation built on June 20, 2020, 6:18 a.m.