UnequalProbabilityRandomSamplingFromInclusionProbabilities Method

Initializes a new instance of the UnequalProbabilityRandomSampling class by specifying the inclusion probabilities assigned to the population units.

Definition

Namespace: Novacta.Analytics
Assembly: Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.1.0+428f3840cfab98dda567bb0ed350b302533e273a
C#
public static UnequalProbabilityRandomSampling FromInclusionProbabilities(
	DoubleMatrix inclusionProbabilities
)

Parameters

inclusionProbabilities  DoubleMatrix
The inclusion probabilities assigned to the population units.

Return Value

UnequalProbabilityRandomSampling
The UnequalProbabilityRandomSampling instance having the specified characteristics.

Remarks

Method FromInclusionProbabilities(DoubleMatrix) creates UnequalProbabilityRandomSampling instances by specifying, for each population unit, its probability of being included in a sample. In this case, the sample size is defined as the sum of such probabilities.

Exceptions

ArgumentNullExceptioninclusionProbabilities is null.
ArgumentExceptioninclusionProbabilities has Count equal to 1.
-or-
inclusionProbabilities contains entries whose sum differs from an integer more than .001 in absolute value.
ArgumentOutOfRangeExceptioninclusionProbabilities contains at least an entry not belonging to the open interval ]0, 1[.

See Also