CModel.Bounds Parameters: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:cModel.Bounds_Parameters}}
{{DISPLAYTITLE:cModel.Bounds Parameters}}{{Template:API}}{{Template:APIBreadcrumb|9|.[[CModel Class|cModel]]}}
{{Template:APIClass|CModel Class|cModel}}  
 
{{Template:CModel.Bounds Parameters.Cmt}} {{Template:CModel.BoundsNote.Cmt}}
 
<onlyinclude>Calculates the confidence bounds on the parameter estimates. Returns a '''[[ParamBoundsValues Class|ParamBoundsValues]]''' object array that contains contains the values.'''</onlyinclude>
 
You must first use the [[CModel.SetConfidenceLevel|SetConfidenceLevel]] method to specify the confidence bound settings, and then use this method to perform the calculations.  


== Syntax==
== Syntax==
*Bounds_Parameters() {{APIPrefix|As}} List({{APIPrefix|Of}} [[ParamBoundsValues Class|ParamBoundsValues]] )
'''.Bounds_Parameters()'''
 
 
== Example ==
'''VBA'''
{{APIComment|...}}
{{APIComment|'Add code to get an existing model or create a new one.}}
  {{APIPrefix|Dim}} AModel {{APIPrefix|As New}} cModel
{{APIComment|...}}
{{APIComment|'Set the confidence level to 90% two-sided bounds.}}
  {{APIPrefix|Dim}} ErrorMsg {{APIPrefix|As}} String
  {{APIPrefix|Call}} AModel.SetConfidenceLevel(0.9, ConfBoundsSides_TwoSidedBoth, False, ErrorMsg)
{{APIComment|'Calculate the bounds on the model's parameters.}}
  {{APIPrefix|Dim}} ResultValue() {{APIPrefix|As}} ParamBoundsValues
  ResultValue = AModel.Bounds_Parameters
{{APIComment|'Output sample: Display the bounds on the first parameter.}}
  {{APIPrefix|Dim}} ParamName {{APIPrefix|As String}}
  {{APIPrefix|Dim}} ParamUpperVal {{APIPrefix|As Double}}
  {{APIPrefix|Dim}} ParamLowerVal {{APIPrefix|As Double}}
  ParamName = ResultValue(0).ParamName
  ParamUpperVal = ResultValue(0).Upper
  ParamLowerVal = ResultValue(0).Lower
  MsgBox (ParamName & {{APIString|": "}} & ParamUpperVal & {{APIString|" and "}} & ParamLowerVal)


== Usage Example ==
'''VB.NET'''
<div style="margin-right: 150px">
  {{APIComment|'Declare a new repository connection object.}}
  {{APIComment|...}}
  Dim MyRepository As New Repository
 
  {{APIComment|'Add code to get an existing model or create a new one.}}
  {{APIComment|'Connect to the Synthesis repository.}}
   {{APIPrefix|Dim}} AModel {{APIPrefix|As New}} cModel
   Dim Success As Boolean = False
{{APIComment|...}}
  Success = MyRepository.ConnectToRepository("RepositoryFileNamePath")
   
  {{APIComment|'Set the confidence level to 90% two-sided bounds.}}
  {{APIComment|'Get the model with the numerical ID 15.}}
   {{APIPrefix|Dim}} ErrorMsg {{APIPrefix|As}} String
   Dim AModel as cModel
   AModel.SetConfidenceLevel(0.9, ConfBoundsSides.TwoSidedBoth, False, ErrorMsg)
   AModel = MyRepository.GetModel(15)
   
  {{APIComment|'Calculate the bounds on the model's parameters.}}
  {{APIComment|'Get the confidence bounds on the parameters of that model.}}
   {{APIPrefix|Dim}} ResultValue() {{APIPrefix|As}} ParamBoundsValues
   Dim ModelBoundsParameters() as ParamBoundsValues
   ResultValue = AModel.Bounds_Parameters
   ModelBoundsParameters = AModel.Bounds_Parameters
   
  {{APIComment|'Output sample: Display the bounds on the first parameter.}}
  {{APIComment|'Save the lower bound on the first parameter.}}
   {{APIPrefix|Dim}} ParamName {{APIPrefix|As String}}
   Dim lower as double
  {{APIPrefix|Dim}} ParamUpperVal {{APIPrefix|As Double}}
   lower = ModelBoundsParameters.Lower
   {{APIPrefix|Dim}} ParamLowerVal {{APIPrefix|As Double}}
</div>
  ParamName = ResultValue(0).ParamName
  ParamUpperVal = ResultValue(0).Upper
  ParamLowerVal = ResultValue(0).Lower
  MsgBox (ParamName & {{APIString|": "}} & ParamUpperVal & {{APIString|" and "}} & ParamLowerVal)

Revision as of 20:57, 29 July 2015

APIWiki.png


Member of: SynthesisAPI9.cModel


Calculates the confidence bounds on the parameter estimates. Returns a ParamBoundsValues object array that contains contains the values.

You must first use the SetConfidenceLevel method to specify the confidence bound settings, and then use this method to perform the calculations.

Syntax

.Bounds_Parameters()


Example

VBA

 ... 

 'Add code to get an existing model or create a new one. 
 Dim AModel As New cModel
 ... 

 'Set the confidence level to 90% two-sided bounds. 
 Dim ErrorMsg As String
 Call AModel.SetConfidenceLevel(0.9, ConfBoundsSides_TwoSidedBoth, False, ErrorMsg)

 'Calculate the bounds on the model's parameters. 
 Dim ResultValue() As ParamBoundsValues
 ResultValue = AModel.Bounds_Parameters

 'Output sample: Display the bounds on the first parameter. 
 Dim ParamName As String
 Dim ParamUpperVal As Double
 Dim ParamLowerVal As Double
 ParamName = ResultValue(0).ParamName
 ParamUpperVal = ResultValue(0).Upper
 ParamLowerVal = ResultValue(0).Lower
 MsgBox (ParamName & ": " & ParamUpperVal & " and " & ParamLowerVal)
VB.NET

 ... 

 'Add code to get an existing model or create a new one. 
 Dim AModel As New cModel
 ... 

 'Set the confidence level to 90% two-sided bounds. 
 Dim ErrorMsg As String
 AModel.SetConfidenceLevel(0.9, ConfBoundsSides.TwoSidedBoth, False, ErrorMsg)

 'Calculate the bounds on the model's parameters. 
 Dim ResultValue() As ParamBoundsValues
 ResultValue = AModel.Bounds_Parameters

 'Output sample: Display the bounds on the first parameter. 
 Dim ParamName As String
 Dim ParamUpperVal As Double
 Dim ParamLowerVal As Double
 ParamName = ResultValue(0).ParamName
 ParamUpperVal = ResultValue(0).Upper
 ParamLowerVal = ResultValue(0).Lower
 MsgBox (ParamName & ": " & ParamUpperVal & " and " & ParamLowerVal)