Learn R Programming

packDAMipd (version 0.2.0)

check_estimate_required_params: 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

Value

the parameters required

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

Examples

Run this code
# NOT RUN {
check_estimate_required_params("gamma(mean = 10 ,sd = 1)", "gamma")
# }

Run the code above in your browser using DataLab