View source: R/dthelper-simulation.R
plotting.convergence | R Documentation |
Over each iteration, the function will compute the mean estimate of the simulated statistic for all past iterations. Curve should stabilise if convergence is reached.
plotting.convergence(x)
x |
vector object. Index should match number of iterations |
ggplot object. Plots mean of estimate against number of iterations
set.seed(100) flip.coin <- function(n){ return(sample(0:1, size=n, replace = T)) } flips <- flip.coin(100) plot.convergence(flips)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.