powered by
custest
custest(formula, data=list())
lm
# generate regressor x <- c(1:30); # generate a structural change y <- c(1*x[1:10], 3*x[11:30]) + rnorm(30,0,1); # perform CUSUM-Test rw <- custest(y ~x -1); # plot random walk plot(rw);
Run the code above in your browser using DataLab