Learn R Programming

L2hdchange (version 1.0)

sim_hdchange_no_nbd: Simulate data without neighbourhood

Description

Simulate data without neighbourhood

Usage

sim_hdchange_no_nbd(
  n = 200,
  p = 30,
  S = 30,
  tau = c(40, 100, 160),
  dist_info = list(dist = "normal", dependence = "iid", param = 1),
  jump_max = c(2, 2, 1.5)
)

Value

A \(p \times n\) simulated data matrix.

Arguments

n

Number of time series observations.

p

Number of individuals.

S

Number of individuals with jumps.

tau

An array of length \(K\) for time stamps for breaks.

dist_info

A list specifying the distribution of the innovation.

jump_max

An array of length \(K\) for jump sizes of the breaks.

Details

'dist_info' should be a list containing the following items:

  • dist: distribution of the innovations, either "normal" or "t".

  • dependence: iid or MA(\(\infty\)), either "iid" or "MA_inf".

  • param = parameter of the distribution, standard deviation for normal distribution and degree of freedom for t distribution

See ts_hdchange() for example.

Examples

Run this code
data_no_nbd <- sim_hdchange_no_nbd(n = 200,
p = 30,
S = 30,
tau = c(40, 100, 160),
dist_info =
  list(dist = "normal", dependence = "MA_inf", param = 1),
jump_max = c(2, 2, 1.5))


Run the code above in your browser using DataLab