estimate_distr: Estimate distribution parameters from data

View source: R/cbea_internals.R

estimate_distrR Documentation

Estimate distribution parameters from data

Description

This function takes a numeric vector input and attempts to find the most optimal solution for the parameters of the distribution of choice. Right now only norm and mnorm distributions are supported.

Usage

estimate_distr(data, distr, init = NULL, args_list = NULL)

Arguments

data

(Numeric Vector). A vector of numbers that can be inputted to estimate the parameters of the distributional forms.

distr

(String). The distribution to be fitted. Right now only norm or mnorm is supported

init

(List). Initialization parameters for each distribution. For mixtures, each named element in the list should be a vector with length equal to the number of components

args_list

(List). Named list of additional arguments passed onto fitdist and normalmixEM

...

Other paremteres passed to fitdistrplus or normalmixEM

Details

The package fitdistrplus is used to estimate parameters of the normal distribution while the package normalmixEM is used to estimate parameters of the mixture normal distribution. So far we suggest only estimating two components for the mixture normal distribution. For default options, we use mostly defaults from the packages themselves. The only difference was the mixture normal distribution where the convergence parameters were loosened and requiring more iterations to converge.

Value

A named list with all the parameter names and values


qpmnguyen/CBEA documentation built on April 4, 2022, 7:25 p.m.