model_anything_byMonteCarloSimulation: Simulate anything by Monte Carlo assuming normal or...

Description Usage Arguments Details Value

View source: R/model_anything_byMonteCarloSimulation.R

Description

By relying on Law of Large Numbers estimate the statistical distribution by Monte Carlo simulation.

Usage

1
model_anything_byMonteCarloSimulation(mod, spins, verbose = T)

Arguments

mod

A list whose elements are vectors describing the normal or skew normal probability distributions which will be used in Monte Carlo simulation. For normal distribution the length of vector must be 2 with mean and st.dev being 1st and 2nd element respectively. For skew-normal distribution the length of vector must be 3 with mean (mu), st.dev (omega), and skewness (alpha) being 1st, 2nd and 3rd element respectively.

spins

A numeric of count of spins to be performed for the Monte Carlo simulation.

verbose

A boolean indicating whether to execute in verbose mode.

Details

The assumption is that the object to be modeled can be so by linear function with single or multiple terms (tasks) where the terms are summed-up. In the case of computing the time required to complete a project this means each term (task) is dependent on the completion of other sub-task. An underlying statistical distribution for the individual terms has to be assumed. In this case it is either normal or skew-normal distribution. For example the model can be TIME_TOTAL = TIME_TASK_1 + TIME_TASK_2 + TIME_TASK_3 which would have its P(TIME_TOTAL) = P(TIME_TASK_1) + P(TIME_TASK_2) + P(TIME_TASK_3) described by parameters of normal os skewed-normal distribution. An inverse of cumulative density function (iCDF) is used to compute the simulated values corresponding to randomly generated cumulative probability (within the range of 0 and 1).

Value

A numeric vector of simulated values.


msxakk89/dat documentation built on Aug. 3, 2020, 6:39 p.m.