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

Description Usage Arguments Value Examples

View source: R/additional_help_functions.R

Description

Function to check if the parameters are sufficient to define a probabiltiy 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

1
2
check_estimating_required_params(params_found, required_params, the_expr,
  distr_key)

Arguments

params_found

given parameters for generating ransom numbers

required_params

the required parameter by the R code (stats package)

the_expr

the expression that contain the definition

distr_key

the keyword used for generating random numbers in R stats package e.g. rgamma for gamma distribution

Value

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

Examples

1
check_estimating_required_params(c("mean,sd"),c("shape", "rate"), "gamma(mean =10 ,sd=1)", "gamma")

sheejamk/MarkovModel documentation built on Jan. 23, 2020, 2:44 a.m.