Create a plot that shows how Monte Carlo estimates change with increasing sample size.
estvssamp(x, g = mean, main = "Estimates vs Sample Size", add = FALSE, ...)
a sample vector.
a function such that \(E(g(x))\) is the quantity of interest. The default is g = mean.
g = mean
an overall title for the plot. The default is “Estimates vs Sample Size”.
Estimates vs Sample Size
logical. If TRUE, add to a current plot.
TRUE
additional arguments to the plotting function.
NULL
# NOT RUN { estvssamp(x, main = expression(E(beta))) estvssamp(y, add = TRUE, lty = 2, col = "red") # }
Run the code above in your browser using DataCamp Workspace