lppl_simulate_boot: Simulate a LPPL model using bootstrap resampling of residuals

Description Usage Arguments Details Value Examples

View source: R/LPPL_basic.R

Description

This function simulates a LPPL model using bootstrap resampling of residuals

Usage

1
lppl_simulate_boot(T = 500, true_parm, resids)

Arguments

T

is the number of simulated time steps

true_parm

is a a 8 x 1 vector containing the parameters for the simulation

resids

is a T x 1 vector of residuals from a previous LPPL estimation

Details

This function simulates a LPPL model with parameter vector given by true_param, and error terms given by the bootstrp resampling of residuals from a previous LPPL estimation. The simulated data are then plotted. More specifically, the LPPL parameters in the true_param vector are given below:

true_parm[1] = beta

true_parm[2] = omega

true_parm[3] = phi

true_parm[4] = A

true_parm[5] = B

true_parm[6] = C

true_parm[7] = the critical time tc

Value

y a T x 1 vector of simulated data

Examples

1
2
3
4
5
6
7
8
9
 ## Not run: 
 tparm=c(0.353689, 9.154368, 2.074608, 7.166421,-0.434324, 0.035405, 0.000071, 530)
 aa=lppl_simulate(500,tparm)
 bb=lppl_estimate(aa); bb;
 resids <- lppl.resids.from.basic.estimate(aa,bb)
 tparm.boot=c(0.353689, 9.154368, 2.074608, 7.166421,-0.434324, 0.035405, 530)
 aa=lppl_simulate_boot(500,tparm.boot, resids)
 
## End(Not run)

deanfantazzini/bubble documentation built on Oct. 22, 2020, 2:43 p.m.