check_estimate_required_params: Function to check if the parameters are sufficient to define...

View source: R/help_parameter_estimation_functions.R

check_estimate_required_paramsR Documentation

Function to check if the parameters are sufficient to define a distribution and if not see if we can estimate the parameters from the given parameters, e.g. for gamma distribution, shape and rate can be estimated from mean and sd

Description

Function to check if the parameters are sufficient to define a distribution and if not see if we can estimate the parameters from the given parameters, e.g. for gamma distribution, shape and rate can be estimated from mean and sd

Usage

check_estimate_required_params(the_expr, distr_key)

Arguments

the_expr

the expression that contain the definition

distr_key

the keyword used to generate random numbers in stats package

Details

if the distribution is gamma and the parameters are mean and sd we can estimate shape and rate from mean and sd. This function is not usually needed by the user

Value

the parameters required

Examples

check_estimate_required_params("gamma(mean = 10 ,sd = 1)", "gamma")

packDAMipd documentation built on May 29, 2024, 3:18 a.m.