lppl_simulate_FS_boot: Simulate a LPPL model using bootstrap resampling of residuals...

Description Usage Arguments Details Value Examples

View source: R/LPPL_3step.R

Description

This function simulates a LPPL model using bootstrap resampling of residuals and the formula in Filimonov and Sornette (2013)

Usage

1
lppl_simulate_FS_boot(T = 500, true_parm, resids)

Arguments

T

is the number of simulated time steps

true_parm

is a a 7 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 using the formula in Filimonov and Sornette (2013), error terms given by the bootstrp resampling of residuals from a previous LPPL estimation, and with a parameter vector given by true_param. 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] = A

true_parm[4] = B

true_parm[5] = C1

true_parm[6] = C2

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.35, 4.15, 7.16,-0.43, -0.016, 0.031, 530, 0.00007)
 a1=lppl_simulate_FS(500,tparm)
 est.all<-lppl_estimate_rob_3all(a1)
 resids=est.all$resids
 tparm.boot=c(0.35, 4.15, 7.16,-0.43, -0.016, 0.031, 530)
 aa=lppl_simulate_FS_boot(500,tparm.boot, resids)
 
## End(Not run)

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