powered by
Simulates multiple realizations of the CUSUM statistic when the long-run variance of the data is known.
sim_Vn(size, n = 500, gen_func = rnorm, sd = 1, args = NULL)
Number of realizations to simulate
The sample size for each realization
The function generating the random sample from which the statistic is computed
The square root of the second moment of the data
A list of arguments to be passed to gen_func
gen_func
A vector of simulated realizations of the CUSUM statistic
# NOT RUN { CPAT:::sim_Vn(100) CPAT:::sim_Vn(100, gen_func = CPAT:::rchangepoint, args = list(changepoint = 250, mean2 = 1)) # }
Run the code above in your browser using DataLab