# NOT RUN {
# Simulate bubble processes, compute the t-stat and critical values
set.seed(4441)
dta <- data.frame(psy1 = sim_psy1(n = 100), psy2 = sim_psy2(n = 100))
rfd <- radf(dta)
# Summary, diagnostics and datestamp (default)
summary(rfd)
diagnostics(rfd)
datestamp(rfd)
#' # Diagnostics for 'sadf'
diagnostics(rfd, option = "sadf")
# Use log(T)/T rule of thumb to omit periods of explosiveness which are short-lived
rot <- round(log(NROW(rfd)) / NROW(rfd))
datestamp(rfd, min_duration = rot)
# }
# NOT RUN {
# Summary, diagnostics and datestamp (Wild Bootstrapped critical values)
wb <- wb_cv(dta)
summary(rfd, cv = wb)
diagnostics(rfd, cv = wb)
datestamp(rfd, cv = wb)
# }
Run the code above in your browser using DataLab