View source: R/builder_functions.R
build_estimated_fn | R Documentation |
Build an estimated function that captures the estimated parameters
build_estimated_fn(prefix, dist_name, fn_estimate_params, x_data, noverlap = 1)
prefix |
The prefix (generally one of |
dist_name |
The name of the distribution. |
fn_estimate_params |
A function that takes the data and the extent of the overlap in the data, and returns a single object holding estimated parameters of the distribution being fitted. The method of estimation should be unbiased. Note that for many distributions, MLE only gives asymptotically unbiased parameters. Users should validate that their estimation functions are unbiased and if necessary adjust the threshold p-value to compensate for this. |
x_data |
The data from which the parameters will be estimated. |
noverlap |
The extent of any overlap in the data. |
A function with captured estimated parameters that is called with a single argument
(e.g. q
for a p
function).
x_data <- rnorm(100)
pnorm_est <- build_estimated_fn("p", "norm", estimate_mean_sd_ol, x_data)
pnorm_est(0)
pnorm(0, mean(x_data), sd(x_data))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.