cModel.SetConfidenceLevel

From ReliaWiki
Revision as of 19:02, 9 June 2016 by Kate Racaza (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
APIWiki.png


Member of: SynthesisAPI.cModel


Sets the confidence level to use in confidence bounds calculations for published models. Returns a Boolean value; when true, indicates that a confidence level has been set.

Syntax

.SetConfidenceLevel(Level, Sides, UseConfidenceLevelInPercents, ByRef sError)

Parameters

Level

Required. Double. The confidence level, entered as a percentage.

Sides

Required. The sides setting (e.g., lower bound) for this confidence level. Can be any ConfBoundsSides constant.

UseConfidenceLevelInPercents

Required. Boolean. When true, the result is shown as a percentage; otherwise, it is shown as a decimal.

sError

Required. String. Returns a string for any error results.


Example

This example assumes that a published model with ID #47 exists in the repository.

VBA

 ... 

 'Get model ID #47 from project ID #1 in the repository. 
  Dim AModel As cModel
  MyRepository.Project.SetCurrentProject(1)  
  Set AModel = MyRepository.Model.GetModel(47)

 'Set the confidence level to 90% two-sided bounds. 
 'Declare a string variable for any errors found during this method. 
  Dim ErrorMsg As String
  Call AModel.SetConfidenceLevel(0.9, ConfBoundsSides_TwoSidedBoth, False, ErrorMsg)

 'Confidence bounds calculations are now possible. For example, 
 'the following code calculates the 90% two-sided confidence bounds on the reliability at 100 hrs. 
  Dim ResultValue As BoundsValues
  Set ResultValue = AModel.Bounds_Reliability(100)
VB.NET

 ... 

 'Get model ID #47 from project ID #1 in the repository. 
  Dim AModel As cModel
  MyRepository.Project.SetCurrentProject(1)  
  AModel = MyRepository.Model.GetModel(47)

 'Set the confidence level to 90% two-sided bounds. 
 'Declare a string variable for any errors found during this method. 
  Dim ErrorMsg As String
  AModel.SetConfidenceLevel(0.9, ConfBoundsSides.TwoSidedBoth, False, ErrorMsg)

 'Confidence bounds calculations are now possible. For example, 
 'the following code calculates the 90% two-sided confidence bounds on the reliability at 100 hrs. 
  Dim ResultValue As BoundsValues
  ResultValue = AModel.Bounds_Reliability(100)