powered by
Runs several simulations and returns the points of stability, which can then be further processed to calculate the critical point of stability.
simulate_pos( x_pop, y_pop, n_studies, sample_size_min, sample_size_max, replace, lower_limit, upper_limit )
Vector of sample sizes at which corridor of stability was reached.
First vector of population.
Second vector of population.
How many studies to conduct.
Minimum sample size to start in corridor of stability.
How many participants to draw at maximum.
Whether drawing samples is with replacement or not.
Lower limit of corridor of stability.
Upper limit of corridor of stability.
pop <- fastpos::create_pop(0.5, 1000000) simulate_pos(pop[,1], pop[,2], 100, 20, 1000, TRUE, 0.4, 0.6)
Run the code above in your browser using DataLab