Simulation & Probabilistic Analysis SDK
Add Distribution Fitting & Simulation Features to Your Applications

SPA SDK Help HomeLearn More About the SPA SDK

Input Data

The first step of the data analysis process is specifying your input data. The SPA SDK provides the SPADataSet object that works as a container for your data. To specify the data, use the SPADataSet.Assign function that accepts the following four combinations of input arguments:

#
domainType
dataType
data1
data2
1 SPADomainContinuous SPADataSample Sample data values (an array of type double) Not required (you can specify an empty array or just any array of type double)
2 SPADomainContinuous SPADataXDensity Data X values (an array of type double) Corresponding probability density values (an array of type double); typically the sum of density values equals 1 representing the area under the density curve, but if it doesn't, the SDK will automatically normalize your density data
3 SPADomainDiscrete SPADataSample Sample data values (an array of type double that contains integer values) Not required (you can specify an empty array or just any array of type double)
4 SPADomainDiscrete SPADataXCount Data X values (an array of type double that contains integer values) Count values denoting the number of corresponding X values in a sample (an array of type double that contains positive integer values)

In addition to the above mentioned data format requirements, the data must contain at least five values, and must not be constant. If one of these conditions is not met, the method will return an error (see Error Handling).

Example

The following example initializes the SPADataSet object using the array of doubles:

Sub Test()
  Dim data(5) As Double
  Dim empty() As Double
  Dim dataSet As New SPADataSet

  SPAApplication.Initialize

  ' specify the data
  data(0) = 1.5
  data(1) = 3.2
  data(2) = 9.6
  data(3) = 4.1
  data(4) = 7.8

  ' assign the data
  Call dataSet.Assign(SPADomainContinuous, SPADataSample, data, empty)
End Sub
  
Copyright © MathWave Technologies
www.mathwave.com