Command:

addFacGamma (  
char* name,
double r,
double lambda,
double b,
double trunc,
char* note
)

What:

Adds a new factor with a Gamma distribution to the configuration to be used for the sample generation

Parameters:

name
[char*]
defines the factor's name. It must begin with a letter and can contain only letters and numbers, this parameter cannot be null!
r
[double precision #]
r parameter of the distribution
lambda
[double precision #]
lambda parameter of the distribution
b
[double precision #]
b parameter of the distribution
trunc
[double precision #]
right truncation value for the distribution
note
[char*]
the factor note is optional in Matlab

Return:

error_code [int]: 1 if the operation has occurred without errors, 0 if an error has occurred


Examples:

addFacGamma('fac1', 1, 1, 0, 0.999, 'fac1note')

this command creates a new factor called fac1 with a gamma distribution which parameters r, lambda and b values respectively are 1, 1  and 0 while the distribution is truncated after 0.999 

About the distribution:

The density function of the Gamma distribution has the following expression:

gamma

with with r>0 , λ>0 , b0 and x≥b

mean value:                                        standard deviation:

gamma                                                 gamma

All Factor Commands: