Learn R Programming

fEGarch (version 1.0.1)

sim_functions: Sampling Functions for Innovations

Description

Draw random samples from a normal distribution, \(t\)-distribution, generalized error distribution, or their skewed variants (all standardized to have mean zero and variance one).

Usage

rnorm_s(n)

rstd_s(n, df = 10000)

rged_s(n, shape = 2)

rsged_s(n, shape = 2, skew = 1)

rald_s(n, P = 8)

rsnorm_s(n, skew = 1)

rsstd_s(n, df = 10000, skew = 1)

rsald_s(n, P = 8, skew = 1)

Value

These functions return a numeric vector of length n.

Arguments

n

the number of observations to draw.

df

the degrees of freedom for a (skewed) \(t\)-distribution.

shape

the shape parameter for a (skewed) generalized error distribution.

skew

the skewness parameter in the skewed distributions.

P

the number of Laplace distributions (minus 1) to derive the arithmetic mean from as the basis for a (skewed) average Laplace (AL) distribution distribution.

Details

Draw random samples from a normal distribution, \(t\)-distribution, generalized error distribution, an average Laplace distribution, or their skewed variants (all standardized to have mean zero and variance one).

Examples

Run this code
rnorm_s(10)

rsstd_s(10, df = 7, skew = 0.9)

Run the code above in your browser using DataLab