ts.rnorm: Time Series Normal Distribution

Description Usage Arguments Details Value See Also Examples

Description

Used the Normal Distribution function to generate random monthly time series datasets that end on the current date.

Usage

1
 ts.rnorm(n, mean = 0, sd = 1, initial, allownegatives = TRUE)

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

mean

vector of means.

sd

vector of standard deviations.

initial

numeric; provides the initial value for the time series variable.

allownegatives

logical; if TRUE (default), negative values remain otherwise, negative values are replaced with 0.

Details

If mean or sd are not specified they assume the default values of 0 and 1, respectively.

Value

ts.rnorm generates random deviates.

See Also

rnorm

Examples

1
2
3
4
foo1 <- ts.rnorm(n = 150, mean = 0.01, initial = 100)
foo2 <- ts.rnorm(n = 150, mean = 0.01, initial = 283)
foo3 <- ts.rnorm(n = 150, mean = 0.01, initial = 44)
plot(cbind(foo1,foo2,foo3), ylab = "Price", main = "Random Time Series Variables")

efriedland/friedland documentation built on Feb. 9, 2021, 11:53 a.m.