WeibullDataSet.CalculateBestFit: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 2: Line 2:




<onlyinclude>Performs goodness of fit tests to find the distribution that best fits the data set (similar to the Distribution Wizard feature in Weibull++). Returns a message box that shows the estimated parameters of the distribution that best fits the data. In addition, it creates a retrievable [[CModel Class|cModel]] object that represents the fitted model from the life data analysis.</onlyinclude>  
<onlyinclude>Determines the best distribution for a data set based on a chosen parameter estimation method (similar to the Distribution Wizard feature in Weibull++). Returns a message box that shows the estimated parameters of the distribution that best fits the data. In addition, it creates a retrievable [[CModel Class|cModel]] object that represents the fitted model from the life data analysis.</onlyinclude>  


Use the BestFitSettings property of the WeibullDataSet object to specify the criteria for evaluating the fit.  
Use the BestFitSettings property of the WeibullDataSet object to specify the parameter estimation method and other criteria for evaluating the fit.  


== Syntax  ==
== Syntax  ==
Line 33: Line 33:
   WDS.BestFitSettings.AllowGumbel = False
   WDS.BestFitSettings.AllowGumbel = False
    
    
  {{APIComment|'Perform the goodness of fit tests.}}
  {{APIComment|'Use the MLE parameter estimation method.}}
  WDS.BestFitSettings.Analysis = WeibullSolverMethod_MLE
{{APIComment|'Determine which distribution best fits the data set, based on the MLE method.}}
   {{APIPrefix|Call}} WDS.CalculateBestFit()
   {{APIPrefix|Call}} WDS.CalculateBestFit()
    
    
Line 67: Line 70:
   WDS.BestFitSettings.AllowLoglogistic = False
   WDS.BestFitSettings.AllowLoglogistic = False
   WDS.BestFitSettings.AllowGumbel = False
   WDS.BestFitSettings.AllowGumbel = False
{{APIComment|'Use the MLE parameter estimation method.}}
  WDS.BestFitSettings.Analysis = WeibullSolverMethod.MLE
    
    
  {{APIComment|'Perform the goodness of fit tests.}}
  {{APIComment|'Determine which distribution best fits the data set, based on the MLE method.}}
   WDS.CalculateBestFit()
   WDS.CalculateBestFit()
    
    

Revision as of 22:39, 25 April 2016

APIWiki.png


Member of: SynthesisAPI.WeibullDataSet


Determines the best distribution for a data set based on a chosen parameter estimation method (similar to the Distribution Wizard feature in Weibull++). Returns a message box that shows the estimated parameters of the distribution that best fits the data. In addition, it creates a retrievable cModel object that represents the fitted model from the life data analysis.

Use the BestFitSettings property of the WeibullDataSet object to specify the parameter estimation method and other criteria for evaluating the fit.

Syntax

.CalculateBestFit

Example

VBA

 'Declare a new WeibullDataSet object.  
  Dim WDS As New WeibullDataSet

 'Add failure times to the data set. 
  Call WDS.AddFailure(100, 1)
  Call WDS.AddFailure(120, 1)
  Call WDS.AddFailure(130, 1)  
 
 'Consider the normal, lognormal and 2-parameter Weibull distributions in the evaluation. 
  WDS.BestFitSettings.AllowExponential1 = False
  WDS.BestFitSettings.AllowExponential2 = False
  WDS.BestFitSettings.AllowNormal = True
  WDS.BestFitSettings.AllowLognormal = True
  WDS.BestFitSettings.AllowWeibull2 = True
  WDS.BestFitSettings.AllowWeibull3 = False
  WDS.BestFitSettings.AllowGamma = False
  WDS.BestFitSettings.AllowGenGamma = False
  WDS.BestFitSettings.AllowLogistic = False
  WDS.BestFitSettings.AllowLoglogistic = False
  WDS.BestFitSettings.AllowGumbel = False
 
 'Use the MLE parameter estimation method. 
  WDS.BestFitSettings.Analysis = WeibullSolverMethod_MLE

 'Determine which distribution best fits the data set, based on the MLE method. 
  Call WDS.CalculateBestFit()
 
 'Retrieve the fitted life distribution model. 
  Dim model As cModel
  Set model = WDS.FittedModel

 'Using the model, calculate the reliability at 100 hrs and display the result. 
  Dim r As Double
  r = model.reliability(100)
  MsgBox("Reliability at 100 hrs: " & r)
VB.NET

 'Declare a new WeibullDataSet object.  
  Dim WDS As New WeibullDataSet

 'Add failure times to the data set. 
  WDS.AddFailure(100, 1)
  WDS.AddFailure(120, 1)
  WDS.AddFailure(130, 1)  
 
 'Consider the normal, lognormal and 2-parameter Weibull distributions in the evaluation. 
  WDS.BestFitSettings.AllowExponential1 = False
  WDS.BestFitSettings.AllowExponential2 = False
  WDS.BestFitSettings.AllowNormal = True
  WDS.BestFitSettings.AllowLognormal = True
  WDS.BestFitSettings.AllowWeibull2 = True
  WDS.BestFitSettings.AllowWeibull3 = False
  WDS.BestFitSettings.AllowGamma = False
  WDS.BestFitSettings.AllowGenGamma = False
  WDS.BestFitSettings.AllowLogistic = False
  WDS.BestFitSettings.AllowLoglogistic = False
  WDS.BestFitSettings.AllowGumbel = False

 'Use the MLE parameter estimation method. 
  WDS.BestFitSettings.Analysis = WeibullSolverMethod.MLE
 
 'Determine which distribution best fits the data set, based on the MLE method. 
  WDS.CalculateBestFit()
 
 'Retrieve the fitted life distribution model. 
  Dim model As cModel
  model = WDS.FittedModel

 'Using the model, calculate the reliability at 100 hrs and display the result. 
  Dim r As Double
  r = model.reliability(100)
  MsgBox("Reliability at 100 hrs: " & r)