Skip to contents

Estimate F Distribution Parameters

Usage

util_f_param_estimate(.x, .auto_gen_empirical = TRUE)

Arguments

.x

The vector of data to be passed to the function, where the data comes from the rf() function.

.auto_gen_empirical

This is a boolean value of TRUE/FALSE with default set to TRUE. This will automatically create the tidy_empirical() output for the .x parameter and use the tidy_combine_distributions(). The user can then plot out the data using $combined_data_tbl from the function output.

Value

A tibble/list

Details

This function will attempt to estimate the F distribution parameters given some vector of values produced by rf(). The estimation method is from the NIST Engineering Statistics Handbook.

Author

Steven P. Sanderson II, MPH

Examples

library(dplyr)
library(ggplot2)

set.seed(123)
x <- rf(100, df1 = 5, df2 = 10, ncp = 1)
output <- util_f_param_estimate(x)

output$parameter_tbl
#> # A tibble: 2 × 10
#>   dist_type  samp_size   min   max  mean variance method df1_est df2_est ncp_est
#>   <chr>          <int> <dbl> <dbl> <dbl>    <dbl> <chr>    <dbl>   <dbl>   <dbl>
#> 1 F Distrib…       100 0.105  7.27  1.38     1.67 MME      0.987    7.67   0.211
#> 2 F Distrib…       100 0.105  7.27  1.38     1.67 MLE      6.28     6.83   0    

output$combined_data_tbl |>
  tidy_combined_autoplot()