WeibullDataSet.CalculateBestFit: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 9: Line 9:
== Usage Example ==
== Usage Example ==


{{APIComment|Declare the WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
{{APIComment|'Declare a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
        Dim WDS as New WeibullDataSet
  Dim WDS As New WeibullDataSet("AddFailure_Example")
 
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure]] for additional details.}}
{{APIComment|'Add failure times to the data set.}}
        WDS.AddFailure(1, 1)
  WDS.AddFailure(100, 1)
        WDS.AddFailure(2, 1)
  WDS.AddFailure(120, 1)
        WDS.AddFailure(3, 1)
  WDS.AddFailure(130, 1)
 
 
{{APIComment|Calculate the Fitted Model using the raw data.}}
{{APIComment|'Fit the data to a life distribution, using all default analysis settings.}}
        WDS.CalculateBestFit
  WDS.CalculateBestFit()
 
 
{{APIComment|Use the Fitted Model using the raw data.}}
{{APIComment|'Retrieve the fitted life distribution model. See [[cModel Class|cModel]].}}
        Dim WDSFittedModel as cModel
  Dim model As cModel
        WDSFittedModel = WDS.FittedModel
  model = WDS.FittedModel

Revision as of 20:05, 6 May 2014


Automatically finds the best fitting distribution and fits that distribution to the current data set using the settings specified in the BestFitSettings property.

This is equivalent to clicking the Implement button in the Distribution Wizard.

Syntax

  • CalculateBestFit()

Usage Example

 'Declare a new WeibullDataSet object. See WeibullDataSet. 
 Dim WDS As New WeibullDataSet("AddFailure_Example")

 'Add failure times to the data set. 
 WDS.AddFailure(100, 1)
 WDS.AddFailure(120, 1)
 WDS.AddFailure(130, 1)  
 
 'Fit the data to a life distribution, using all default analysis settings. 
 WDS.CalculateBestFit()
 
 'Retrieve the fitted life distribution model. See cModel. 
 Dim model As cModel
 model = WDS.FittedModel