generate_ol_rnorm_mtx: Generate a matrix of overlapped Normal variates

View source: R/overlapping_data.R

generate_ol_rnorm_mtxR Documentation

Generate a matrix of overlapped Normal variates

Description

The function operates by calculating a matrix of 'pthly' variates (where p is the extent of the overlap, i.e. the parameter noverlap) having 1/pth the mean and variance, and then iterating over rows and summing the row values in overlapping sets of noverlap.

Usage

generate_ol_rnorm_mtx(nsims, nsteps, noverlap, mu = 0, sigma = 1)

Arguments

nsims

The number of simulations (rows in the matrix).

nsteps

The number of steps (columns in the matrix).

noverlap

The extent of the overlap, e.g. 12 means annual overlaps from monthly data. 1 means no overlap.

mu

The mean of the Normal distribution.

sigma

The standard deviation of the Normal distribution.

Value

A nsims by steps matrix with overlapped values.

Examples

generate_ol_rnorm_mtx(100, 10, noverlap = 12)

PaulMTeggin/practechniques documentation built on Aug. 19, 2023, 4:44 p.m.