Learn R Programming

SDGLM (version 0.4.0)

simPareto: Simulate Pareto-type Dynamic GLM

Description

Generates a dynamic time-series where y_t = 1 + Gamma(shape = 1, scale = 1/lambda_t), and the inverse-scale lambda_t follows a stationary AR(1) process.

Usage

simPareto(N = 1000L, q = 4L)

Value

List with components:

Y

Numeric vector of length N, Pareto-type observations (y >= 1).

lambda

Numeric vector of length N, dynamic inverse-scale process.

G

AR(1) persistence coefficient (|G| < 1).

sig2

Innovation variance sigma^2.

Arguments

N

Integer > 1, series length.

q

Integer >= 1, number of predictors (used only for interface compatibility; no covariates are currently used in the generator).

Examples

Run this code
set.seed(2)
dat <- simPareto(N = 500, q = 3)
plot(dat$lambda, type = "l")

Run the code above in your browser using DataLab