Plots a standard error estimate of thetahat (slope over intercept) over a range of possible theta0 values in order to investigate robustness of the the initial theta0 guess.
err_vs_theta0_plot_for_homo_design(
n,
xmin,
xmax,
theta,
theta0_min,
theta0_max,
theta0 = NULL,
beta0 = 1,
sigma = 1,
RES = 500,
Nsim = 5000,
error_est = function(est) {
quantile(est, 0.99) - quantile(est, 0.01)
},
theta_logged = TRUE,
error_pct = TRUE,
plot_rhos = FALSE,
...
)
A list with original parameters as well as data from the simulation
The number of experimental runs.
The minimum value of the independent variable.
The maximum value of the independent variable.
The putative true value. This is used to see how much efficiency given up by designing it for theta0
.
Simulating over different guesses of theta0, this is the minimum guess.
Simulating over different guesses of theta0, this is the maximum guess.
The guess used to construct the experimental design. Specify only if you wish to see this
value plotted. Default is NULL
.
A guess to be used for the intercept. Defaults to 1
.
A guess to be used for the homoskedastic variance of the measurement errors. If known accurately,
then the standard errors (i.e. the y-axis on the plot) will be accurate. Otherwise, the standard
errors are useful only when compared to each other in a relative sense. Defaults to 1
.
The number of points on the x-axis to simulate. Higher numbers will give smoother results. Default is 20
.
The number of models to be simulated for estimating the standard error at each value on the x-axis. Default is 1000
.
The error metric for the estimates. The sample standard deviation (i.e. sd
)
is unstable at low sample sizes. The default is the 90 percentile minus the 10 percentile.
Should the values of theta be logged? Default is TRUE
.
Plot error as a percentage increase from minimum. Default is TRUE
.
Plot an additional graph of rho by theta0. Default is FALSE
.
Additional arguments passed to the plot
function.
Adam Kapelner
# \donttest{
xmin = 5 / 15
xmax = 19 / 1
n = 10
theta0 = 0.053
plot_info = err_vs_theta0_plot_for_homo_design(
n, xmin, xmax, theta0, theta0_min = 0.001, theta0_max = 1
)
# }
Run the code above in your browser using DataLab