Learn R Programming

packDAMipd (version 1.1.0)

check_estimate_substitute_proper_params: ####################################################################### Function to get the expression, analyse it for what distribution it is, then check if it has all parameters requires, if not estimate the required parameters from given parameters, and substitute it for actual expression that can be used with R stats package

Description

####################################################################### Function to get the expression, analyse it for what distribution it is, then check if it has all parameters requires, if not estimate the required parameters from given parameters, and substitute it for actual expression that can be used with R stats package

Usage

check_estimate_substitute_proper_params(the_expr)

Value

the keyword that should be used in R for generating random numbers

Arguments

the_expr

given parameters for generating ransom numbers

Details

Get the expression of probability distribution with parameters, get the parameters that are found, then find the required params and if they are ok if not try if they can be estimated. Then it will substitute for proper parameters in the way R is expecting to perform

Examples

Run this code
check_estimate_substitute_proper_params("gamma(mean = 10 ,sd=1)")

Run the code above in your browser using DataLab