Skip to content

Commit

Permalink
Merge pull request #5 from Ivanluv/TEST
Browse files Browse the repository at this point in the history
minor fix
  • Loading branch information
Tula1 committed Aug 3, 2022
2 parents 8f324a5 + ae88291 commit 46aef13
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
4 changes: 1 addition & 3 deletions instat/dlgExtremes.vb
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ clsInitialListFunction As New RFunction

clsFevdFunction.SetPackageName("extRemes")
clsFevdFunction.SetRCommand("fevd")
clsFevdFunction.AddParameter("priorParams", clsRFunctionParameter:=clsPriorParamListFunction, iPosition:=4)
clsFevdFunction.AddParameter("initial", clsRFunctionParameter:=clsInitialListFunction, iPosition:=5)
clsFevdFunction.AddParameter("iter", "9999", iPosition:=6)


clsFevdFunction.AddParameter("type", Chr(34) & "GEV" & Chr(34), iPosition:=0)
clsFevdFunction.AddParameter("method", Chr(34) & "MLE" & Chr(34), iPosition:=1)
Expand Down
19 changes: 15 additions & 4 deletions instat/sdgExtremesMethod.vb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ Public Class sdgExtremesMethod
ucrPnlFitMethodExtremes.AddRadioButton(rdoLmoments, Chr(34) & "Lmoments" & Chr(34))

ucrPnlFitMethodExtremes.AddToLinkedControls(ucrInputPrior, {rdoBayesian}, bNewLinkedHideIfParameterMissing:=True)
ucrPnlFitMethodExtremes.AddToLinkedControls({ucrNudNumberOfIterations, ucrNudScale,
ucrPnlFitMethodExtremes.AddToLinkedControls({ucrNudScale,
ucrNudShape, ucrNudLocation}, {rdoBayesian},
bNewLinkedHideIfParameterMissing:=True)
ucrPnlFitMethodExtremes.AddToLinkedControls(ucrNudNumberOfIterations, {rdoBayesian}, bNewLinkedHideIfParameterMissing:=True,
bNewLinkedAddRemoveParameter:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=999,
bNewLinkedUpdateFunction:=True)


ucrChkType.SetText("Type")
ucrChkType.AddParameterPresentCondition(True, "type")
Expand Down Expand Up @@ -130,12 +134,9 @@ Public Class sdgExtremesMethod
ucrChkType.SetRCode(clsConfidenceIntervalFunction, bReset)
ucrNudReturnLevel.SetRCode(clsConfidenceIntervalFunction, bReset)
ucrInputPrior.SetRCode(clsConcatenateFunction, bReset)
ucrNudNumberOfIterations.SetRCode(clsFevdFunction, bReset)

ucrNudLocation.SetRCode(clsInitialListFunction, bReset)
ucrNudScale.SetRCode(clsInitialListFunction, bReset)
ucrNudShape.SetRCode(clsInitialListFunction, bReset)

ucrPnlFitMethodExtremes.SetRCode(clsFevdFunction, bReset)
ucrPnlDisplayOptionsExtreme.SetRCode(clsPlotFunction, bReset, bCloneIfNeeded:=True)
ucrSavePlots.SetRCode(clsPlotFunction, bReset, bCloneIfNeeded:=True)
Expand All @@ -158,4 +159,14 @@ Public Class sdgExtremesMethod
clsRsyntax.SetBaseRFunction(clsFevdFunction)
End If
End Sub

Private Sub ucrPnlFitMethodExtremes_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlFitMethodExtremes.ControlValueChanged
If rdoBayesian.Checked Then
clsFevdFunction.AddParameter("priorParams", clsRFunctionParameter:=clsPriorParamListFunction, iPosition:=4)
clsFevdFunction.AddParameter("initial", clsRFunctionParameter:=clsInitialListFunction, iPosition:=5)
Else
clsFevdFunction.RemoveParameterByName("priorParams")
clsFevdFunction.RemoveParameterByName("initial")
End If
End Sub
End Class

0 comments on commit 46aef13

Please sign in to comment.