Skip to content

Commit

Permalink
Merge pull request #95 from lilyclements/AlexOneVarUse
Browse files Browse the repository at this point in the history
Alex one var use
  • Loading branch information
AlexSananka authored May 26, 2017
2 parents 3be7bee + b928ad5 commit 17385fb
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 319 deletions.
8 changes: 4 additions & 4 deletions instat/dlgOneVarUseModel.Designer.vb

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

16 changes: 10 additions & 6 deletions instat/dlgOneVarUseModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,19 @@ Public Class dlgOneVarUseModel
sdgOneVarUseModFit.SetDefaults()

clsSeqFunction.SetRCommand("seq")
clsSeqFunction.AddParameter("from", 0)
clsSeqFunction.AddParameter("from", 0) ' TODO: these parameters have default values set earlier, are these needed here?
clsSeqFunction.AddParameter("to", 1)
clsSeqFunction.AddParameter("by", 0.1)
clsSeqFunction.AddParameter("by", 0.25)

clsQuantileFunction.SetRCommand("quantile")
clsQuantileFunction.AddParameter("probs", clsRFunctionParameter:=clsSeqFunction)
clsQuantileFunction.AddParameter("CI.level", 0.95)
'clsQuantileFunction.AddParameter("CI.level", 0.95) ' this should only be added if bootstrap is checked

clsRBootFunction.SetPackageName("fitdistrplus")
clsRBootFunction.SetRCommand("bootdist")
clsRBootFunction.AddParameter("bootmethod", Chr(34) & "nonparam" & Chr(34))
clsRBootFunction.AddParameter("niter", 1001)


ucrBase.clsRsyntax.SetBaseRFunction(clsQuantileFunction)

ucrBase.clsRsyntax.SetAssignTo(ucrNewDataFrameName.GetText, strTempModel:="last_model", strTempDataframe:=ucrSelectorUseModel.ucrAvailableDataFrames.cboAvailableDataFrames.Text)
Expand Down Expand Up @@ -143,8 +142,13 @@ Public Class dlgOneVarUseModel
'End If
'End Sub



Public Sub QuantileCommand()
If sdgOneVarUseModFit.rdoSequence.Checked Then
clsQuantileFunction.AddParameter("probs", clsRFunctionParameter:=clsSeqFunction)
Else
clsQuantileFunction.AddParameter("probs", strParameterValue:="c(" & sdgOneVarUseModFit.ucrInputQuantiles.GetText & ")")
End If
End Sub

Private Sub cmdFitModel_Click(sender As Object, e As EventArgs) Handles cmdFitModelandBootstrap.Click
sdgOneVarUseModFit.SetRFunction(clsSeqFunction, clsRBootFunction, clsQuantileFunction, bResetSubdialog)
Expand Down
Loading

0 comments on commit 17385fb

Please sign in to comment.