# \donttest{
# data
data(gdp)
y = gdp$gdp
x = gdp[,c("lag1", "lag2")]
n.size = 1
T.size = length(y) # number of time periods
# setting
vec.tau = seq(0.20, 0.80, by = 0.150)
trim.e = 0.2
trim.size = round(T.size * trim.e) #minimum length of a regime
m.max = 3
# compute the objective function under all possible partitions
out.long = gen.long(y, x, vec.tau, n.size, trim.size)
vec.long.m = out.long$vec.long ## for break estimation using multiple quantiles
# break date
mat.date = brdate(y, x, n.size, m.max, trim.size, vec.long.m)
print(mat.date)
# }
Run the code above in your browser using DataLab