1. Home
  2. ELNEGBINOMIAL procedure

ELNEGBINOMIAL procedure

Calculates expected values of the lower parts of negative binomial distributions (R.W. Payne).

Options

BOUND = variate or scalar Boundary of upper part of distribution

Parameters

MEANS = variates or scalar Means of the distributions
AGGREGATION = scalars Aggregation parameter for the distributions
EXPECTEDVALUES = variates or scalar Saves the expected values
CLPROBABILITIES = variates or scalar Saves the cumulative lower probabilities

Description

ELNEGBINOMIAL calculates expected values of the lower parts of negative binomial distributions. The calculation is for all values less than or equal to the value specified, in either a scalar or a variate, by the BOUND option. The MEANS parameter specifies a variate containing means of the distributions, or it can be set to a scalar if there is a single distribution. If BOUND and MEANS are variates, they must both be the same length. The AGGREGATION parameter specifies a scalar containing their aggregation parameter. The expected values can be saved in either a variate or a scalar (to match the type of MEANS) by the EXPECTEDVALUES parameter. The corresponding cumulative lower probabilities can similarly be saved by the CLPROBABILITIES parameter.

Options: BOUND.

Parameters: MEANS, AGGREGATION , EXPECTEDVALUES, PROBABILITIES

Method

The expected value for each mean is given by the sum, for n running from one to BOUND, of

n * PRNEGATIVEBINOMIAL(n;mean) / CLNEGATIVEBINOMIAL(BOUND-1;mean)

Problems arise when the cumulative upper probability becomes very low. The calculation becomes unreliable, due to numerical round-off, for values less than 1.0 E−10. A missing value is then returned for the expected value, and a zero value for the cumulative lower probability.

See also

Directives: DISTRIBUTION

Procedures: EUNEGBINOMIAL ELGAMMA EUGAMMA ELPOISSON EUPOISSON RNBTOBIT

GenStat Reference Manual 1 Summary section on: Basic and nonparametric statistics.

Example

CAPTION  ' 'ELNEGBINOMAL example',!t('Expected values for means 5-25',\
              'with a lower bound of 10, and aggregation parameter 2.');\
              STYLE=meta,plain
VARIATE       [VALUES=5...25] Means
ELNEGBINOMIAL [BOUND=10] Means; AGGREGATION=2; EXPECTEDVALUES=Expected;\
              CLPROBABILITIES=Clpr
PRINT         Means,Expected,Clpr; DECIMALS=0,3,4

Updated on April 15, 2024

Was this article helpful?