Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit extremes: Added options to fit an extreme value distribution (EVD) to Data #5933

Merged
merged 23 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
422 changes: 267 additions & 155 deletions instat/dlgExtremes.Designer.vb

Large diffs are not rendered by default.

1,047 changes: 741 additions & 306 deletions instat/dlgExtremes.resx

Large diffs are not rendered by default.

303 changes: 263 additions & 40 deletions instat/dlgExtremes.vb

Large diffs are not rendered by default.

191 changes: 189 additions & 2 deletions instat/sdgExtremesDisplayOptions.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 80 additions & 2 deletions instat/sdgExtremesDisplayOptions.vb
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
Public Class sdgExtremesDisplayOptions
' R- Instat
' Copyright (C) 2015-2017
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.
Imports instat.Translations
Public Class sdgExtremesDisplayOptions
lloyddewit marked this conversation as resolved.
Show resolved Hide resolved
Public clsPlotFunction As New RFunction
Public clsRsyntax As New RSyntax
Public bControlsInitialised As Boolean = False
Private Sub sdgExtremeDisplayOtions(sender As Object, e As EventArgs) Handles MyBase.Load
autoTranslate(Me)
End Sub

End Class
Public Sub InitialiseControls()
ucrPnlExtreme.SetParameter(New RParameter("type", 1))


ucrPnlExtreme.AddRadioButton(rdoPrimary, Chr(34) & "primary" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoDensity, Chr(34) & "density" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoHist, Chr(34) & "hist" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoProbprob, Chr(34) & "probprob" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoQQ2, Chr(34) & "qq2" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoQQPlot, Chr(34) & "qq" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoRlplot, Chr(34) & "rl" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoZPlot, Chr(34) & "Zplot" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoTrace, Chr(34) & "trace" & Chr(34))
ucrPnlExtreme.AddRadioButton(rdoNoPlot)

ucrPnlExtreme.AddParameterPresentCondition(rdoNoPlot, "type", False)
ucrPnlExtreme.AddParameterValuesCondition(rdoPrimary, "type", Chr(34) & "primary" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoDensity, "type", Chr(34) & "density" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoHist, "type", Chr(34) & "hist" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoProbprob, "type", Chr(34) & "probprob" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoQQ2, "type", Chr(34) & "qq2" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoQQPlot, "type", Chr(34) & "qq" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoRlplot, "type", Chr(34) & "rl" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoZPlot, "type", Chr(34) & "Zplot" & Chr(34))
ucrPnlExtreme.AddParameterValuesCondition(rdoTrace, "type", Chr(34) & "trace" & Chr(34))

ucrSavePlots.SetPrefix("plot")
ucrSavePlots.SetSaveTypeAsGraph()
ucrSavePlots.SetDataFrameSelector(dlgExtremes.ucrSelectorExtremes.ucrAvailableDataFrames)
ucrSavePlots.SetCheckBoxText("Save Graph:")
ucrSavePlots.SetIsComboBox()
ucrSavePlots.SetAssignToIfUncheckedValue("last_graph")

bControlsInitialised = True
End Sub

Public Sub SetRCode(clsNewPlotFunction As RFunction, clsNewRSyntax As RSyntax, Optional bReset As Boolean = False)
If Not bControlsInitialised Then
InitialiseControls()
lloyddewit marked this conversation as resolved.
Show resolved Hide resolved
End If

clsRsyntax = clsNewRSyntax
clsPlotFunction = clsNewPlotFunction

ucrPnlExtreme.SetRCode(clsPlotFunction, bReset, bCloneIfNeeded:=True)
ucrSavePlots.SetRCode(clsPlotFunction, bReset, bCloneIfNeeded:=True)
End Sub

Private Sub ucrPnlExtreme_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlExtreme.ControlValueChanged
If rdoNoPlot.Checked Then
clsPlotFunction.RemoveParameterByName("type")
clsRsyntax.RemoveFromAfterCodes(clsPlotFunction)
Else
clsRsyntax.AddToAfterCodes(clsPlotFunction, iPosition:=0)
End If
End Sub
End Class
86 changes: 84 additions & 2 deletions instat/sdgExtremesMethod.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading