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

SPA SDK Help HomeLearn More About the SPA SDK

SPADistribution.Survival (method)

Description

Evaluates the Survival Function.

Syntax

object.Survival(x As Double)

Arguments

Name
Type
Description
x Double The x-value at which the PDF should be evaluated. This argument must be within the accepted range of values, otherwise the method will return the SPAEInvalidArg error. You can use the SPADistribution.Defined property to check if the function can be evaluated at the specified x-value.

Return Value

(Double) - the Survival Function value.

Example

Sub Test()
  Dim dist As New SPADistribution
  Dim x, y As Double

  SPAApplication.Initialize

  ' specify the distribution type and parameters
  dist.Type = SPADistWeibull  ' Weibull distribution 
  dist.Param(0) = 1.5         ' alpha
  dist.Param(1) = 2           ' beta

  x = 1

  ' check if the x-value is valid
  If dist.Defined(x) Then
    y = dist.Survival(x)
  Else
    MsgBox "The distribution is not defined for this x-value"
  End If
End Sub
  
Copyright © MathWave Technologies
www.mathwave.com