From 0cdcaba095d2c965794b9eddd8c635be3996a1ff Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 13:52:58 +0300 Subject: [PATCH 001/172] Changed the name for the second button --- instat/dlgOneVarFitModel.vb | 24 ++-- instat/dlgOneVarFitModel2.Designer.vb | 182 +++++++++++++------------- 2 files changed, 103 insertions(+), 103 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index c0338d53f3b..0459b2ac022 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -77,10 +77,10 @@ Public Class dlgOneVarFitModel ucrChkBinModify.SetText("Modify Conditions for 'Success'") ucrPnlGeneralExactCase.AddRadioButton(rdoGeneralCase) - ucrPnlGeneralExactCase.AddRadioButton(rdoExactCase) + ucrPnlGeneralExactCase.AddRadioButton(rdoTest) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoExactCase, "fitdist", False) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) ucrPnlStats.AddRadioButton(rdoEnorm) ucrPnlStats.AddRadioButton(rdoMeanWilcox) @@ -97,10 +97,10 @@ Public Class dlgOneVarFitModel ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoVarSignTest, "signmedian.test") - ucrPnlGeneralExactCase.AddToLinkedControls(ucrPnlStats, {rdoExactCase}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudCI, {rdoExactCase}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrPnlStats, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudCI, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrNudCI.SetLinkedDisplayControl(lblConfidenceLimit) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHyp, {rdoExactCase}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHyp, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrNudHyp.SetLinkedDisplayControl(lblHyp) ucrPnlStats.SetLinkedDisplayControl(grpConditions) @@ -124,7 +124,7 @@ Public Class dlgOneVarFitModel dctucrOperator.Add("(!=)", "!=") 'Disabled for now - rdoExactCase.Enabled = False + rdoTest.Enabled = False 'ucrOperator.SetItems(dctucrOperator) ' ucrVariables.SetItemsTypeAsColumns() 'we want SetItemsTypeAs factors in the column @@ -320,7 +320,7 @@ Public Class dlgOneVarFitModel Private Sub SetDistributions() If rdoGeneralCase.Checked Then ucrDistributionChoice.SetAllDistributions() - ElseIf rdoExactCase.Checked Then + ElseIf rdoTest.Checked Then ucrDistributionChoice.SetExactDistributions() End If End Sub @@ -447,7 +447,7 @@ Public Class dlgOneVarFitModel clsRplotDenscomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) clsRplotDenscomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) - ElseIf rdoExactCase.Checked Then + ElseIf rdoTest.Checked Then If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then grpVarAndWilcoxSign.Hide() grpVarAndWilcox.Hide() @@ -460,7 +460,7 @@ Public Class dlgOneVarFitModel ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Then grpVarAndWilcox.Show() grpVarAndWilcoxSign.Hide() - If rdoExactCase.Checked Then + If rdoTest.Checked Then If rdoMeanWilcox.Checked Then ucrNudHyp.SetMinMax(0.00, 1) clsRTTest.AddParameter("x", clsRFunctionParameter:=clsRConvertVector) @@ -498,7 +498,7 @@ Public Class dlgOneVarFitModel Public Sub DataTypeAccepted() If rdoGeneralCase.Checked Then ucrReceiverVariable.RemoveIncludedMetadataProperty("class") - ElseIf rdoExactCase.Checked Then + ElseIf rdoTest.Checked Then If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then ucrReceiverVariable.SetIncludedDataTypes({"numeric"}) If (ucrReceiverVariable.strCurrDataType = "factor" OrElse ucrReceiverVariable.strCurrDataType = "character") Then @@ -592,7 +592,7 @@ Public Class dlgOneVarFitModel 'rdoVarSign.Visible = False ' rdoEnorm.Visible = False grpVarAndWilcoxSign.Hide() - ElseIf rdoExactCase.Checked Then + ElseIf rdoTest.Checked Then cmdFittingOptions.Visible = False cmdDisplayOptions.Visible = False ucrChkConvertVariate.Visible = False @@ -668,7 +668,7 @@ Public Class dlgOneVarFitModel End Sub Private Sub BinomialConditions() - If rdoExactCase.Checked AndAlso ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Then + If rdoTest.Checked AndAlso ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Then 'ucrChkBinModify.Enabled = True ucrChkBinModify.Visible = True If ucrChkBinModify.Checked Then diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 489e5921700..45d511f7c61 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -41,31 +41,31 @@ Partial Class dlgOneVarFitModel Me.LblVariable = New System.Windows.Forms.Label() Me.lblSuccessIf = New System.Windows.Forms.Label() Me.lblEquals = New System.Windows.Forms.Label() - Me.rdoExactCase = New System.Windows.Forms.RadioButton() + Me.rdoTest = New System.Windows.Forms.RadioButton() Me.rdoGeneralCase = New System.Windows.Forms.RadioButton() Me.grpConditions = New System.Windows.Forms.GroupBox() Me.grpVarAndWilcoxSign = New System.Windows.Forms.GroupBox() Me.rdoWilcoxSignTest = New System.Windows.Forms.RadioButton() Me.rdoVarSignTest = New System.Windows.Forms.RadioButton() + Me.ucrPnlWilcoxVarTest = New instat.UcrPanel() Me.grpVarAndWilcox = New System.Windows.Forms.GroupBox() Me.rdoEnorm = New System.Windows.Forms.RadioButton() Me.rdoMeanWilcox = New System.Windows.Forms.RadioButton() Me.rdoVarSign = New System.Windows.Forms.RadioButton() - Me.lblHyp = New System.Windows.Forms.Label() - Me.lblConfidenceLimit = New System.Windows.Forms.Label() - Me.cmdDisplayOptions = New System.Windows.Forms.Button() - Me.cmdFittingOptions = New System.Windows.Forms.Button() - Me.ucrChkConvertVariate = New instat.ucrCheck() - Me.ucrPnlGeneralExactCase = New instat.UcrPanel() - Me.ucrSaveModel = New instat.ucrSave() - Me.ucrPnlWilcoxVarTest = New instat.UcrPanel() Me.ucrPnlStats = New instat.UcrPanel() Me.ucrChkBinModify = New instat.ucrCheck() Me.ucrNudBinomialConditions = New instat.ucrNud() Me.ucrOperator = New instat.ucrInputComboBox() Me.ucrVariables = New instat.ucrInputComboBox() + Me.lblHyp = New System.Windows.Forms.Label() Me.ucrNudHyp = New instat.ucrNud() + Me.lblConfidenceLimit = New System.Windows.Forms.Label() Me.ucrNudCI = New instat.ucrNud() + Me.cmdDisplayOptions = New System.Windows.Forms.Button() + Me.cmdFittingOptions = New System.Windows.Forms.Button() + Me.ucrChkConvertVariate = New instat.ucrCheck() + Me.ucrPnlGeneralExactCase = New instat.UcrPanel() + Me.ucrSaveModel = New instat.ucrSave() Me.ucrDistributionChoice = New instat.ucrDistributions() Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() @@ -102,20 +102,20 @@ Partial Class dlgOneVarFitModel Me.lblEquals.TabIndex = 33 Me.lblEquals.Text = "=" ' - 'rdoExactCase - ' - Me.rdoExactCase.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoExactCase.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoExactCase.FlatAppearance.BorderSize = 2 - Me.rdoExactCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoExactCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoExactCase.Location = New System.Drawing.Point(194, 11) - Me.rdoExactCase.Name = "rdoExactCase" - Me.rdoExactCase.Size = New System.Drawing.Size(126, 28) - Me.rdoExactCase.TabIndex = 41 - Me.rdoExactCase.Text = "Exact Solution" - Me.rdoExactCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoExactCase.UseVisualStyleBackColor = True + 'rdoTest + ' + Me.rdoTest.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoTest.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTest.FlatAppearance.BorderSize = 2 + Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoTest.Location = New System.Drawing.Point(194, 11) + Me.rdoTest.Name = "rdoTest" + Me.rdoTest.Size = New System.Drawing.Size(126, 28) + Me.rdoTest.TabIndex = 41 + Me.rdoTest.Text = "Test" + Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoTest.UseVisualStyleBackColor = True ' 'rdoGeneralCase ' @@ -187,6 +187,13 @@ Partial Class dlgOneVarFitModel Me.rdoVarSignTest.Text = "Compare Vaiance" Me.rdoVarSignTest.UseVisualStyleBackColor = True ' + 'ucrPnlWilcoxVarTest + ' + Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(6, 11) + Me.ucrPnlWilcoxVarTest.Name = "ucrPnlWilcoxVarTest" + Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(117, 48) + Me.ucrPnlWilcoxVarTest.TabIndex = 63 + ' 'grpVarAndWilcox ' Me.grpVarAndWilcox.Controls.Add(Me.rdoEnorm) @@ -233,72 +240,6 @@ Partial Class dlgOneVarFitModel Me.rdoVarSign.Text = "Compare Variance" Me.rdoVarSign.UseVisualStyleBackColor = True ' - 'lblHyp - ' - Me.lblHyp.AutoSize = True - Me.lblHyp.Location = New System.Drawing.Point(6, 40) - Me.lblHyp.Name = "lblHyp" - Me.lblHyp.Size = New System.Drawing.Size(83, 13) - Me.lblHyp.TabIndex = 46 - Me.lblHyp.Text = "Null Hypothesis:" - ' - 'lblConfidenceLimit - ' - Me.lblConfidenceLimit.AutoSize = True - Me.lblConfidenceLimit.Location = New System.Drawing.Point(6, 13) - Me.lblConfidenceLimit.Name = "lblConfidenceLimit" - Me.lblConfidenceLimit.Size = New System.Drawing.Size(88, 13) - Me.lblConfidenceLimit.TabIndex = 47 - Me.lblConfidenceLimit.Text = "Confidence Limit:" - ' - 'cmdDisplayOptions - ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(294, 286) - Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) - Me.cmdDisplayOptions.TabIndex = 44 - Me.cmdDisplayOptions.Text = "Display Options" - Me.cmdDisplayOptions.UseVisualStyleBackColor = True - ' - 'cmdFittingOptions - ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(294, 262) - Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) - Me.cmdFittingOptions.TabIndex = 43 - Me.cmdFittingOptions.Text = "Fitting Options" - Me.cmdFittingOptions.UseVisualStyleBackColor = True - ' - 'ucrChkConvertVariate - ' - Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) - Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) - Me.ucrChkConvertVariate.TabIndex = 42 - ' - 'ucrPnlGeneralExactCase - ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(67, 7) - Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(266, 35) - Me.ucrPnlGeneralExactCase.TabIndex = 39 - ' - 'ucrSaveModel - ' - Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(255, 24) - Me.ucrSaveModel.TabIndex = 38 - ' - 'ucrPnlWilcoxVarTest - ' - Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(6, 11) - Me.ucrPnlWilcoxVarTest.Name = "ucrPnlWilcoxVarTest" - Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(117, 48) - Me.ucrPnlWilcoxVarTest.TabIndex = 63 - ' 'ucrPnlStats ' Me.ucrPnlStats.Location = New System.Drawing.Point(6, 10) @@ -344,6 +285,15 @@ Partial Class dlgOneVarFitModel Me.ucrVariables.Size = New System.Drawing.Size(88, 21) Me.ucrVariables.TabIndex = 32 ' + 'lblHyp + ' + Me.lblHyp.AutoSize = True + Me.lblHyp.Location = New System.Drawing.Point(6, 40) + Me.lblHyp.Name = "lblHyp" + Me.lblHyp.Size = New System.Drawing.Size(83, 13) + Me.lblHyp.TabIndex = 46 + Me.lblHyp.Text = "Null Hypothesis:" + ' 'ucrNudHyp ' Me.ucrNudHyp.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -356,6 +306,15 @@ Partial Class dlgOneVarFitModel Me.ucrNudHyp.TabIndex = 49 Me.ucrNudHyp.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' + 'lblConfidenceLimit + ' + Me.lblConfidenceLimit.AutoSize = True + Me.lblConfidenceLimit.Location = New System.Drawing.Point(6, 13) + Me.lblConfidenceLimit.Name = "lblConfidenceLimit" + Me.lblConfidenceLimit.Size = New System.Drawing.Size(88, 13) + Me.lblConfidenceLimit.TabIndex = 47 + Me.lblConfidenceLimit.Text = "Confidence Limit:" + ' 'ucrNudCI ' Me.ucrNudCI.DecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0}) @@ -368,6 +327,47 @@ Partial Class dlgOneVarFitModel Me.ucrNudCI.TabIndex = 48 Me.ucrNudCI.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' + 'cmdDisplayOptions + ' + Me.cmdDisplayOptions.Location = New System.Drawing.Point(294, 286) + Me.cmdDisplayOptions.Name = "cmdDisplayOptions" + Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdDisplayOptions.TabIndex = 44 + Me.cmdDisplayOptions.Text = "Display Options" + Me.cmdDisplayOptions.UseVisualStyleBackColor = True + ' + 'cmdFittingOptions + ' + Me.cmdFittingOptions.Location = New System.Drawing.Point(294, 262) + Me.cmdFittingOptions.Name = "cmdFittingOptions" + Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdFittingOptions.TabIndex = 43 + Me.cmdFittingOptions.Text = "Fitting Options" + Me.cmdFittingOptions.UseVisualStyleBackColor = True + ' + 'ucrChkConvertVariate + ' + Me.ucrChkConvertVariate.Checked = False + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) + Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) + Me.ucrChkConvertVariate.TabIndex = 42 + ' + 'ucrPnlGeneralExactCase + ' + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(67, 7) + Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(266, 35) + Me.ucrPnlGeneralExactCase.TabIndex = 39 + ' + 'ucrSaveModel + ' + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveModel.Name = "ucrSaveModel" + Me.ucrSaveModel.Size = New System.Drawing.Size(255, 24) + Me.ucrSaveModel.TabIndex = 38 + ' 'ucrDistributionChoice ' Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) @@ -412,7 +412,7 @@ Partial Class dlgOneVarFitModel Me.ClientSize = New System.Drawing.Size(418, 374) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) - Me.Controls.Add(Me.rdoExactCase) + Me.Controls.Add(Me.rdoTest) Me.Controls.Add(Me.cmdFittingOptions) Me.Controls.Add(Me.rdoGeneralCase) Me.Controls.Add(Me.ucrPnlGeneralExactCase) @@ -450,7 +450,7 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrVariables As ucrInputComboBox Friend WithEvents lblEquals As Label Friend WithEvents ucrSaveModel As ucrSave - Friend WithEvents rdoExactCase As RadioButton + Friend WithEvents rdoTest As RadioButton Friend WithEvents rdoGeneralCase As RadioButton Friend WithEvents ucrPnlGeneralExactCase As UcrPanel Friend WithEvents ucrChkConvertVariate As ucrCheck From d4153bf15d64f92bccb9f935109befa8449214d9 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 13:55:47 +0300 Subject: [PATCH 002/172] Added a new button called estimate --- instat/dlgOneVarFitModel2.Designer.vb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 45d511f7c61..ceb795268be 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -70,6 +70,7 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.grpConditions.SuspendLayout() Me.grpVarAndWilcoxSign.SuspendLayout() Me.grpVarAndWilcox.SuspendLayout() @@ -405,11 +406,27 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'rdoEstimate + ' + Me.rdoEstimate.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoEstimate.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEstimate.FlatAppearance.BorderSize = 2 + Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoEstimate.Location = New System.Drawing.Point(319, 11) + Me.rdoEstimate.Name = "rdoEstimate" + Me.rdoEstimate.Size = New System.Drawing.Size(126, 28) + Me.rdoEstimate.TabIndex = 45 + Me.rdoEstimate.Text = "Estimate" + Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoEstimate.UseVisualStyleBackColor = True + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(418, 374) + Me.ClientSize = New System.Drawing.Size(454, 374) + Me.Controls.Add(Me.rdoEstimate) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) Me.Controls.Add(Me.rdoTest) @@ -473,4 +490,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrPnlWilcoxVarTest As UcrPanel Friend WithEvents cmdDisplayOptions As Button Friend WithEvents cmdFittingOptions As Button + Friend WithEvents rdoEstimate As RadioButton End Class \ No newline at end of file From 88fa8029044f33541185528010f9ce052ab6ba2b Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 14:02:12 +0300 Subject: [PATCH 003/172] Set the condition for the new button --- instat/dlgOneVarFitModel.vb | 1 + instat/dlgOneVarFitModel2.Designer.vb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0459b2ac022..adf515b2bf5 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -81,6 +81,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) ucrPnlStats.AddRadioButton(rdoEnorm) ucrPnlStats.AddRadioButton(rdoMeanWilcox) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index ceb795268be..6f738eca7a7 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -413,7 +413,7 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(319, 11) + Me.rdoEstimate.Location = New System.Drawing.Point(320, 11) Me.rdoEstimate.Name = "rdoEstimate" Me.rdoEstimate.Size = New System.Drawing.Size(126, 28) Me.rdoEstimate.TabIndex = 45 From c66e3f0471042f8f510d0c541ac1434d72cef8de Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 14:12:42 +0300 Subject: [PATCH 004/172] Set the property for the ucrSaveModel for the new buttons --- instat/dlgOneVarFitModel.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index adf515b2bf5..5a8ebf4354a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -643,6 +643,11 @@ Public Class dlgOneVarFitModel BinomialConditions() SetDistributions() DataTypeAccepted() + If rdoTest.Checked Then + ucrDistributionChoice.lblDistributionType.Text = "Test:" + ucrSaveModel.SetCheckBoxText("Save Test") + ucrSaveModel.SetPrefix("test") + End If End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged From 5c844ed1a1678da6a755cee5712d99d7cfb11cfb Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 14:14:30 +0300 Subject: [PATCH 005/172] Set the property of ucrSaveModel for the new buttons --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5a8ebf4354a..6ce5ef030a0 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -647,6 +647,10 @@ Public Class dlgOneVarFitModel ucrDistributionChoice.lblDistributionType.Text = "Test:" ucrSaveModel.SetCheckBoxText("Save Test") ucrSaveModel.SetPrefix("test") + ElseIf rdoEstimate.Checked Then + ucrDistributionChoice.lblDistributionType.Text = "Estimate:" + ucrSaveModel.SetCheckBoxText("Save Estimate") + ucrSaveModel.SetPrefix("ci") End If End Sub From 3af437cd99c32d366c06bad3f9981752e5456193 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 14:18:07 +0300 Subject: [PATCH 006/172] Set the properties for the controls --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 6ce5ef030a0..a75eba64208 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -651,6 +651,10 @@ Public Class dlgOneVarFitModel ucrDistributionChoice.lblDistributionType.Text = "Estimate:" ucrSaveModel.SetCheckBoxText("Save Estimate") ucrSaveModel.SetPrefix("ci") + Else + ucrDistributionChoice.lblDistributionType.Text = "Distribution:" + ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetPrefix("dist") End If End Sub From c6362476831e4cd86af09ae95685586573bab30d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 14:20:50 +0300 Subject: [PATCH 007/172] Enabling some of the hidden buttons --- instat/dlgOneVarFitModel.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a75eba64208..88820dcce3f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -593,9 +593,9 @@ Public Class dlgOneVarFitModel 'rdoVarSign.Visible = False ' rdoEnorm.Visible = False grpVarAndWilcoxSign.Hide() - ElseIf rdoTest.Checked Then - cmdFittingOptions.Visible = False - cmdDisplayOptions.Visible = False + ElseIf (rdoTest.Checked AndAlso rdoEstimate.Checked) Then + cmdFittingOptions.Visible = True + cmdDisplayOptions.Visible = True ucrChkConvertVariate.Visible = False grpConditions.Visible = True If ucrDistributionChoice.clsCurrDistribution.bIsExact = True Then From 2422c4b6e74f810c618d07a85707b3752ace28cd Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 14:56:33 +0300 Subject: [PATCH 008/172] More changes --- instat/dlgOneVarFitModel.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 88820dcce3f..7fb1137837b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -78,6 +78,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddRadioButton(rdoGeneralCase) ucrPnlGeneralExactCase.AddRadioButton(rdoTest) + ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) @@ -125,7 +126,7 @@ Public Class dlgOneVarFitModel dctucrOperator.Add("(!=)", "!=") 'Disabled for now - rdoTest.Enabled = False + rdoTest.Enabled = True 'ucrOperator.SetItems(dctucrOperator) ' ucrVariables.SetItemsTypeAsColumns() 'we want SetItemsTypeAs factors in the column From 80aa87200a1870b3928e3ed47a434bb8b41fe31e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 18:20:06 +0300 Subject: [PATCH 009/172] Revert "Set the condition for the new button" This reverts commit 88fa8029044f33541185528010f9ce052ab6ba2b. --- instat/dlgOneVarFitModel.vb | 1 - instat/dlgOneVarFitModel2.Designer.vb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7fb1137837b..8e14daaa418 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,7 +82,6 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) ucrPnlStats.AddRadioButton(rdoEnorm) ucrPnlStats.AddRadioButton(rdoMeanWilcox) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 6f738eca7a7..ceb795268be 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -413,7 +413,7 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(320, 11) + Me.rdoEstimate.Location = New System.Drawing.Point(319, 11) Me.rdoEstimate.Name = "rdoEstimate" Me.rdoEstimate.Size = New System.Drawing.Size(126, 28) Me.rdoEstimate.TabIndex = 45 From ba6a4ade9b0b49c8e136b6bc49082051bf191142 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 22 Jun 2020 21:10:33 +0300 Subject: [PATCH 010/172] More changes --- instat/dlgOneVarFitModel.vb | 1 + instat/dlgOneVarFitModel2.Designer.vb | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8e14daaa418..7fb1137837b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,6 +82,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) ucrPnlStats.AddRadioButton(rdoEnorm) ucrPnlStats.AddRadioButton(rdoMeanWilcox) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index ceb795268be..1734f0f67af 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -110,7 +110,7 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(194, 11) + Me.rdoTest.Location = New System.Drawing.Point(152, 11) Me.rdoTest.Name = "rdoTest" Me.rdoTest.Size = New System.Drawing.Size(126, 28) Me.rdoTest.TabIndex = 41 @@ -125,7 +125,7 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(76, 11) + Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) Me.rdoGeneralCase.Name = "rdoGeneralCase" Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) Me.rdoGeneralCase.TabIndex = 40 @@ -356,9 +356,9 @@ Partial Class dlgOneVarFitModel ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(67, 7) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(266, 35) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel @@ -366,7 +366,7 @@ Partial Class dlgOneVarFitModel Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(255, 24) + Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice @@ -413,7 +413,7 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(319, 11) + Me.rdoEstimate.Location = New System.Drawing.Point(277, 11) Me.rdoEstimate.Name = "rdoEstimate" Me.rdoEstimate.Size = New System.Drawing.Size(126, 28) Me.rdoEstimate.TabIndex = 45 From 5f6ed62bcbab7a0f6d76b2a3831b312eae33fd4e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 25 Jun 2020 12:17:26 +0300 Subject: [PATCH 011/172] Added tests --- instat/dlgOneVarFitModel.vb | 29 +++- instat/dlgOneVarFitModel2.Designer.vb | 213 ++++++++++++++++---------- 2 files changed, 158 insertions(+), 84 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7fb1137837b..7454b5c403d 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -18,6 +18,7 @@ Imports instat.Translations Public Class dlgOneVarFitModel Public clsROneVarFitModel, clsFamilyFunction, clsRLogLikFunction, clsRLength, clsRMean, clsRTTest, clsVarTest, clsREnormTest, clsRNonSignTest, clsRWilcoxTest, clsRBinomTest, clsRPoissonTest, clsRplot, clsRfitdist, clsRStartValues, clsRBinomStart, clsRConvertVector, clsNaExclude, clsRConvertInteger, clsRConvertNumeric As New RFunction Public clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As RFunction + Public clsBionomialFunction As New RFunction Public clsFunctionOperator, clsFactorOperator As New ROperator Private WithEvents ucrDistribution As ucrDistributions Public bfirstload As Boolean = True @@ -74,6 +75,10 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveModel.SetPrefix("Normal") + ucrInputTests.SetParameter(New RParameter("y", 0)) + ucrInputTests.SetDropDownStyleAsNonEditable() + ucrInputTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}) + ucrChkBinModify.SetText("Modify Conditions for 'Success'") ucrPnlGeneralExactCase.AddRadioButton(rdoGeneralCase) @@ -84,6 +89,9 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) + + + ucrPnlStats.AddRadioButton(rdoEnorm) ucrPnlStats.AddRadioButton(rdoMeanWilcox) ucrPnlStats.AddRadioButton(rdoVarSign) @@ -98,7 +106,7 @@ Public Class dlgOneVarFitModel ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoWilcoxSignTest, "wilcox.test") ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoVarSignTest, "signmedian.test") - + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputTests, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrPnlStats, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudCI, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrNudCI.SetLinkedDisplayControl(lblConfidenceLimit) @@ -153,6 +161,7 @@ Public Class dlgOneVarFitModel clsRBinomStart = New RFunction clsRConvertVector = New RFunction clsNaExclude = New RFunction + clsBionomialFunction = New RFunction clsRConvertInteger = New RFunction @@ -253,6 +262,9 @@ Public Class dlgOneVarFitModel clsRLogLikFunction.SetRCommand("llplot") clsRLogLikFunction.iCallType = 3 + clsBionomialFunction.SetPackageName("mosaic") + clsBionomialFunction.SetRCommand("binom.test") + SetDataParameter() EnableOptions() BinomialConditions() @@ -287,6 +299,8 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRMean, New RParameter("x"), iAdditionalPairNo:=4) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRBinomTest, New RParameter("x"), iAdditionalPairNo:=5) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRStartValues, New RParameter("x"), iAdditionalPairNo:=6) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=7) + ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) @@ -590,6 +604,7 @@ Public Class dlgOneVarFitModel cmdFittingOptions.Visible = True cmdDisplayOptions.Visible = True grpConditions.Visible = False + ucrInputTests.Visible = False ' rdoMeanWilcox.Visible = False 'rdoVarSign.Visible = False ' rdoEnorm.Visible = False @@ -598,7 +613,9 @@ Public Class dlgOneVarFitModel cmdFittingOptions.Visible = True cmdDisplayOptions.Visible = True ucrChkConvertVariate.Visible = False + ucrDistributionChoice.Visible = False grpConditions.Visible = True + ucrInputTests.Visible = True If ucrDistributionChoice.clsCurrDistribution.bIsExact = True Then If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Then grpVarAndWilcoxSign.Hide() @@ -745,4 +762,14 @@ Public Class dlgOneVarFitModel SetDataParameter() Display() End Sub + + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputTests.ControlValueChanged + Select Case ucrInputTests.GetValue + Case "Binomial" + ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) + Case "Proportion" + + + End Select + End Sub End Class diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 1734f0f67af..0708fdc91b9 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -63,6 +63,8 @@ Partial Class dlgOneVarFitModel Me.ucrNudCI = New instat.ucrNud() Me.cmdDisplayOptions = New System.Windows.Forms.Button() Me.cmdFittingOptions = New System.Windows.Forms.Button() + Me.rdoEstimate = New System.Windows.Forms.RadioButton() + Me.ucrInputTests = New instat.ucrInputComboBox() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() Me.ucrSaveModel = New instat.ucrSave() @@ -70,7 +72,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.grpConditions.SuspendLayout() Me.grpVarAndWilcoxSign.SuspendLayout() Me.grpVarAndWilcox.SuspendLayout() @@ -79,27 +80,30 @@ Partial Class dlgOneVarFitModel 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(249, 47) + Me.LblVariable.Location = New System.Drawing.Point(332, 58) + Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(48, 13) + Me.LblVariable.Size = New System.Drawing.Size(64, 17) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' 'lblSuccessIf ' Me.lblSuccessIf.AutoSize = True - Me.lblSuccessIf.Location = New System.Drawing.Point(3, 110) + Me.lblSuccessIf.Location = New System.Drawing.Point(4, 135) + Me.lblSuccessIf.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblSuccessIf.Name = "lblSuccessIf" - Me.lblSuccessIf.Size = New System.Drawing.Size(66, 13) + Me.lblSuccessIf.Size = New System.Drawing.Size(85, 17) Me.lblSuccessIf.TabIndex = 19 Me.lblSuccessIf.Text = "Success if X" ' 'lblEquals ' Me.lblEquals.AutoSize = True - Me.lblEquals.Location = New System.Drawing.Point(71, 108) + Me.lblEquals.Location = New System.Drawing.Point(95, 133) + Me.lblEquals.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblEquals.Name = "lblEquals" - Me.lblEquals.Size = New System.Drawing.Size(13, 13) + Me.lblEquals.Size = New System.Drawing.Size(16, 17) Me.lblEquals.TabIndex = 33 Me.lblEquals.Text = "=" ' @@ -110,9 +114,10 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(152, 11) + Me.rdoTest.Location = New System.Drawing.Point(203, 14) + Me.rdoTest.Margin = New System.Windows.Forms.Padding(4) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(126, 28) + Me.rdoTest.Size = New System.Drawing.Size(168, 34) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -125,9 +130,10 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) + Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) + Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) + Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -147,9 +153,11 @@ Partial Class dlgOneVarFitModel Me.grpConditions.Controls.Add(Me.ucrNudHyp) Me.grpConditions.Controls.Add(Me.lblConfidenceLimit) Me.grpConditions.Controls.Add(Me.ucrNudCI) - Me.grpConditions.Location = New System.Drawing.Point(249, 123) + Me.grpConditions.Location = New System.Drawing.Point(332, 151) + Me.grpConditions.Margin = New System.Windows.Forms.Padding(4) Me.grpConditions.Name = "grpConditions" - Me.grpConditions.Size = New System.Drawing.Size(196, 132) + Me.grpConditions.Padding = New System.Windows.Forms.Padding(4) + Me.grpConditions.Size = New System.Drawing.Size(261, 162) Me.grpConditions.TabIndex = 34 Me.grpConditions.TabStop = False Me.grpConditions.Text = "Conditions" @@ -159,18 +167,21 @@ Partial Class dlgOneVarFitModel Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoWilcoxSignTest) Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoVarSignTest) Me.grpVarAndWilcoxSign.Controls.Add(Me.ucrPnlWilcoxVarTest) - Me.grpVarAndWilcoxSign.Location = New System.Drawing.Point(5, 64) + Me.grpVarAndWilcoxSign.Location = New System.Drawing.Point(7, 79) + Me.grpVarAndWilcoxSign.Margin = New System.Windows.Forms.Padding(4) Me.grpVarAndWilcoxSign.Name = "grpVarAndWilcoxSign" - Me.grpVarAndWilcoxSign.Size = New System.Drawing.Size(127, 71) + Me.grpVarAndWilcoxSign.Padding = New System.Windows.Forms.Padding(4) + Me.grpVarAndWilcoxSign.Size = New System.Drawing.Size(169, 87) Me.grpVarAndWilcoxSign.TabIndex = 62 Me.grpVarAndWilcoxSign.TabStop = False ' 'rdoWilcoxSignTest ' Me.rdoWilcoxSignTest.AutoSize = True - Me.rdoWilcoxSignTest.Location = New System.Drawing.Point(8, 13) + Me.rdoWilcoxSignTest.Location = New System.Drawing.Point(11, 16) + Me.rdoWilcoxSignTest.Margin = New System.Windows.Forms.Padding(4) Me.rdoWilcoxSignTest.Name = "rdoWilcoxSignTest" - Me.rdoWilcoxSignTest.Size = New System.Drawing.Size(97, 17) + Me.rdoWilcoxSignTest.Size = New System.Drawing.Size(125, 21) Me.rdoWilcoxSignTest.TabIndex = 65 Me.rdoWilcoxSignTest.TabStop = True Me.rdoWilcoxSignTest.Text = "Compare Mean" @@ -180,9 +191,10 @@ Partial Class dlgOneVarFitModel 'rdoVarSignTest ' Me.rdoVarSignTest.AutoSize = True - Me.rdoVarSignTest.Location = New System.Drawing.Point(8, 36) + Me.rdoVarSignTest.Location = New System.Drawing.Point(11, 44) + Me.rdoVarSignTest.Margin = New System.Windows.Forms.Padding(4) Me.rdoVarSignTest.Name = "rdoVarSignTest" - Me.rdoVarSignTest.Size = New System.Drawing.Size(109, 17) + Me.rdoVarSignTest.Size = New System.Drawing.Size(141, 21) Me.rdoVarSignTest.TabIndex = 64 Me.rdoVarSignTest.TabStop = True Me.rdoVarSignTest.Text = "Compare Vaiance" @@ -190,9 +202,10 @@ Partial Class dlgOneVarFitModel ' 'ucrPnlWilcoxVarTest ' - Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(6, 11) + Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(8, 14) + Me.ucrPnlWilcoxVarTest.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrPnlWilcoxVarTest.Name = "ucrPnlWilcoxVarTest" - Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(117, 48) + Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(156, 59) Me.ucrPnlWilcoxVarTest.TabIndex = 63 ' 'grpVarAndWilcox @@ -201,18 +214,21 @@ Partial Class dlgOneVarFitModel Me.grpVarAndWilcox.Controls.Add(Me.rdoMeanWilcox) Me.grpVarAndWilcox.Controls.Add(Me.rdoVarSign) Me.grpVarAndWilcox.Controls.Add(Me.ucrPnlStats) - Me.grpVarAndWilcox.Location = New System.Drawing.Point(7, 60) + Me.grpVarAndWilcox.Location = New System.Drawing.Point(9, 74) + Me.grpVarAndWilcox.Margin = New System.Windows.Forms.Padding(4) Me.grpVarAndWilcox.Name = "grpVarAndWilcox" - Me.grpVarAndWilcox.Size = New System.Drawing.Size(130, 75) + Me.grpVarAndWilcox.Padding = New System.Windows.Forms.Padding(4) + Me.grpVarAndWilcox.Size = New System.Drawing.Size(173, 92) Me.grpVarAndWilcox.TabIndex = 55 Me.grpVarAndWilcox.TabStop = False ' 'rdoEnorm ' Me.rdoEnorm.AutoSize = True - Me.rdoEnorm.Location = New System.Drawing.Point(10, 50) + Me.rdoEnorm.Location = New System.Drawing.Point(13, 62) + Me.rdoEnorm.Margin = New System.Windows.Forms.Padding(4) Me.rdoEnorm.Name = "rdoEnorm" - Me.rdoEnorm.Size = New System.Drawing.Size(54, 17) + Me.rdoEnorm.Size = New System.Drawing.Size(69, 21) Me.rdoEnorm.TabIndex = 65 Me.rdoEnorm.TabStop = True Me.rdoEnorm.Text = "enorm" @@ -221,9 +237,10 @@ Partial Class dlgOneVarFitModel 'rdoMeanWilcox ' Me.rdoMeanWilcox.AutoSize = True - Me.rdoMeanWilcox.Location = New System.Drawing.Point(10, 12) + Me.rdoMeanWilcox.Location = New System.Drawing.Point(13, 15) + Me.rdoMeanWilcox.Margin = New System.Windows.Forms.Padding(4) Me.rdoMeanWilcox.Name = "rdoMeanWilcox" - Me.rdoMeanWilcox.Size = New System.Drawing.Size(97, 17) + Me.rdoMeanWilcox.Size = New System.Drawing.Size(125, 21) Me.rdoMeanWilcox.TabIndex = 66 Me.rdoMeanWilcox.TabStop = True Me.rdoMeanWilcox.Text = "Compare Mean" @@ -233,9 +250,10 @@ Partial Class dlgOneVarFitModel 'rdoVarSign ' Me.rdoVarSign.AutoSize = True - Me.rdoVarSign.Location = New System.Drawing.Point(10, 31) + Me.rdoVarSign.Location = New System.Drawing.Point(13, 38) + Me.rdoVarSign.Margin = New System.Windows.Forms.Padding(4) Me.rdoVarSign.Name = "rdoVarSign" - Me.rdoVarSign.Size = New System.Drawing.Size(112, 17) + Me.rdoVarSign.Size = New System.Drawing.Size(146, 21) Me.rdoVarSign.TabIndex = 64 Me.rdoVarSign.TabStop = True Me.rdoVarSign.Text = "Compare Variance" @@ -243,28 +261,31 @@ Partial Class dlgOneVarFitModel ' 'ucrPnlStats ' - Me.ucrPnlStats.Location = New System.Drawing.Point(6, 10) + Me.ucrPnlStats.Location = New System.Drawing.Point(8, 12) + Me.ucrPnlStats.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrPnlStats.Name = "ucrPnlStats" - Me.ucrPnlStats.Size = New System.Drawing.Size(118, 63) + Me.ucrPnlStats.Size = New System.Drawing.Size(157, 78) Me.ucrPnlStats.TabIndex = 63 ' 'ucrChkBinModify ' Me.ucrChkBinModify.Checked = False - Me.ucrChkBinModify.Location = New System.Drawing.Point(9, 76) + Me.ucrChkBinModify.Location = New System.Drawing.Point(12, 94) + Me.ucrChkBinModify.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkBinModify.Name = "ucrChkBinModify" - Me.ucrChkBinModify.Size = New System.Drawing.Size(174, 20) + Me.ucrChkBinModify.Size = New System.Drawing.Size(232, 25) Me.ucrChkBinModify.TabIndex = 54 ' 'ucrNudBinomialConditions ' Me.ucrNudBinomialConditions.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudBinomialConditions.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(135, 104) + Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(180, 128) + Me.ucrNudBinomialConditions.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudBinomialConditions.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudBinomialConditions.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudBinomialConditions.Name = "ucrNudBinomialConditions" - Me.ucrNudBinomialConditions.Size = New System.Drawing.Size(50, 20) + Me.ucrNudBinomialConditions.Size = New System.Drawing.Size(67, 25) Me.ucrNudBinomialConditions.TabIndex = 50 Me.ucrNudBinomialConditions.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -272,26 +293,29 @@ Partial Class dlgOneVarFitModel ' Me.ucrOperator.AddQuotesIfUnrecognised = True Me.ucrOperator.IsReadOnly = False - Me.ucrOperator.Location = New System.Drawing.Point(87, 104) + Me.ucrOperator.Location = New System.Drawing.Point(116, 128) + Me.ucrOperator.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) Me.ucrOperator.Name = "ucrOperator" - Me.ucrOperator.Size = New System.Drawing.Size(44, 21) + Me.ucrOperator.Size = New System.Drawing.Size(59, 26) Me.ucrOperator.TabIndex = 24 ' 'ucrVariables ' Me.ucrVariables.AddQuotesIfUnrecognised = True Me.ucrVariables.IsReadOnly = False - Me.ucrVariables.Location = New System.Drawing.Point(90, 108) + Me.ucrVariables.Location = New System.Drawing.Point(120, 133) + Me.ucrVariables.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) Me.ucrVariables.Name = "ucrVariables" - Me.ucrVariables.Size = New System.Drawing.Size(88, 21) + Me.ucrVariables.Size = New System.Drawing.Size(117, 26) Me.ucrVariables.TabIndex = 32 ' 'lblHyp ' Me.lblHyp.AutoSize = True - Me.lblHyp.Location = New System.Drawing.Point(6, 40) + Me.lblHyp.Location = New System.Drawing.Point(8, 49) + Me.lblHyp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblHyp.Name = "lblHyp" - Me.lblHyp.Size = New System.Drawing.Size(83, 13) + Me.lblHyp.Size = New System.Drawing.Size(110, 17) Me.lblHyp.TabIndex = 46 Me.lblHyp.Text = "Null Hypothesis:" ' @@ -299,20 +323,22 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudHyp.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHyp.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHyp.Location = New System.Drawing.Point(101, 38) + Me.ucrNudHyp.Location = New System.Drawing.Point(135, 47) + Me.ucrNudHyp.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudHyp.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudHyp.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHyp.Name = "ucrNudHyp" - Me.ucrNudHyp.Size = New System.Drawing.Size(50, 20) + Me.ucrNudHyp.Size = New System.Drawing.Size(67, 25) Me.ucrNudHyp.TabIndex = 49 Me.ucrNudHyp.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblConfidenceLimit ' Me.lblConfidenceLimit.AutoSize = True - Me.lblConfidenceLimit.Location = New System.Drawing.Point(6, 13) + Me.lblConfidenceLimit.Location = New System.Drawing.Point(8, 16) + Me.lblConfidenceLimit.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblConfidenceLimit.Name = "lblConfidenceLimit" - Me.lblConfidenceLimit.Size = New System.Drawing.Size(88, 13) + Me.lblConfidenceLimit.Size = New System.Drawing.Size(116, 17) Me.lblConfidenceLimit.TabIndex = 47 Me.lblConfidenceLimit.Text = "Confidence Limit:" ' @@ -320,70 +346,102 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudCI.DecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0}) Me.ucrNudCI.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCI.Location = New System.Drawing.Point(100, 10) + Me.ucrNudCI.Location = New System.Drawing.Point(133, 12) + Me.ucrNudCI.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudCI.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudCI.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudCI.Name = "ucrNudCI" - Me.ucrNudCI.Size = New System.Drawing.Size(50, 20) + Me.ucrNudCI.Size = New System.Drawing.Size(67, 25) Me.ucrNudCI.TabIndex = 48 Me.ucrNudCI.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(294, 286) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(392, 352) + Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(294, 262) + Me.cmdFittingOptions.Location = New System.Drawing.Point(392, 322) + Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True ' + 'rdoEstimate + ' + Me.rdoEstimate.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoEstimate.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEstimate.FlatAppearance.BorderSize = 2 + Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoEstimate.Location = New System.Drawing.Point(369, 14) + Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEstimate.Name = "rdoEstimate" + Me.rdoEstimate.Size = New System.Drawing.Size(168, 34) + Me.rdoEstimate.TabIndex = 45 + Me.rdoEstimate.Text = "Estimate" + Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoEstimate.UseVisualStyleBackColor = True + ' + 'ucrInputTests + ' + Me.ucrInputTests.AddQuotesIfUnrecognised = True + Me.ucrInputTests.IsReadOnly = False + Me.ucrInputTests.Location = New System.Drawing.Point(101, 308) + Me.ucrInputTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputTests.Name = "ucrInputTests" + Me.ucrInputTests.Size = New System.Drawing.Size(192, 26) + Me.ucrInputTests.TabIndex = 46 + ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(332, 116) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveModel.Location = New System.Drawing.Point(13, 352) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) + Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -393,39 +451,26 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 316) + Me.ucrBase.Location = New System.Drawing.Point(13, 389) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' - 'rdoEstimate - ' - Me.rdoEstimate.Appearance = System.Windows.Forms.Appearance.Button - Me.rdoEstimate.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoEstimate.FlatAppearance.BorderSize = 2 - Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(277, 11) - Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(126, 28) - Me.rdoEstimate.TabIndex = 45 - Me.rdoEstimate.Text = "Estimate" - Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.rdoEstimate.UseVisualStyleBackColor = True - ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(454, 374) + Me.ClientSize = New System.Drawing.Size(605, 460) + Me.Controls.Add(Me.ucrInputTests) Me.Controls.Add(Me.rdoEstimate) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) @@ -441,6 +486,7 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" @@ -491,4 +537,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents cmdDisplayOptions As Button Friend WithEvents cmdFittingOptions As Button Friend WithEvents rdoEstimate As RadioButton + Friend WithEvents ucrInputTests As ucrInputComboBox End Class \ No newline at end of file From 3d1ebc8102adcf9a369f3337f7c107cf8ac0bfb2 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 1 Jul 2020 18:30:35 +0300 Subject: [PATCH 012/172] removal of commented code --- instat/dlgOneVarFitModel.vb | 59 ++++--------------------------------- 1 file changed, 5 insertions(+), 54 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7454b5c403d..33987ca8893 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -63,11 +63,6 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(True, "data", "as.numeric", True) ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) - ucrNudHyp.SetParameter(New RParameter("mu")) - - ucrNudCI.SetParameter(New RParameter("mu")) - - ucrSaveModel.SetSaveTypeAsModel() ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Model") @@ -89,9 +84,6 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) - - - ucrPnlStats.AddRadioButton(rdoEnorm) ucrPnlStats.AddRadioButton(rdoMeanWilcox) ucrPnlStats.AddRadioButton(rdoVarSign) @@ -114,13 +106,12 @@ Public Class dlgOneVarFitModel ucrNudHyp.SetLinkedDisplayControl(lblHyp) ucrPnlStats.SetLinkedDisplayControl(grpConditions) - ' ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkBinModify, {rdoExactCase}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - - + ucrNudCI.SetParameter(New RParameter("mu")) ucrNudCI.Increment = 0.05 ucrNudCI.DecimalPlaces = 2 ucrNudCI.SetMinMax(0, 1) + ucrNudHyp.SetParameter(New RParameter("mu")) ucrNudHyp.Increment = 1 ucrNudHyp.DecimalPlaces = 2 ucrNudHyp.SetMinMax(0.00, Integer.MaxValue) @@ -132,14 +123,6 @@ Public Class dlgOneVarFitModel dctucrOperator.Add("(>)", ">") dctucrOperator.Add("(>=)", ">=") dctucrOperator.Add("(!=)", "!=") - - 'Disabled for now - rdoTest.Enabled = True - 'ucrOperator.SetItems(dctucrOperator) - ' ucrVariables.SetItemsTypeAsColumns() 'we want SetItemsTypeAs factors in the column - - 'temp disabled as only works for numeric columns currently - '.Enabled = False End Sub Private Sub SetDefaults() @@ -203,15 +186,15 @@ Public Class dlgOneVarFitModel clsFamilyFunction = ucrDistributionChoice.clsCurrRFunction clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - 'Exact Case - 'TTest clsRTTest.SetPackageName("stats") clsRTTest.SetRCommand("t.test") clsRTTest.AddParameter("mu", 0.00) + 'VarTest clsVarTest.SetPackageName("EnvStats") clsVarTest.SetRCommand("varTest") + 'Enorm clsREnormTest.SetPackageName("EnvStats") clsREnormTest.SetRCommand("enorm") @@ -301,7 +284,6 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRStartValues, New RParameter("x"), iAdditionalPairNo:=6) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=7) - ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) ucrNudHyp.AddAdditionalCodeParameterPair(clsVarTest, New RParameter("sigma.squared"), iAdditionalPairNo:=1) @@ -311,7 +293,6 @@ Public Class dlgOneVarFitModel ucrNudHyp.AddAdditionalCodeParameterPair(clsRTTest, New RParameter("mu"), iAdditionalPairNo:=5) ucrNudHyp.AddAdditionalCodeParameterPair(clsRBinomTest, New RParameter("p"), iAdditionalPairNo:=6) ucrNudHyp.AddAdditionalCodeParameterPair(clsRPoissonTest, New RParameter("r"), iAdditionalPairNo:=7) - ' ucrNudHyp.AddAdditionalCodeParameterPair(clsRPoissonTest, New RParameter("sigma.squared"), iAdditionalPairNo:=8) ucrNudCI.AddAdditionalCodeParameterPair(clsRTTest, New RParameter("conf.level"), iAdditionalPairNo:=1) ucrNudCI.AddAdditionalCodeParameterPair(clsVarTest, New RParameter("conf.level"), iAdditionalPairNo:=2) @@ -319,7 +300,6 @@ Public Class dlgOneVarFitModel ucrNudCI.AddAdditionalCodeParameterPair(clsRWilcoxTest, New RParameter("conf.level"), iAdditionalPairNo:=4) ucrNudCI.AddAdditionalCodeParameterPair(clsRNonSignTest, New RParameter("conf.level"), iAdditionalPairNo:=5) ucrNudCI.AddAdditionalCodeParameterPair(clsRBinomTest, New RParameter("conf.level"), iAdditionalPairNo:=6) - ' ucrNudCI.AddAdditionalCodeParameterPair(clsRPoissonTest, New RParameter("conf.level"), iAdditionalPairNo:=6) bRCodeSet = True End Sub @@ -589,15 +569,6 @@ Public Class dlgOneVarFitModel cmdDisplayOptions.Enabled = False End If End Sub - - 'Private Sub UcrBase_ClickOk(sender As Object, e As EventArgs) Handles UcrBase.ClickOk - ' If rdoGeneralCase.Checked Then - ' ElseIf rdoExactCase.Checked Then - ' If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then ' can remove this line once Bernouli residual plots are working - ' PlotResiduals() - ' End If - ' End If - 'End Sub Private Sub Display() If rdoGeneralCase.Checked Then @@ -605,9 +576,6 @@ Public Class dlgOneVarFitModel cmdDisplayOptions.Visible = True grpConditions.Visible = False ucrInputTests.Visible = False - ' rdoMeanWilcox.Visible = False - 'rdoVarSign.Visible = False - ' rdoEnorm.Visible = False grpVarAndWilcoxSign.Hide() ElseIf (rdoTest.Checked AndAlso rdoEstimate.Checked) Then cmdFittingOptions.Visible = True @@ -620,11 +588,6 @@ Public Class dlgOneVarFitModel If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Then grpVarAndWilcoxSign.Hide() grpVarAndWilcox.Show() - 'rdoMeanWilcox.Visible = True - 'rdoVarSign.Visible = True - 'rdoEnorm.Visible = True - ' rdoMeanWilcox.Text = "Compare Mean" - 'rdoVarSign.Text = "Compare Variance" If rdoVarSign.Checked Then ucrNudHyp.SetMinMax(0.01, 1) Else @@ -633,21 +596,11 @@ Public Class dlgOneVarFitModel ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "No_Distribution" Then grpVarAndWilcox.Hide() grpVarAndWilcoxSign.Show() - 'rdoMeanWilcox.Visible = True - 'rdoVarSign.Visible = True - ' rdoEnorm.Visible = False - ' rdoMeanWilcox.Text = "None-Wilcoxon" - ' rdoVarSign.Text = "None-Sign" ucrNudHyp.Minimum = ucrDistributionChoice.clsCurrDistribution.lstExact(5) ucrNudHyp.Value = ucrDistributionChoice.clsCurrDistribution.lstExact(2) Else ucrNudHyp.Minimum = ucrDistributionChoice.clsCurrDistribution.lstExact(5) ucrNudHyp.Value = ucrDistributionChoice.clsCurrDistribution.lstExact(2) - 'grpVarAndWilcoxSign.Hide() - ' grpVarAndWilcox.Hide() - 'rdoMeanWilcox.Visible = False - ' rdoVarSign.Visible = False - ' rdoEnorm.Visible = False End If ucrNudHyp.Increment = ucrDistributionChoice.clsCurrDistribution.lstExact(3) ucrNudHyp.DecimalPlaces = ucrDistributionChoice.clsCurrDistribution.lstExact(4) @@ -700,8 +653,7 @@ Public Class dlgOneVarFitModel End Sub Private Sub BinomialConditions() - If rdoTest.Checked AndAlso ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Then - 'ucrChkBinModify.Enabled = True + If rdoTest.Checked AndAlso ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Then ucrChkBinModify.Visible = True If ucrChkBinModify.Checked Then lblSuccessIf.Visible = True @@ -730,7 +682,6 @@ Public Class dlgOneVarFitModel ucrOperator.Visible = False ucrVariables.Visible = False End If - ' ucrNudBinomialConditions.Value = 1 ucrNudBinomialConditions.Maximum = Integer.MaxValue ucrNudBinomialConditions.Minimum = Integer.MinValue Display() From 26c627a76f5f8a940798696d7cec7563849c0e67 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 1 Jul 2020 19:25:34 +0300 Subject: [PATCH 013/172] removed redundant code --- instat/dlgOneVarFitModel.vb | 286 +++++------------------------------- 1 file changed, 33 insertions(+), 253 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 33987ca8893..ad3dda7b086 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -26,7 +26,6 @@ Public Class dlgOneVarFitModel Public bReset As Boolean = True Private bResetFittingOptions As Boolean = False Private bResetFitModDisplay As Boolean = False - Private bRdoMgeEnabled = True Private Sub dlgOneVarFitModel_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -74,8 +73,6 @@ Public Class dlgOneVarFitModel ucrInputTests.SetDropDownStyleAsNonEditable() ucrInputTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}) - ucrChkBinModify.SetText("Modify Conditions for 'Success'") - ucrPnlGeneralExactCase.AddRadioButton(rdoGeneralCase) ucrPnlGeneralExactCase.AddRadioButton(rdoTest) ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) @@ -84,45 +81,9 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) - ucrPnlStats.AddRadioButton(rdoEnorm) - ucrPnlStats.AddRadioButton(rdoMeanWilcox) - ucrPnlStats.AddRadioButton(rdoVarSign) - - ucrPnlStats.AddFunctionNamesCondition(rdoEnorm, "enorm") - ucrPnlStats.AddFunctionNamesCondition(rdoMeanWilcox, "t.test") - ucrPnlStats.AddFunctionNamesCondition(rdoVarSign, "varTest") - - ucrPnlWilcoxVarTest.AddRadioButton(rdoWilcoxSignTest) - ucrPnlWilcoxVarTest.AddRadioButton(rdoVarSignTest) - - ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoWilcoxSignTest, "wilcox.test") - ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoVarSignTest, "signmedian.test") - - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputTests, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrPnlStats, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudCI, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrNudCI.SetLinkedDisplayControl(lblConfidenceLimit) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHyp, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrNudHyp.SetLinkedDisplayControl(lblHyp) - ucrPnlStats.SetLinkedDisplayControl(grpConditions) - - ucrNudCI.SetParameter(New RParameter("mu")) - ucrNudCI.Increment = 0.05 - ucrNudCI.DecimalPlaces = 2 - ucrNudCI.SetMinMax(0, 1) - - ucrNudHyp.SetParameter(New RParameter("mu")) - ucrNudHyp.Increment = 1 - ucrNudHyp.DecimalPlaces = 2 - ucrNudHyp.SetMinMax(0.00, Integer.MaxValue) - - ucrOperator.SetItems({"==", "<", "<=", ">", ">=", "!="}) - dctucrOperator.Add("(==)", "==") - dctucrOperator.Add("<", "<") - dctucrOperator.Add("(<=)", "<=") - dctucrOperator.Add("(>)", ">") - dctucrOperator.Add("(>=)", ">=") - dctucrOperator.Add("(!=)", "!=") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputTests, {rdoTest, rdoEstimate}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) + ucrInputTests.SetLinkedDisplayControl(lblTests) End Sub Private Sub SetDefaults() @@ -248,9 +209,7 @@ Public Class dlgOneVarFitModel clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") - SetDataParameter() - EnableOptions() - BinomialConditions() + SetDataParameter() SetBaseFunction() SetDistributions() @@ -270,11 +229,8 @@ Public Class dlgOneVarFitModel Public Sub SetRCodeForControls(bReset As Boolean) bRCodeSet = False ucrPnlGeneralExactCase.SetRCode(clsROneVarFitModel, bReset) - ucrPnlStats.SetRCode(clsRTTest, bReset) - ucrPnlWilcoxVarTest.SetRCode(clsRWilcoxTest, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) - ucrNudHyp.SetRCode(clsRTTest, bReset) ucrDistributionChoice.SetRCode(clsFamilyFunction, bReset) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRWilcoxTest, New RParameter("x"), iAdditionalPairNo:=1) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRNonSignTest, New RParameter("x"), iAdditionalPairNo:=2) @@ -285,32 +241,15 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=7) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) - - ucrNudHyp.AddAdditionalCodeParameterPair(clsVarTest, New RParameter("sigma.squared"), iAdditionalPairNo:=1) - ucrNudHyp.AddAdditionalCodeParameterPair(clsVarTest, New RParameter("sigma.squared"), iAdditionalPairNo:=2) - ucrNudHyp.AddAdditionalCodeParameterPair(clsRWilcoxTest, New RParameter("mu"), iAdditionalPairNo:=3) - ucrNudHyp.AddAdditionalCodeParameterPair(clsRNonSignTest, New RParameter("mu"), iAdditionalPairNo:=4) - ucrNudHyp.AddAdditionalCodeParameterPair(clsRTTest, New RParameter("mu"), iAdditionalPairNo:=5) - ucrNudHyp.AddAdditionalCodeParameterPair(clsRBinomTest, New RParameter("p"), iAdditionalPairNo:=6) - ucrNudHyp.AddAdditionalCodeParameterPair(clsRPoissonTest, New RParameter("r"), iAdditionalPairNo:=7) - - ucrNudCI.AddAdditionalCodeParameterPair(clsRTTest, New RParameter("conf.level"), iAdditionalPairNo:=1) - ucrNudCI.AddAdditionalCodeParameterPair(clsVarTest, New RParameter("conf.level"), iAdditionalPairNo:=2) - ucrNudCI.AddAdditionalCodeParameterPair(clsREnormTest, New RParameter("conf.level"), iAdditionalPairNo:=3) - ucrNudCI.AddAdditionalCodeParameterPair(clsRWilcoxTest, New RParameter("conf.level"), iAdditionalPairNo:=4) - ucrNudCI.AddAdditionalCodeParameterPair(clsRNonSignTest, New RParameter("conf.level"), iAdditionalPairNo:=5) - ucrNudCI.AddAdditionalCodeParameterPair(clsRBinomTest, New RParameter("conf.level"), iAdditionalPairNo:=6) bRCodeSet = True End Sub - Private Sub ucrPnlStats_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlStats.ControlValueChanged + Private Sub ucrPnlStats_ControlValueChanged(ucrChangedControl As ucrCore) SetBaseFunction() - Display() End Sub - Private Sub ucrPnlWilcoxVarTest_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlWilcoxVarTest.ControlValueChanged + Private Sub ucrPnlWilcoxVarTest_ControlValueChanged(ucrChangedControl As ucrCore) SetBaseFunction() - Display() End Sub Private Sub SetDistributions() @@ -401,7 +340,6 @@ Public Class dlgOneVarFitModel Else ucrDistributionChoice.Enabled = True End If - TestOKEnabled() End If End Sub @@ -425,10 +363,9 @@ Public Class dlgOneVarFitModel Case Else clsROneVarFitModel.RemoveParameterByName("start") End Select - End If - End Sub + Public Sub SetBaseFunction() If rdoGeneralCase.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) @@ -443,51 +380,6 @@ Public Class dlgOneVarFitModel clsRplotDenscomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) clsRplotDenscomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) - ElseIf rdoTest.Checked Then - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then - grpVarAndWilcoxSign.Hide() - grpVarAndWilcox.Hide() - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" AndAlso (ucrReceiverVariable.strCurrDataType = "factor" OrElse ucrReceiverVariable.strCurrDataType = "character") Then - ucrReceiverVariable.Clear() - End If - clsRPoissonTest.AddParameter("T", clsRFunctionParameter:=clsRMean) - clsRPoissonTest.AddParameter("x", clsRFunctionParameter:=clsRLength) - ucrBase.clsRsyntax.SetBaseRFunction(clsRPoissonTest) - ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Then - grpVarAndWilcox.Show() - grpVarAndWilcoxSign.Hide() - If rdoTest.Checked Then - If rdoMeanWilcox.Checked Then - ucrNudHyp.SetMinMax(0.00, 1) - clsRTTest.AddParameter("x", clsRFunctionParameter:=clsRConvertVector) - ucrBase.clsRsyntax.SetBaseRFunction(clsRTTest) - ElseIf rdoEnorm.Checked Then - ucrNudHyp.SetMinMax(0.01, Integer.MaxValue) - ucrNudHyp.Value = 0.00 - clsREnormTest.AddParameter("x", clsRFunctionParameter:=clsRConvertVector) - ucrBase.clsRsyntax.SetBaseRFunction(clsREnormTest) - Else - ucrNudHyp.SetMinMax(0.00, Integer.MaxValue) - ucrNudHyp.Value = 1.0 - clsVarTest.AddParameter("x", clsRFunctionParameter:=clsRConvertVector) - ucrBase.clsRsyntax.SetBaseRFunction(clsVarTest) - End If - End If - ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Then - grpVarAndWilcoxSign.Hide() - grpVarAndWilcox.Hide() - SetBinomialTest() - Else - grpVarAndWilcox.Hide() - grpVarAndWilcoxSign.Show() - If rdoWilcoxSignTest.Checked Then - clsRWilcoxTest.AddParameter("x", clsRFunctionParameter:=clsRConvertVector) - ucrBase.clsRsyntax.SetBaseRFunction(clsRWilcoxTest) - Else - clsRNonSignTest.AddParameter("x", clsRFunctionParameter:=clsRConvertVector) - ucrBase.clsRsyntax.SetBaseRFunction(clsRNonSignTest) - End If - End If End If End Sub @@ -511,21 +403,6 @@ Public Class dlgOneVarFitModel If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Then ucrReceiverVariable.SetDataType(strTemp:="integer" OrElse "numeric" OrElse "character" OrElse "factor") End If - If ucrChkBinModify.Checked Then - If ucrReceiverVariable.strCurrDataType = "factor" OrElse ucrReceiverVariable.strCurrDataType = "character" Then - clsFactorOperator.SetOperation("==") - clsFactorOperator.AddParameter(iPosition:=0, clsRFunctionParameter:=ucrReceiverVariable.GetVariables()) - clsFactorOperator.AddParameter(strParameterValue:=ucrVariables.GetText()) - clsRBinomTest.AddParameter("x", clsROperatorParameter:=clsFactorOperator) - Else - clsFunctionOperator.SetOperation(ucrOperator.GetText()) - clsFunctionOperator.AddParameter(iPosition:=0, clsRFunctionParameter:=ucrReceiverVariable.GetVariables()) - clsFunctionOperator.AddParameter(strParameterValue:=ucrNudBinomialConditions.Value.ToString()) - clsRBinomTest.AddParameter("x", clsROperatorParameter:=clsFunctionOperator) - End If - Else - clsRBinomTest.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetVariables()) - End If ucrBase.clsRsyntax.SetBaseRFunction(clsRBinomTest) End Sub @@ -539,171 +416,72 @@ Public Class dlgOneVarFitModel clsRConvertVector.SetRCommand("as.vector") clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If - End Sub Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click sdgOneVarFitModDisplay.SetRCode(ucrBase.clsRsyntax, clsRNewOneVarFitModel:=clsROneVarFitModel, clsNewRLogLikFunction:=clsRLogLikFunction, clsNewRplotFunction:=clsRplotFunction, clsNewRplotPPComp:=clsRplotPPComp, clsNewRplotCdfcomp:=clsRplotCdfcomp, clsNewRplotQqComp:=clsRplotQqComp, clsNewRplotDenscomp:=clsRplotDenscomp, ucrNewDistribution:=ucrDistribution, bReset:=bResetFitModDisplay) bResetFitModDisplay = False sdgOneVarFitModDisplay.ShowDialog() - Display() - EnableOptions() - TestOKEnabled() End Sub Private Sub cmdFittingOptions_Click(sender As Object, e As EventArgs) Handles cmdFittingOptions.Click sdgOneVarFitModel.SetRCode(ucrBase.clsRsyntax, clsROneVarFitModel, clsNewRLogLikFunction:=clsRLogLikFunction, ucrNewDistribution:=ucrDistribution, bReset:=bResetFittingOptions) bResetFittingOptions = False - sdgOneVarFitModel.ShowDialog() - EnableOptions() - Display() - TestOKEnabled() - End Sub - - Private Sub EnableOptions() - If Not ucrReceiverVariable.IsEmpty Then - cmdFittingOptions.Enabled = True - cmdDisplayOptions.Enabled = True - Else - cmdFittingOptions.Enabled = False - cmdDisplayOptions.Enabled = False - End If + sdgOneVarFitModel.ShowDialog() End Sub Private Sub Display() If rdoGeneralCase.Checked Then cmdFittingOptions.Visible = True - cmdDisplayOptions.Visible = True - grpConditions.Visible = False - ucrInputTests.Visible = False - grpVarAndWilcoxSign.Hide() - ElseIf (rdoTest.Checked AndAlso rdoEstimate.Checked) Then - cmdFittingOptions.Visible = True - cmdDisplayOptions.Visible = True - ucrChkConvertVariate.Visible = False - ucrDistributionChoice.Visible = False - grpConditions.Visible = True - ucrInputTests.Visible = True - If ucrDistributionChoice.clsCurrDistribution.bIsExact = True Then - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Then - grpVarAndWilcoxSign.Hide() - grpVarAndWilcox.Show() - If rdoVarSign.Checked Then - ucrNudHyp.SetMinMax(0.01, 1) - Else - ucrNudHyp.SetMinMax(ucrDistributionChoice.clsCurrDistribution.lstExact(5), ucrNudHyp.Value = ucrDistributionChoice.clsCurrDistribution.lstExact(2)) - End If - ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "No_Distribution" Then - grpVarAndWilcox.Hide() - grpVarAndWilcoxSign.Show() - ucrNudHyp.Minimum = ucrDistributionChoice.clsCurrDistribution.lstExact(5) - ucrNudHyp.Value = ucrDistributionChoice.clsCurrDistribution.lstExact(2) - Else - ucrNudHyp.Minimum = ucrDistributionChoice.clsCurrDistribution.lstExact(5) - ucrNudHyp.Value = ucrDistributionChoice.clsCurrDistribution.lstExact(2) - End If - ucrNudHyp.Increment = ucrDistributionChoice.clsCurrDistribution.lstExact(3) - ucrNudHyp.DecimalPlaces = ucrDistributionChoice.clsCurrDistribution.lstExact(4) - ucrNudHyp.Maximum = ucrDistributionChoice.clsCurrDistribution.lstExact(6) - End If + cmdDisplayOptions.Visible = True + ElseIf rdoTest.Checked OrElse rdoEstimate.Checked Then + cmdFittingOptions.Visible = False + cmdDisplayOptions.Visible = False End If End Sub - Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged - EnableOptions() - BinomialConditions() - SetDistributions() - DataTypeAccepted() - If rdoTest.Checked Then - ucrDistributionChoice.lblDistributionType.Text = "Test:" + Private Sub SetTestsLabelSaveLabelTextPrefix() + If rdoGeneralCase.Checked Then + ucrSaveModel.SetCheckBoxText("Save Model") + ucrSaveModel.SetPrefix("dist") + ElseIf rdoTest.Checked Then + lblTests.Text = "Test:" ucrSaveModel.SetCheckBoxText("Save Test") ucrSaveModel.SetPrefix("test") ElseIf rdoEstimate.Checked Then - ucrDistributionChoice.lblDistributionType.Text = "Estimate:" + lblTests.Text = "Estimate:" ucrSaveModel.SetCheckBoxText("Save Estimate") ucrSaveModel.SetPrefix("ci") - Else - ucrDistributionChoice.lblDistributionType.Text = "Distribution:" - ucrSaveModel.SetCheckBoxText("Save Model") - ucrSaveModel.SetPrefix("dist") End If + End Sub + + Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged + SetDistributions() + DataTypeAccepted() + SetTestsLabelSaveLabelTextPrefix() + Display() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) SetBaseFunction() - BinomialConditions() SetDataParameter() PlotResiduals() DataTypeAccepted() StartParameterValues() TestOKEnabled() - - Select Case ucrDistributionChoice.clsCurrDistribution.strNameTag - Case "Poisson", "Negative_Binomial", "Geometric", "Bernouli", "Binomial" - bRdoMgeEnabled = False - Case Else - bRdoMgeEnabled = True - End Select End Sub - - Private Sub lbls_VisibleChanged(sender As Object, e As EventArgs) Handles lblEquals.VisibleChanged, lblSuccessIf.VisibleChanged - BinomialConditions() - End Sub - - Private Sub BinomialConditions() - If rdoTest.Checked AndAlso ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Then - ucrChkBinModify.Visible = True - If ucrChkBinModify.Checked Then - lblSuccessIf.Visible = True - If ucrReceiverVariable.strCurrDataType = "factor" Then - ucrVariables.Visible = True - lblEquals.Visible = True - Else - lblEquals.Visible = False - ucrNudBinomialConditions.Visible = True - ucrOperator.Visible = True - ucrVariables.Visible = False - End If - Else - lblSuccessIf.Visible = False - lblEquals.Visible = False - ucrNudBinomialConditions.Visible = False - ucrOperator.Visible = False - ucrVariables.Visible = False - End If - Else - ucrChkBinModify.Visible = False - ucrChkBinModify.Checked = False - lblSuccessIf.Visible = False - lblEquals.Visible = False - ucrNudBinomialConditions.Visible = False - ucrOperator.Visible = False - ucrVariables.Visible = False - End If - ucrNudBinomialConditions.Maximum = Integer.MaxValue - ucrNudBinomialConditions.Minimum = Integer.MinValue - Display() - End Sub - - Private Sub cboVariables_TextChanged() Handles ucrVariables.NameChanged - BinomialConditions() + Private Sub cboVariables_TextChanged() SetBinomialTest() End Sub - Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged - TestOKEnabled() - End Sub - - Private Sub ucrChkBinModify_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkBinModify.ControlValueChanged + Private Sub ucrChkBinModify_ControlValueChanged(ucrChangedControl As ucrCore) SetBinomialTest() - BinomialConditions() End Sub Private Sub UcrReceiver_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged - SetBaseFunction() - EnableOptions() + SetBaseFunction() PlotResiduals() ResponseConvert() DataTypeAccepted() @@ -711,7 +489,6 @@ Public Class dlgOneVarFitModel Private Sub ucrChkConvertVariate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkConvertVariate.ControlValueChanged SetDataParameter() - Display() End Sub Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputTests.ControlValueChanged @@ -720,7 +497,10 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) Case "Proportion" - End Select End Sub + + Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged + TestOKEnabled() + End Sub End Class From 21da6520953dd12c8fddc95c3ddf0818d5362757 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 1 Jul 2020 19:25:45 +0300 Subject: [PATCH 014/172] designer fixes --- instat/dlgOneVarFitModel2.Designer.vb | 377 ++++---------------------- 1 file changed, 48 insertions(+), 329 deletions(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 0708fdc91b9..cb9283fb43f 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -39,31 +39,12 @@ Partial Class dlgOneVarFitModel Private Sub InitializeComponent() Me.LblVariable = New System.Windows.Forms.Label() - Me.lblSuccessIf = New System.Windows.Forms.Label() - Me.lblEquals = New System.Windows.Forms.Label() Me.rdoTest = New System.Windows.Forms.RadioButton() Me.rdoGeneralCase = New System.Windows.Forms.RadioButton() - Me.grpConditions = New System.Windows.Forms.GroupBox() - Me.grpVarAndWilcoxSign = New System.Windows.Forms.GroupBox() - Me.rdoWilcoxSignTest = New System.Windows.Forms.RadioButton() - Me.rdoVarSignTest = New System.Windows.Forms.RadioButton() - Me.ucrPnlWilcoxVarTest = New instat.UcrPanel() - Me.grpVarAndWilcox = New System.Windows.Forms.GroupBox() - Me.rdoEnorm = New System.Windows.Forms.RadioButton() - Me.rdoMeanWilcox = New System.Windows.Forms.RadioButton() - Me.rdoVarSign = New System.Windows.Forms.RadioButton() - Me.ucrPnlStats = New instat.UcrPanel() - Me.ucrChkBinModify = New instat.ucrCheck() - Me.ucrNudBinomialConditions = New instat.ucrNud() - Me.ucrOperator = New instat.ucrInputComboBox() - Me.ucrVariables = New instat.ucrInputComboBox() - Me.lblHyp = New System.Windows.Forms.Label() - Me.ucrNudHyp = New instat.ucrNud() - Me.lblConfidenceLimit = New System.Windows.Forms.Label() - Me.ucrNudCI = New instat.ucrNud() Me.cmdDisplayOptions = New System.Windows.Forms.Button() Me.cmdFittingOptions = New System.Windows.Forms.Button() Me.rdoEstimate = New System.Windows.Forms.RadioButton() + Me.lblTests = New System.Windows.Forms.Label() Me.ucrInputTests = New instat.ucrInputComboBox() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() @@ -72,41 +53,17 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.grpConditions.SuspendLayout() - Me.grpVarAndWilcoxSign.SuspendLayout() - Me.grpVarAndWilcox.SuspendLayout() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(332, 58) - Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.LblVariable.Location = New System.Drawing.Point(249, 47) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(64, 17) + Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' - 'lblSuccessIf - ' - Me.lblSuccessIf.AutoSize = True - Me.lblSuccessIf.Location = New System.Drawing.Point(4, 135) - Me.lblSuccessIf.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblSuccessIf.Name = "lblSuccessIf" - Me.lblSuccessIf.Size = New System.Drawing.Size(85, 17) - Me.lblSuccessIf.TabIndex = 19 - Me.lblSuccessIf.Text = "Success if X" - ' - 'lblEquals - ' - Me.lblEquals.AutoSize = True - Me.lblEquals.Location = New System.Drawing.Point(95, 133) - Me.lblEquals.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblEquals.Name = "lblEquals" - Me.lblEquals.Size = New System.Drawing.Size(16, 17) - Me.lblEquals.TabIndex = 33 - Me.lblEquals.Text = "=" - ' 'rdoTest ' Me.rdoTest.Appearance = System.Windows.Forms.Appearance.Button @@ -114,10 +71,9 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(203, 14) - Me.rdoTest.Margin = New System.Windows.Forms.Padding(4) + Me.rdoTest.Location = New System.Drawing.Point(154, 11) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(168, 34) + Me.rdoTest.Size = New System.Drawing.Size(122, 28) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -130,247 +86,28 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) - Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4) + Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) + Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoGeneralCase.UseVisualStyleBackColor = True ' - 'grpConditions - ' - Me.grpConditions.Controls.Add(Me.grpVarAndWilcoxSign) - Me.grpConditions.Controls.Add(Me.grpVarAndWilcox) - Me.grpConditions.Controls.Add(Me.ucrChkBinModify) - Me.grpConditions.Controls.Add(Me.lblEquals) - Me.grpConditions.Controls.Add(Me.ucrNudBinomialConditions) - Me.grpConditions.Controls.Add(Me.ucrOperator) - Me.grpConditions.Controls.Add(Me.ucrVariables) - Me.grpConditions.Controls.Add(Me.lblSuccessIf) - Me.grpConditions.Controls.Add(Me.lblHyp) - Me.grpConditions.Controls.Add(Me.ucrNudHyp) - Me.grpConditions.Controls.Add(Me.lblConfidenceLimit) - Me.grpConditions.Controls.Add(Me.ucrNudCI) - Me.grpConditions.Location = New System.Drawing.Point(332, 151) - Me.grpConditions.Margin = New System.Windows.Forms.Padding(4) - Me.grpConditions.Name = "grpConditions" - Me.grpConditions.Padding = New System.Windows.Forms.Padding(4) - Me.grpConditions.Size = New System.Drawing.Size(261, 162) - Me.grpConditions.TabIndex = 34 - Me.grpConditions.TabStop = False - Me.grpConditions.Text = "Conditions" - ' - 'grpVarAndWilcoxSign - ' - Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoWilcoxSignTest) - Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoVarSignTest) - Me.grpVarAndWilcoxSign.Controls.Add(Me.ucrPnlWilcoxVarTest) - Me.grpVarAndWilcoxSign.Location = New System.Drawing.Point(7, 79) - Me.grpVarAndWilcoxSign.Margin = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcoxSign.Name = "grpVarAndWilcoxSign" - Me.grpVarAndWilcoxSign.Padding = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcoxSign.Size = New System.Drawing.Size(169, 87) - Me.grpVarAndWilcoxSign.TabIndex = 62 - Me.grpVarAndWilcoxSign.TabStop = False - ' - 'rdoWilcoxSignTest - ' - Me.rdoWilcoxSignTest.AutoSize = True - Me.rdoWilcoxSignTest.Location = New System.Drawing.Point(11, 16) - Me.rdoWilcoxSignTest.Margin = New System.Windows.Forms.Padding(4) - Me.rdoWilcoxSignTest.Name = "rdoWilcoxSignTest" - Me.rdoWilcoxSignTest.Size = New System.Drawing.Size(125, 21) - Me.rdoWilcoxSignTest.TabIndex = 65 - Me.rdoWilcoxSignTest.TabStop = True - Me.rdoWilcoxSignTest.Text = "Compare Mean" - Me.rdoWilcoxSignTest.TextAlign = System.Drawing.ContentAlignment.TopLeft - Me.rdoWilcoxSignTest.UseVisualStyleBackColor = True - ' - 'rdoVarSignTest - ' - Me.rdoVarSignTest.AutoSize = True - Me.rdoVarSignTest.Location = New System.Drawing.Point(11, 44) - Me.rdoVarSignTest.Margin = New System.Windows.Forms.Padding(4) - Me.rdoVarSignTest.Name = "rdoVarSignTest" - Me.rdoVarSignTest.Size = New System.Drawing.Size(141, 21) - Me.rdoVarSignTest.TabIndex = 64 - Me.rdoVarSignTest.TabStop = True - Me.rdoVarSignTest.Text = "Compare Vaiance" - Me.rdoVarSignTest.UseVisualStyleBackColor = True - ' - 'ucrPnlWilcoxVarTest - ' - Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(8, 14) - Me.ucrPnlWilcoxVarTest.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrPnlWilcoxVarTest.Name = "ucrPnlWilcoxVarTest" - Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(156, 59) - Me.ucrPnlWilcoxVarTest.TabIndex = 63 - ' - 'grpVarAndWilcox - ' - Me.grpVarAndWilcox.Controls.Add(Me.rdoEnorm) - Me.grpVarAndWilcox.Controls.Add(Me.rdoMeanWilcox) - Me.grpVarAndWilcox.Controls.Add(Me.rdoVarSign) - Me.grpVarAndWilcox.Controls.Add(Me.ucrPnlStats) - Me.grpVarAndWilcox.Location = New System.Drawing.Point(9, 74) - Me.grpVarAndWilcox.Margin = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcox.Name = "grpVarAndWilcox" - Me.grpVarAndWilcox.Padding = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcox.Size = New System.Drawing.Size(173, 92) - Me.grpVarAndWilcox.TabIndex = 55 - Me.grpVarAndWilcox.TabStop = False - ' - 'rdoEnorm - ' - Me.rdoEnorm.AutoSize = True - Me.rdoEnorm.Location = New System.Drawing.Point(13, 62) - Me.rdoEnorm.Margin = New System.Windows.Forms.Padding(4) - Me.rdoEnorm.Name = "rdoEnorm" - Me.rdoEnorm.Size = New System.Drawing.Size(69, 21) - Me.rdoEnorm.TabIndex = 65 - Me.rdoEnorm.TabStop = True - Me.rdoEnorm.Text = "enorm" - Me.rdoEnorm.UseVisualStyleBackColor = True - ' - 'rdoMeanWilcox - ' - Me.rdoMeanWilcox.AutoSize = True - Me.rdoMeanWilcox.Location = New System.Drawing.Point(13, 15) - Me.rdoMeanWilcox.Margin = New System.Windows.Forms.Padding(4) - Me.rdoMeanWilcox.Name = "rdoMeanWilcox" - Me.rdoMeanWilcox.Size = New System.Drawing.Size(125, 21) - Me.rdoMeanWilcox.TabIndex = 66 - Me.rdoMeanWilcox.TabStop = True - Me.rdoMeanWilcox.Text = "Compare Mean" - Me.rdoMeanWilcox.TextAlign = System.Drawing.ContentAlignment.TopLeft - Me.rdoMeanWilcox.UseVisualStyleBackColor = True - ' - 'rdoVarSign - ' - Me.rdoVarSign.AutoSize = True - Me.rdoVarSign.Location = New System.Drawing.Point(13, 38) - Me.rdoVarSign.Margin = New System.Windows.Forms.Padding(4) - Me.rdoVarSign.Name = "rdoVarSign" - Me.rdoVarSign.Size = New System.Drawing.Size(146, 21) - Me.rdoVarSign.TabIndex = 64 - Me.rdoVarSign.TabStop = True - Me.rdoVarSign.Text = "Compare Variance" - Me.rdoVarSign.UseVisualStyleBackColor = True - ' - 'ucrPnlStats - ' - Me.ucrPnlStats.Location = New System.Drawing.Point(8, 12) - Me.ucrPnlStats.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrPnlStats.Name = "ucrPnlStats" - Me.ucrPnlStats.Size = New System.Drawing.Size(157, 78) - Me.ucrPnlStats.TabIndex = 63 - ' - 'ucrChkBinModify - ' - Me.ucrChkBinModify.Checked = False - Me.ucrChkBinModify.Location = New System.Drawing.Point(12, 94) - Me.ucrChkBinModify.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrChkBinModify.Name = "ucrChkBinModify" - Me.ucrChkBinModify.Size = New System.Drawing.Size(232, 25) - Me.ucrChkBinModify.TabIndex = 54 - ' - 'ucrNudBinomialConditions - ' - Me.ucrNudBinomialConditions.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudBinomialConditions.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(180, 128) - Me.ucrNudBinomialConditions.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudBinomialConditions.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudBinomialConditions.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudBinomialConditions.Name = "ucrNudBinomialConditions" - Me.ucrNudBinomialConditions.Size = New System.Drawing.Size(67, 25) - Me.ucrNudBinomialConditions.TabIndex = 50 - Me.ucrNudBinomialConditions.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrOperator - ' - Me.ucrOperator.AddQuotesIfUnrecognised = True - Me.ucrOperator.IsReadOnly = False - Me.ucrOperator.Location = New System.Drawing.Point(116, 128) - Me.ucrOperator.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) - Me.ucrOperator.Name = "ucrOperator" - Me.ucrOperator.Size = New System.Drawing.Size(59, 26) - Me.ucrOperator.TabIndex = 24 - ' - 'ucrVariables - ' - Me.ucrVariables.AddQuotesIfUnrecognised = True - Me.ucrVariables.IsReadOnly = False - Me.ucrVariables.Location = New System.Drawing.Point(120, 133) - Me.ucrVariables.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) - Me.ucrVariables.Name = "ucrVariables" - Me.ucrVariables.Size = New System.Drawing.Size(117, 26) - Me.ucrVariables.TabIndex = 32 - ' - 'lblHyp - ' - Me.lblHyp.AutoSize = True - Me.lblHyp.Location = New System.Drawing.Point(8, 49) - Me.lblHyp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblHyp.Name = "lblHyp" - Me.lblHyp.Size = New System.Drawing.Size(110, 17) - Me.lblHyp.TabIndex = 46 - Me.lblHyp.Text = "Null Hypothesis:" - ' - 'ucrNudHyp - ' - Me.ucrNudHyp.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHyp.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHyp.Location = New System.Drawing.Point(135, 47) - Me.ucrNudHyp.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudHyp.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudHyp.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHyp.Name = "ucrNudHyp" - Me.ucrNudHyp.Size = New System.Drawing.Size(67, 25) - Me.ucrNudHyp.TabIndex = 49 - Me.ucrNudHyp.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblConfidenceLimit - ' - Me.lblConfidenceLimit.AutoSize = True - Me.lblConfidenceLimit.Location = New System.Drawing.Point(8, 16) - Me.lblConfidenceLimit.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblConfidenceLimit.Name = "lblConfidenceLimit" - Me.lblConfidenceLimit.Size = New System.Drawing.Size(116, 17) - Me.lblConfidenceLimit.TabIndex = 47 - Me.lblConfidenceLimit.Text = "Confidence Limit:" - ' - 'ucrNudCI - ' - Me.ucrNudCI.DecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0}) - Me.ucrNudCI.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCI.Location = New System.Drawing.Point(133, 12) - Me.ucrNudCI.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudCI.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudCI.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudCI.Name = "ucrNudCI" - Me.ucrNudCI.Size = New System.Drawing.Size(67, 25) - Me.ucrNudCI.TabIndex = 48 - Me.ucrNudCI.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(392, 352) - Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(294, 286) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(392, 322) - Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdFittingOptions.Location = New System.Drawing.Point(294, 262) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -382,66 +119,74 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(369, 14) - Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(168, 34) + Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoEstimate.UseVisualStyleBackColor = True ' + 'lblTests + ' + Me.lblTests.AutoSize = True + Me.lblTests.Location = New System.Drawing.Point(12, 256) + Me.lblTests.Name = "lblTests" + Me.lblTests.Size = New System.Drawing.Size(31, 13) + Me.lblTests.TabIndex = 47 + Me.lblTests.Text = "Test:" + ' 'ucrInputTests ' Me.ucrInputTests.AddQuotesIfUnrecognised = True Me.ucrInputTests.IsReadOnly = False - Me.ucrInputTests.Location = New System.Drawing.Point(101, 308) - Me.ucrInputTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputTests.Location = New System.Drawing.Point(64, 252) + Me.ucrInputTests.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputTests.Name = "ucrInputTests" - Me.ucrInputTests.Size = New System.Drawing.Size(192, 26) + Me.ucrInputTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputTests.TabIndex = 46 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(332, 116) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(13, 352) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) + Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -451,25 +196,26 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(13, 389) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) + Me.ucrBase.Location = New System.Drawing.Point(10, 316) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(547, 64) + Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(605, 460) + Me.ClientSize = New System.Drawing.Size(426, 374) + Me.Controls.Add(Me.lblTests) Me.Controls.Add(Me.ucrInputTests) Me.Controls.Add(Me.rdoEstimate) Me.Controls.Add(Me.cmdDisplayOptions) @@ -479,25 +225,17 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.rdoGeneralCase) Me.Controls.Add(Me.ucrPnlGeneralExactCase) Me.Controls.Add(Me.ucrSaveModel) - Me.Controls.Add(Me.grpConditions) Me.Controls.Add(Me.ucrDistributionChoice) Me.Controls.Add(Me.LblVariable) Me.Controls.Add(Me.ucrReceiverVariable) Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" - Me.grpConditions.ResumeLayout(False) - Me.grpConditions.PerformLayout() - Me.grpVarAndWilcoxSign.ResumeLayout(False) - Me.grpVarAndWilcoxSign.PerformLayout() - Me.grpVarAndWilcox.ResumeLayout(False) - Me.grpVarAndWilcox.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -508,34 +246,15 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrReceiverVariable As ucrReceiverSingle Friend WithEvents LblVariable As Label Friend WithEvents ucrDistributionChoice As ucrDistributions - Friend WithEvents lblSuccessIf As Label - Friend WithEvents ucrOperator As ucrInputComboBox - Friend WithEvents ucrVariables As ucrInputComboBox - Friend WithEvents lblEquals As Label Friend WithEvents ucrSaveModel As ucrSave Friend WithEvents rdoTest As RadioButton Friend WithEvents rdoGeneralCase As RadioButton Friend WithEvents ucrPnlGeneralExactCase As UcrPanel Friend WithEvents ucrChkConvertVariate As ucrCheck - Friend WithEvents ucrNudBinomialConditions As ucrNud - Friend WithEvents ucrNudHyp As ucrNud - Friend WithEvents ucrNudCI As ucrNud - Friend WithEvents grpConditions As GroupBox - Friend WithEvents ucrChkBinModify As ucrCheck - Friend WithEvents lblConfidenceLimit As Label - Friend WithEvents lblHyp As Label - Friend WithEvents grpVarAndWilcox As GroupBox - Friend WithEvents rdoMeanWilcox As RadioButton - Friend WithEvents rdoVarSign As RadioButton Friend WithEvents RadioButton1 As RadioButton - Friend WithEvents rdoEnorm As RadioButton - Friend WithEvents ucrPnlStats As UcrPanel - Friend WithEvents grpVarAndWilcoxSign As GroupBox - Friend WithEvents rdoWilcoxSignTest As RadioButton - Friend WithEvents rdoVarSignTest As RadioButton - Friend WithEvents ucrPnlWilcoxVarTest As UcrPanel Friend WithEvents cmdDisplayOptions As Button Friend WithEvents cmdFittingOptions As Button Friend WithEvents rdoEstimate As RadioButton Friend WithEvents ucrInputTests As ucrInputComboBox + Friend WithEvents lblTests As Label End Class \ No newline at end of file From d5b5db83e8ffeb7b74528f939892439bd652e747 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 2 Jul 2020 02:13:37 +0300 Subject: [PATCH 015/172] code fixes:restructuring code and bug fixes --- instat/dlgOneVarFitModel.vb | 403 +++++++++++++------------- instat/dlgOneVarFitModel2.Designer.vb | 51 +++- 2 files changed, 234 insertions(+), 220 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ad3dda7b086..498972a2c85 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -16,22 +16,21 @@ Imports instat.Translations Public Class dlgOneVarFitModel - Public clsROneVarFitModel, clsFamilyFunction, clsRLogLikFunction, clsRLength, clsRMean, clsRTTest, clsVarTest, clsREnormTest, clsRNonSignTest, clsRWilcoxTest, clsRBinomTest, clsRPoissonTest, clsRplot, clsRfitdist, clsRStartValues, clsRBinomStart, clsRConvertVector, clsNaExclude, clsRConvertInteger, clsRConvertNumeric As New RFunction - Public clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As RFunction - Public clsBionomialFunction As New RFunction - Public clsFunctionOperator, clsFactorOperator As New ROperator + Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsNaExclude, clsRConvertInteger, clsRConvertNumeric As New RFunction + Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction + Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction As New RFunction + Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions - Public bfirstload As Boolean = True - Public bRCodeSet As Boolean = False - Public bReset As Boolean = True + Private bFirstload As Boolean = True + Private bReset As Boolean = True Private bResetFittingOptions As Boolean = False Private bResetFitModDisplay As Boolean = False Private Sub dlgOneVarFitModel_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) - If bfirstload Then + If bFirstload Then InitialiseDialog() - bfirstload = False + bFirstload = False End If If bReset Then SetDefaults() @@ -43,71 +42,57 @@ Public Class dlgOneVarFitModel Private Sub InitialiseDialog() Dim dctucrOperator As New Dictionary(Of String, String) + Dim lstCommandButtons As New List(Of Control) ucrBase.iHelpTopicID = 296 ucrBase.clsRsyntax.iCallType = 2 ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False - ucrDistribution = ucrDistributionChoice - ucrDistributionChoice.SetGLMDistributions() - ucrDistributionChoice.SetFunctionIsDistFunction() + ucrPnlGeneralExactCase.AddRadioButton(rdoGeneralCase) + ucrPnlGeneralExactCase.AddRadioButton(rdoTest) + ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) - ucrReceiverVariable.Selector = ucrSelectorOneVarFitMod - ucrReceiverVariable.SetMeAsReceiver() + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest"}) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "PoissonCI", "quantileCI", "sdCI", "VarCI"}) ucrReceiverVariable.SetParameter(New RParameter("object")) + ucrReceiverVariable.Selector = ucrSelectorOneVarFitMod ucrReceiverVariable.SetParameterIsRFunction() + ucrReceiverVariable.SetMeAsReceiver() ucrChkConvertVariate.SetText("Convert to Numeric") ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(True, "data", "as.numeric", True) ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) - ucrSaveModel.SetSaveTypeAsModel() + ucrDistribution = ucrDistributionChoice + ucrDistributionChoice.SetGLMDistributions() + ucrDistributionChoice.SetFunctionIsDistFunction() + ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) + ucrSaveModel.SetSaveTypeAsModel() ucrSaveModel.SetCheckBoxText("Save Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveModel.SetPrefix("Normal") - ucrInputTests.SetParameter(New RParameter("y", 0)) - ucrInputTests.SetDropDownStyleAsNonEditable() - ucrInputTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}) - - ucrPnlGeneralExactCase.AddRadioButton(rdoGeneralCase) - ucrPnlGeneralExactCase.AddRadioButton(rdoTest) - ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) + ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}) + ucrInputComboTests.SetDropDownStyleAsNonEditable() - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, "fitdist", False) - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, "fitdist", False) + ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) + ucrInputComboEstimate.SetDropDownStyleAsNonEditable() - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputTests, {rdoTest, rdoEstimate}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) - ucrInputTests.SetLinkedDisplayControl(lblTests) + ucrInputComboTests.SetLinkedDisplayControl(lblTests) + ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) + lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) + ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) End Sub Private Sub SetDefaults() - clsFunctionOperator = New ROperator - clsFactorOperator = New ROperator - - clsRLength = New RFunction - clsRMean = New RFunction - clsRTTest = New RFunction - clsVarTest = New RFunction - clsREnormTest = New RFunction - clsRNonSignTest = New RFunction - clsRWilcoxTest = New RFunction - clsRBinomTest = New RFunction - clsRPoissonTest = New RFunction - clsRplot = New RFunction - clsRfitdist = New RFunction - clsRStartValues = New RFunction - clsRBinomStart = New RFunction - clsRConvertVector = New RFunction - clsNaExclude = New RFunction - clsBionomialFunction = New RFunction - - + clsROneVarFitModel = New RFunction clsRConvertInteger = New RFunction clsRConvertNumeric = New RFunction clsRplotFunction = New RFunction @@ -116,10 +101,28 @@ Public Class dlgOneVarFitModel clsRplotQqComp = New RFunction clsRplotDenscomp = New RFunction clsRLogLikFunction = New RFunction - clsFamilyFunction = New RFunction - clsROneVarFitModel = New RFunction + ucrDistribution = New ucrDistributions + clsRfitdist = New RFunction + clsRConvertVector = New RFunction + clsNaExclude = New RFunction + + clsBionomialFunction = New RFunction + clsProportionFunction = New RFunction + clsSignTestFunction = New RFunction + clsTtestFunction = New RFunction + clsWilcoxonFunction = New RFunction + clsZTestFunction = New RFunction + + clsMeanCIFunction = New RFunction + clsMedianCIFunction = New RFunction + clsNormCIFunction = New RFunction + clsPoissonCIFunction = New RFunction + clsQuantileCIFunction = New RFunction + clsSdCIFunction = New RFunction + clsVarCIFunction = New RFunction + ucrSelectorOneVarFitMod.Reset() ucrSaveModel.Reset() @@ -128,7 +131,6 @@ Public Class dlgOneVarFitModel clsROneVarFitModel.SetRCommand("fitdist") clsROneVarFitModel.AddParameter("method", Chr(34) & "mle" & Chr(34), iPosition:=1) - clsNaExclude.SetPackageName("stats") clsNaExclude.SetRCommand("na.exclude") @@ -139,46 +141,16 @@ Public Class dlgOneVarFitModel clsRConvertVector.SetRCommand("as.vector") clsRConvertVector.AddParameter("x", clsRFunctionParameter:=clsNaExclude) - clsRStartValues.SetRCommand("mean") clsRfitdist.SetPackageName("fitdistrplus") clsRfitdist.SetRCommand("fitdist") - clsFamilyFunction = ucrDistributionChoice.clsCurrRFunction clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - 'TTest - clsRTTest.SetPackageName("stats") - clsRTTest.SetRCommand("t.test") - clsRTTest.AddParameter("mu", 0.00) - - 'VarTest - clsVarTest.SetPackageName("EnvStats") - clsVarTest.SetRCommand("varTest") - - 'Enorm - clsREnormTest.SetPackageName("EnvStats") - clsREnormTest.SetRCommand("enorm") - - clsRWilcoxTest.SetPackageName("stats") - clsRWilcoxTest.SetRCommand("wilcox.test") - clsRWilcoxTest.AddParameter("mu", 0.00) - - clsRNonSignTest.SetPackageName("signmedian.test") - clsRNonSignTest.SetRCommand("signmedian.test") - - clsRPoissonTest.SetPackageName("stats") - clsRPoissonTest.SetRCommand("poisson.test") - - clsRLength.SetRCommand("length") - clsRMean.SetRCommand("mean") - - clsRBinomTest.SetPackageName("stats") - clsRBinomTest.SetRCommand("binom.test") - 'Display Options/Functions clsRplotFunction.SetPackageName("graphics") clsRplotFunction.SetRCommand("plot") + clsRplotFunction.AddParameter("x", clsRFunctionParameter:=clsROneVarFitModel) clsRplotFunction.iCallType = 3 clsRplotFunction.bExcludeAssignedFunctionOutput = False @@ -186,32 +158,78 @@ Public Class dlgOneVarFitModel clsRplotPPComp.SetRCommand("ppcomp") clsRplotPPComp.bExcludeAssignedFunctionOutput = False clsRplotPPComp.iCallType = 3 + clsRplotPPComp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) + clsRplotPPComp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) clsRplotCdfcomp.SetPackageName("fitdistrplus") clsRplotCdfcomp.SetRCommand("cdfcomp") clsRplotCdfcomp.bExcludeAssignedFunctionOutput = False clsRplotCdfcomp.iCallType = 3 + clsRplotCdfcomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) + clsRplotCdfcomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) clsRplotQqComp.SetPackageName("fitdistrplus") clsRplotQqComp.SetRCommand("qqcomp") clsRplotQqComp.bExcludeAssignedFunctionOutput = False clsRplotQqComp.iCallType = 3 + clsRplotQqComp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) + clsRplotQqComp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) clsRplotDenscomp.SetPackageName("fitdistrplus") clsRplotDenscomp.SetRCommand("denscomp") clsRplotDenscomp.bExcludeAssignedFunctionOutput = False clsRplotDenscomp.iCallType = 3 + clsRplotDenscomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) + clsRplotDenscomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) clsRLogLikFunction.SetPackageName("fitdistrplus") clsRLogLikFunction.SetRCommand("llplot") clsRLogLikFunction.iCallType = 3 + clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) + + 'Test clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") + clsProportionFunction.SetPackageName("mosaic") + clsProportionFunction.SetRCommand("prop.test") + + clsSignTestFunction.SetPackageName("DescTools") + clsSignTestFunction.SetRCommand("SignTest") + + clsTtestFunction.SetPackageName("mosaic") + clsTtestFunction.SetRCommand("t.test") + + clsWilcoxonFunction.SetPackageName("stats") + clsWilcoxonFunction.SetRCommand("wilcox.test") + + clsZTestFunction.SetPackageName("DescTools") + clsZTestFunction.SetRCommand("ZTest") + + 'Estimate + clsMeanCIFunction.SetPackageName("DescTools") + clsMeanCIFunction.SetRCommand("MeanCI") + + clsMedianCIFunction.SetPackageName("DescTools") + clsMedianCIFunction.SetRCommand("MedianCI ") + + clsNormCIFunction.SetPackageName("MKinfer") + clsNormCIFunction.SetRCommand("normCI") + + clsPoissonCIFunction.SetPackageName("DescTools") + clsPoissonCIFunction.SetRCommand("PoissonCI") + + clsQuantileCIFunction.SetPackageName("MKinfer") + clsQuantileCIFunction.SetRCommand("quantileCI") + + clsSdCIFunction.SetPackageName("MKinfer") + clsSdCIFunction.SetRCommand("sdCI") + + clsVarCIFunction.SetPackageName("DescTools") + clsVarCIFunction.SetRCommand("VarCI") + SetDataParameter() - SetBaseFunction() - SetDistributions() clsROneVarFitModel.SetAssignTo("last_model", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model") clsRLogLikFunction.SetAssignTo("last_likelihood", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_likelihood") @@ -219,45 +237,30 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) - - clsRplotFunction.AddParameter("x", clsRFunctionParameter:=clsROneVarFitModel) - ucrBase.clsRsyntax.AddToAfterCodes(clsRplotFunction, iPosition:=1) bResetFittingOptions = True bResetFitModDisplay = True End Sub - Public Sub SetRCodeForControls(bReset As Boolean) - bRCodeSet = False - ucrPnlGeneralExactCase.SetRCode(clsROneVarFitModel, bReset) + Private Sub SetRCodeForControls(bReset As Boolean) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=1) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("x", 0), iAdditionalPairNo:=2) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("x", 0), iAdditionalPairNo:=3) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("x", 0), iAdditionalPairNo:=4) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("x", 0), iAdditionalPairNo:=5) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("x", 0), iAdditionalPairNo:=6) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("x", 0), iAdditionalPairNo:=7) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("x", 0), iAdditionalPairNo:=8) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("x", 0), iAdditionalPairNo:=9) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("x", 0), iAdditionalPairNo:=10) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=13) + + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) - ucrDistributionChoice.SetRCode(clsFamilyFunction, bReset) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRWilcoxTest, New RParameter("x"), iAdditionalPairNo:=1) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRNonSignTest, New RParameter("x"), iAdditionalPairNo:=2) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRLength, New RParameter("x"), iAdditionalPairNo:=3) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRMean, New RParameter("x"), iAdditionalPairNo:=4) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRBinomTest, New RParameter("x"), iAdditionalPairNo:=5) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRStartValues, New RParameter("x"), iAdditionalPairNo:=6) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=7) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) - bRCodeSet = True - End Sub - - Private Sub ucrPnlStats_ControlValueChanged(ucrChangedControl As ucrCore) - SetBaseFunction() - End Sub - - Private Sub ucrPnlWilcoxVarTest_ControlValueChanged(ucrChangedControl As ucrCore) - SetBaseFunction() - End Sub - - Private Sub SetDistributions() - If rdoGeneralCase.Checked Then - ucrDistributionChoice.SetAllDistributions() - ElseIf rdoTest.Checked Then - ucrDistributionChoice.SetExactDistributions() - End If End Sub Private Sub TestOKEnabled() @@ -274,7 +277,7 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub - Public Sub SetDataParameter() + Private Sub SetDataParameter() If Not ucrReceiverVariable.IsEmpty Then If ucrReceiverVariable.strCurrDataType = "numeric" Then ucrChkConvertVariate.Checked = False @@ -307,39 +310,36 @@ Public Class dlgOneVarFitModel End If End Sub - - Public Sub ResponseConvert() - If bRCodeSet Then - If Not ucrReceiverVariable.IsEmpty Then - ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) - If ucrReceiverVariable.strCurrDataType = "numeric" Then - ucrChkConvertVariate.Checked = False - ucrChkConvertVariate.Visible = False - Else - ucrChkConvertVariate.Visible = True - End If - If ucrChkConvertVariate.Checked Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then - ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables - End If - End If - Else + Private Sub ResponseConvert() + If Not ucrReceiverVariable.IsEmpty Then + ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) + If ucrReceiverVariable.strCurrDataType = "numeric" Then + ucrChkConvertVariate.Checked = False ucrChkConvertVariate.Visible = False + Else + ucrChkConvertVariate.Visible = True End If - If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then - ucrDistributionChoice.Enabled = False - ucrDistributionChoice.ucrInputDistributions.SetName("") + If ucrChkConvertVariate.Checked Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) Else - ucrDistributionChoice.Enabled = True + 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + Else + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + End If + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then + ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables + End If End If + Else + ucrChkConvertVariate.Visible = False + End If + If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then + ucrDistributionChoice.Enabled = False + ucrDistributionChoice.ucrInputDistributions.SetName("") + Else + ucrDistributionChoice.Enabled = True End If End Sub @@ -366,24 +366,7 @@ Public Class dlgOneVarFitModel End If End Sub - Public Sub SetBaseFunction() - If rdoGeneralCase.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) - clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) - SetDataParameter() - clsRplotPPComp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) - clsRplotPPComp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) - clsRplotCdfcomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) - clsRplotCdfcomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) - clsRplotQqComp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) - clsRplotQqComp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) - clsRplotDenscomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) - clsRplotDenscomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) - clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) - End If - End Sub - - Public Sub DataTypeAccepted() + Private Sub DataTypeAccepted() If rdoGeneralCase.Checked Then ucrReceiverVariable.RemoveIncludedMetadataProperty("class") ElseIf rdoTest.Checked Then @@ -396,18 +379,9 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.RemoveIncludedMetadataProperty("class") End If End If - End Sub - - - Private Sub SetBinomialTest() - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Then - ucrReceiverVariable.SetDataType(strTemp:="integer" OrElse "numeric" OrElse "character" OrElse "factor") - End If - ucrBase.clsRsyntax.SetBaseRFunction(clsRBinomTest) End Sub Private Sub PlotResiduals() - clsRplot.AddParameter("x", clsRFunctionParameter:=clsRfitdist) clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then clsRConvertInteger.SetRCommand("as.integer") @@ -429,42 +403,29 @@ Public Class dlgOneVarFitModel bResetFittingOptions = False sdgOneVarFitModel.ShowDialog() End Sub - - Private Sub Display() - If rdoGeneralCase.Checked Then - cmdFittingOptions.Visible = True - cmdDisplayOptions.Visible = True - ElseIf rdoTest.Checked OrElse rdoEstimate.Checked Then - cmdFittingOptions.Visible = False - cmdDisplayOptions.Visible = False - End If - End Sub - Private Sub SetTestsLabelSaveLabelTextPrefix() + Private Sub SetSaveLabelTextAndPrefix() If rdoGeneralCase.Checked Then ucrSaveModel.SetCheckBoxText("Save Model") ucrSaveModel.SetPrefix("dist") ElseIf rdoTest.Checked Then - lblTests.Text = "Test:" ucrSaveModel.SetCheckBoxText("Save Test") ucrSaveModel.SetPrefix("test") ElseIf rdoEstimate.Checked Then - lblTests.Text = "Estimate:" ucrSaveModel.SetCheckBoxText("Save Estimate") ucrSaveModel.SetPrefix("ci") End If End Sub - Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged - SetDistributions() + Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged DataTypeAccepted() - SetTestsLabelSaveLabelTextPrefix() - Display() + SetSaveLabelTextAndPrefix() + SetTestEstimateBaseFunction() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged - ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) - SetBaseFunction() + clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) + ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) SetDataParameter() PlotResiduals() DataTypeAccepted() @@ -472,16 +433,7 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub - Private Sub cboVariables_TextChanged() - SetBinomialTest() - End Sub - - Private Sub ucrChkBinModify_ControlValueChanged(ucrChangedControl As ucrCore) - SetBinomialTest() - End Sub - - Private Sub UcrReceiver_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged - SetBaseFunction() + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged PlotResiduals() ResponseConvert() DataTypeAccepted() @@ -491,13 +443,50 @@ Public Class dlgOneVarFitModel SetDataParameter() End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputTests.ControlValueChanged - Select Case ucrInputTests.GetValue - Case "Binomial" - ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) - Case "Proportion" + Private Sub SetTestEstimateBaseFunction() + If rdoGeneralCase.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) + ucrBase.clsRsyntax.AddToAfterCodes(clsRplotFunction, iPosition:=1) + SetDataParameter() + ElseIf rdoTest.Checked Then + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) + Select Case ucrInputComboTests.GetValue + Case "Binomial" + ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) + Case "Proportion" + ucrBase.clsRsyntax.SetBaseRFunction(clsProportionFunction) + Case "Sign" + ucrBase.clsRsyntax.SetBaseRFunction(clsSignTestFunction) + Case "T" + ucrBase.clsRsyntax.SetBaseRFunction(clsTtestFunction) + Case "Wilcoxon" + ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) + Case "Z" + ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) + End Select + ElseIf rdoEstimate.Checked Then + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) + Select Case ucrInputComboEstimate.GetValue + Case "mean" + ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) + Case "median" + ucrBase.clsRsyntax.SetBaseRFunction(clsMedianCIFunction) + Case "normal" + ucrBase.clsRsyntax.SetBaseRFunction(clsNormCIFunction) + Case "poisson" + ucrBase.clsRsyntax.SetBaseRFunction(clsPoissonCIFunction) + Case "quantile" + ucrBase.clsRsyntax.SetBaseRFunction(clsQuantileCIFunction) + Case "sd" + ucrBase.clsRsyntax.SetBaseRFunction(clsSdCIFunction) + Case "variance" + ucrBase.clsRsyntax.SetBaseRFunction(clsVarCIFunction) + End Select + End If + End Sub - End Select + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + SetTestEstimateBaseFunction() End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index cb9283fb43f..49673abbe69 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -45,7 +45,7 @@ Partial Class dlgOneVarFitModel Me.cmdFittingOptions = New System.Windows.Forms.Button() Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.lblTests = New System.Windows.Forms.Label() - Me.ucrInputTests = New instat.ucrInputComboBox() + Me.ucrInputComboTests = New instat.ucrInputComboBox() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() Me.ucrSaveModel = New instat.ucrSave() @@ -53,6 +53,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputComboEstimate = New instat.ucrInputComboBox() + Me.lblEstimate = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -96,7 +98,7 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(294, 286) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 286) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) Me.cmdDisplayOptions.TabIndex = 44 @@ -105,7 +107,7 @@ Partial Class dlgOneVarFitModel ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(294, 262) + Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 261) Me.cmdFittingOptions.Name = "cmdFittingOptions" Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) Me.cmdFittingOptions.TabIndex = 43 @@ -136,15 +138,15 @@ Partial Class dlgOneVarFitModel Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' - 'ucrInputTests + 'ucrInputComboTests ' - Me.ucrInputTests.AddQuotesIfUnrecognised = True - Me.ucrInputTests.IsReadOnly = False - Me.ucrInputTests.Location = New System.Drawing.Point(64, 252) - Me.ucrInputTests.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputTests.Name = "ucrInputTests" - Me.ucrInputTests.Size = New System.Drawing.Size(92, 21) - Me.ucrInputTests.TabIndex = 46 + Me.ucrInputComboTests.AddQuotesIfUnrecognised = True + Me.ucrInputComboTests.IsReadOnly = False + Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboTests.Name = "ucrInputComboTests" + Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboTests.TabIndex = 46 ' 'ucrChkConvertVariate ' @@ -210,13 +212,34 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrInputComboEstimate + ' + Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True + Me.ucrInputComboEstimate.IsReadOnly = False + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboEstimate.TabIndex = 48 + ' + 'lblEstimate + ' + Me.lblEstimate.AutoSize = True + Me.lblEstimate.Location = New System.Drawing.Point(12, 256) + Me.lblEstimate.Name = "lblEstimate" + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.TabIndex = 49 + Me.lblEstimate.Text = "Estimate:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(426, 374) + Me.Controls.Add(Me.lblEstimate) + Me.Controls.Add(Me.ucrInputComboEstimate) Me.Controls.Add(Me.lblTests) - Me.Controls.Add(Me.ucrInputTests) + Me.Controls.Add(Me.ucrInputComboTests) Me.Controls.Add(Me.rdoEstimate) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) @@ -255,6 +278,8 @@ Partial Class dlgOneVarFitModel Friend WithEvents cmdDisplayOptions As Button Friend WithEvents cmdFittingOptions As Button Friend WithEvents rdoEstimate As RadioButton - Friend WithEvents ucrInputTests As ucrInputComboBox + Friend WithEvents ucrInputComboTests As ucrInputComboBox Friend WithEvents lblTests As Label + Friend WithEvents ucrInputComboEstimate As ucrInputComboBox + Friend WithEvents lblEstimate As Label End Class \ No newline at end of file From ff8618fb293b237d41e503337bbf93f3d122a9ca Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 2 Jul 2020 13:04:17 +0300 Subject: [PATCH 016/172] code refactor and bug fixes --- instat/dlgOneVarFitModel.vb | 100 ++++++++------------------ instat/dlgOneVarFitModel2.Designer.vb | 72 ++++++++++++++----- 2 files changed, 85 insertions(+), 87 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 498972a2c85..8c0b54e74d8 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -16,7 +16,7 @@ Imports instat.Translations Public Class dlgOneVarFitModel - Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsNaExclude, clsRConvertInteger, clsRConvertNumeric As New RFunction + Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction @@ -56,7 +56,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest"}) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "PoissonCI", "quantileCI", "sdCI", "VarCI"}) - ucrReceiverVariable.SetParameter(New RParameter("object")) + ucrReceiverVariable.SetParameter(New RParameter("object", 0)) ucrReceiverVariable.Selector = ucrSelectorOneVarFitMod ucrReceiverVariable.SetParameterIsRFunction() ucrReceiverVariable.SetMeAsReceiver() @@ -82,11 +82,24 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() + ucrNudTrim.SetParameter(New RParameter("trim", 1)) + ucrNudTrim.Maximum = 0.5 + ucrNudTrim.DecimalPlaces = 2 + ucrNudTrim.Increment = 0.01 + + ucrChkIgnoreMissing.SetParameter(New RParameter("na.rm", 1)) + ucrChkIgnoreMissing.SetText("Ignore Missing") + ucrChkIgnoreMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkIgnoreMissing.SetRDefault("FALSE") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkIgnoreMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) + ucrNudTrim.SetLinkedDisplayControl(lblTrim) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) End Sub @@ -95,6 +108,7 @@ Public Class dlgOneVarFitModel clsROneVarFitModel = New RFunction clsRConvertInteger = New RFunction clsRConvertNumeric = New RFunction + clsRplotFunction = New RFunction clsRplotPPComp = New RFunction clsRplotCdfcomp = New RFunction @@ -126,31 +140,33 @@ Public Class dlgOneVarFitModel ucrSelectorOneVarFitMod.Reset() ucrSaveModel.Reset() + ucrChkConvertVariate.Visible = False 'hide convert to numeric checkbox by default + 'General Case clsROneVarFitModel.SetPackageName("fitdistrplus") clsROneVarFitModel.SetRCommand("fitdist") clsROneVarFitModel.AddParameter("method", Chr(34) & "mle" & Chr(34), iPosition:=1) + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) clsNaExclude.SetPackageName("stats") clsNaExclude.SetRCommand("na.exclude") clsRConvertNumeric.SetRCommand("as.numeric") clsRConvertNumeric.AddParameter("x", clsRFunctionParameter:=clsNaExclude, iPosition:=0) + clsRConvertInteger.SetRCommand("as.integer") clsRConvertInteger.AddParameter("x", clsRFunctionParameter:=clsNaExclude, iPosition:=0) clsRConvertVector.SetRCommand("as.vector") - clsRConvertVector.AddParameter("x", clsRFunctionParameter:=clsNaExclude) + clsRConvertVector.AddParameter("x", clsRFunctionParameter:=clsNaExclude, iPosition:=0) clsRfitdist.SetPackageName("fitdistrplus") clsRfitdist.SetRCommand("fitdist") - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - 'Display Options/Functions clsRplotFunction.SetPackageName("graphics") clsRplotFunction.SetRCommand("plot") - clsRplotFunction.AddParameter("x", clsRFunctionParameter:=clsROneVarFitModel) + clsRplotFunction.AddParameter("x", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) clsRplotFunction.iCallType = 3 clsRplotFunction.bExcludeAssignedFunctionOutput = False @@ -187,7 +203,6 @@ Public Class dlgOneVarFitModel clsRLogLikFunction.iCallType = 3 clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) - 'Test clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") @@ -229,8 +244,6 @@ Public Class dlgOneVarFitModel clsVarCIFunction.SetPackageName("DescTools") clsVarCIFunction.SetRCommand("VarCI") - SetDataParameter() - clsROneVarFitModel.SetAssignTo("last_model", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model") clsRLogLikFunction.SetAssignTo("last_likelihood", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_likelihood") clsRplotFunction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") @@ -255,10 +268,14 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=13) + ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=1) + ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) + ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) + ucrChkIgnoreMissing.SetRCode(clsMeanCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub @@ -277,39 +294,6 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub - Private Sub SetDataParameter() - If Not ucrReceiverVariable.IsEmpty Then - If ucrReceiverVariable.strCurrDataType = "numeric" Then - ucrChkConvertVariate.Checked = False - ucrChkConvertVariate.Visible = False - Else - ucrChkConvertVariate.Visible = True - End If - If ucrChkConvertVariate.Checked Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then - ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables - End If - End If - Else - ucrChkConvertVariate.Visible = False - clsROneVarFitModel.RemoveParameterByName("data") - End If - If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then - ucrDistributionChoice.Enabled = False - ucrDistributionChoice.ucrInputDistributions.SetName("") - Else - ucrDistributionChoice.Enabled = True - End If - End Sub - Private Sub ResponseConvert() If Not ucrReceiverVariable.IsEmpty Then ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) @@ -366,21 +350,6 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub DataTypeAccepted() - If rdoGeneralCase.Checked Then - ucrReceiverVariable.RemoveIncludedMetadataProperty("class") - ElseIf rdoTest.Checked Then - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Normal" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then - ucrReceiverVariable.SetIncludedDataTypes({"numeric"}) - If (ucrReceiverVariable.strCurrDataType = "factor" OrElse ucrReceiverVariable.strCurrDataType = "character") Then - ucrReceiverVariable.Clear() - End If - Else - ucrReceiverVariable.RemoveIncludedMetadataProperty("class") - End If - End If - End Sub - Private Sub PlotResiduals() clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then @@ -417,37 +386,28 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged - DataTypeAccepted() + Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged SetSaveLabelTextAndPrefix() SetTestEstimateBaseFunction() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged - clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) + clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) - SetDataParameter() - PlotResiduals() - DataTypeAccepted() + PlotResiduals() StartParameterValues() TestOKEnabled() End Sub Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged PlotResiduals() - ResponseConvert() - DataTypeAccepted() - End Sub - - Private Sub ucrChkConvertVariate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkConvertVariate.ControlValueChanged - SetDataParameter() + ResponseConvert() End Sub Private Sub SetTestEstimateBaseFunction() If rdoGeneralCase.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) ucrBase.clsRsyntax.AddToAfterCodes(clsRplotFunction, iPosition:=1) - SetDataParameter() ElseIf rdoTest.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) Select Case ucrInputComboTests.GetValue diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 49673abbe69..4cffa242e14 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -45,6 +45,8 @@ Partial Class dlgOneVarFitModel Me.cmdFittingOptions = New System.Windows.Forms.Button() Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.lblTests = New System.Windows.Forms.Label() + Me.lblEstimate = New System.Windows.Forms.Label() + Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() @@ -53,8 +55,9 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputComboEstimate = New instat.ucrInputComboBox() - Me.lblEstimate = New System.Windows.Forms.Label() + Me.ucrNudTrim = New instat.ucrNud() + Me.lblTrim = New System.Windows.Forms.Label() + Me.ucrChkIgnoreMissing = New instat.ucrCheck() Me.SuspendLayout() ' 'LblVariable @@ -138,6 +141,25 @@ Partial Class dlgOneVarFitModel Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' + 'lblEstimate + ' + Me.lblEstimate.AutoSize = True + Me.lblEstimate.Location = New System.Drawing.Point(12, 256) + Me.lblEstimate.Name = "lblEstimate" + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.TabIndex = 49 + Me.lblEstimate.Text = "Estimate:" + ' + 'ucrInputComboEstimate + ' + Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True + Me.ucrInputComboEstimate.IsReadOnly = False + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboEstimate.TabIndex = 48 + ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True @@ -212,30 +234,43 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputComboEstimate + 'ucrNudTrim ' - Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True - Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) - Me.ucrInputComboEstimate.TabIndex = 48 + Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudTrim.Location = New System.Drawing.Point(279, 131) + Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTrim.Name = "ucrNudTrim" + Me.ucrNudTrim.Size = New System.Drawing.Size(50, 20) + Me.ucrNudTrim.TabIndex = 50 + Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblEstimate + 'lblTrim ' - Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(12, 256) - Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(50, 13) - Me.lblEstimate.TabIndex = 49 - Me.lblEstimate.Text = "Estimate:" + Me.lblTrim.AutoSize = True + Me.lblTrim.Location = New System.Drawing.Point(246, 135) + Me.lblTrim.Name = "lblTrim" + Me.lblTrim.Size = New System.Drawing.Size(30, 13) + Me.lblTrim.TabIndex = 51 + Me.lblTrim.Text = "Trim:" + ' + 'ucrChkIgnoreMissing + ' + Me.ucrChkIgnoreMissing.Checked = False + Me.ucrChkIgnoreMissing.Location = New System.Drawing.Point(249, 168) + Me.ucrChkIgnoreMissing.Name = "ucrChkIgnoreMissing" + Me.ucrChkIgnoreMissing.Size = New System.Drawing.Size(137, 20) + Me.ucrChkIgnoreMissing.TabIndex = 52 ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(426, 374) + Me.Controls.Add(Me.ucrChkIgnoreMissing) + Me.Controls.Add(Me.lblTrim) + Me.Controls.Add(Me.ucrNudTrim) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) Me.Controls.Add(Me.lblTests) @@ -282,4 +317,7 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblTests As Label Friend WithEvents ucrInputComboEstimate As ucrInputComboBox Friend WithEvents lblEstimate As Label + Friend WithEvents ucrNudTrim As ucrNud + Friend WithEvents lblTrim As Label + Friend WithEvents ucrChkIgnoreMissing As ucrCheck End Class \ No newline at end of file From 0b20f13321cb2de86046271a5084823e4e4e99d2 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:03:09 +0300 Subject: [PATCH 017/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 4 + instat/dlgOneVarFitModel2.Designer.vb | 448 +++++++++++++++++++++----- 2 files changed, 377 insertions(+), 75 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8c0b54e74d8..69d39eae0d2 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -87,6 +87,10 @@ Public Class dlgOneVarFitModel ucrNudTrim.DecimalPlaces = 2 ucrNudTrim.Increment = 0.01 + ucrNudHyp.SetParameter(New RParameter("mu")) + + ucrNudCI.SetParameter(New RParameter("mu")) + ucrChkIgnoreMissing.SetParameter(New RParameter("na.rm", 1)) ucrChkIgnoreMissing.SetText("Ignore Missing") ucrChkIgnoreMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 4cffa242e14..df44086bf73 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -46,6 +46,29 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() + Me.lblTrim = New System.Windows.Forms.Label() + Me.grpConditions = New System.Windows.Forms.GroupBox() + Me.grpVarAndWilcoxSign = New System.Windows.Forms.GroupBox() + Me.rdoWilcoxSignTest = New System.Windows.Forms.RadioButton() + Me.rdoVarSignTest = New System.Windows.Forms.RadioButton() + Me.grpVarAndWilcox = New System.Windows.Forms.GroupBox() + Me.rdoEnorm = New System.Windows.Forms.RadioButton() + Me.rdoMeanWilcox = New System.Windows.Forms.RadioButton() + Me.rdoVarSign = New System.Windows.Forms.RadioButton() + Me.lblEquals = New System.Windows.Forms.Label() + Me.lblSuccessIf = New System.Windows.Forms.Label() + Me.lblHyp = New System.Windows.Forms.Label() + Me.lblConfidenceLimit = New System.Windows.Forms.Label() + Me.ucrPnlWilcoxVarTest = New instat.UcrPanel() + Me.ucrPnlStats = New instat.UcrPanel() + Me.ucrChkBinModify = New instat.ucrCheck() + Me.ucrNudBinomialConditions = New instat.ucrNud() + Me.ucrOperator = New instat.ucrInputComboBox() + Me.ucrVariables = New instat.ucrInputComboBox() + Me.ucrNudHyp = New instat.ucrNud() + Me.ucrNudCI = New instat.ucrNud() + Me.ucrChkIgnoreMissing = New instat.ucrCheck() + Me.ucrNudTrim = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() Me.ucrChkConvertVariate = New instat.ucrCheck() @@ -55,17 +78,18 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrNudTrim = New instat.ucrNud() - Me.lblTrim = New System.Windows.Forms.Label() - Me.ucrChkIgnoreMissing = New instat.ucrCheck() + Me.grpConditions.SuspendLayout() + Me.grpVarAndWilcoxSign.SuspendLayout() + Me.grpVarAndWilcox.SuspendLayout() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(249, 47) + Me.LblVariable.Location = New System.Drawing.Point(332, 58) + Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(48, 13) + Me.LblVariable.Size = New System.Drawing.Size(64, 17) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' @@ -76,9 +100,10 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(154, 11) + Me.rdoTest.Location = New System.Drawing.Point(205, 14) + Me.rdoTest.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(122, 28) + Me.rdoTest.Size = New System.Drawing.Size(163, 34) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -91,9 +116,10 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) + Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) + Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) + Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -101,18 +127,20 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 286) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 352) + Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 261) + Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 321) + Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -124,9 +152,10 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) + Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) + Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) + Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -135,82 +164,352 @@ Partial Class dlgOneVarFitModel 'lblTests ' Me.lblTests.AutoSize = True - Me.lblTests.Location = New System.Drawing.Point(12, 256) + Me.lblTests.Location = New System.Drawing.Point(16, 315) + Me.lblTests.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTests.Name = "lblTests" - Me.lblTests.Size = New System.Drawing.Size(31, 13) + Me.lblTests.Size = New System.Drawing.Size(40, 17) Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(12, 256) + Me.lblEstimate.Location = New System.Drawing.Point(16, 315) + Me.lblEstimate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.Size = New System.Drawing.Size(66, 17) Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' + 'lblTrim + ' + Me.lblTrim.AutoSize = True + Me.lblTrim.Location = New System.Drawing.Point(328, 166) + Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTrim.Name = "lblTrim" + Me.lblTrim.Size = New System.Drawing.Size(40, 17) + Me.lblTrim.TabIndex = 51 + Me.lblTrim.Text = "Trim:" + ' + 'grpConditions + ' + Me.grpConditions.Controls.Add(Me.grpVarAndWilcoxSign) + Me.grpConditions.Controls.Add(Me.grpVarAndWilcox) + Me.grpConditions.Controls.Add(Me.ucrChkBinModify) + Me.grpConditions.Controls.Add(Me.lblEquals) + Me.grpConditions.Controls.Add(Me.ucrNudBinomialConditions) + Me.grpConditions.Controls.Add(Me.ucrOperator) + Me.grpConditions.Controls.Add(Me.ucrVariables) + Me.grpConditions.Controls.Add(Me.lblSuccessIf) + Me.grpConditions.Controls.Add(Me.lblHyp) + Me.grpConditions.Controls.Add(Me.ucrNudHyp) + Me.grpConditions.Controls.Add(Me.lblConfidenceLimit) + Me.grpConditions.Controls.Add(Me.ucrNudCI) + Me.grpConditions.Location = New System.Drawing.Point(299, 108) + Me.grpConditions.Margin = New System.Windows.Forms.Padding(4) + Me.grpConditions.Name = "grpConditions" + Me.grpConditions.Padding = New System.Windows.Forms.Padding(4) + Me.grpConditions.Size = New System.Drawing.Size(261, 162) + Me.grpConditions.TabIndex = 53 + Me.grpConditions.TabStop = False + Me.grpConditions.Text = "Conditions" + ' + 'grpVarAndWilcoxSign + ' + Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoWilcoxSignTest) + Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoVarSignTest) + Me.grpVarAndWilcoxSign.Controls.Add(Me.ucrPnlWilcoxVarTest) + Me.grpVarAndWilcoxSign.Location = New System.Drawing.Point(7, 79) + Me.grpVarAndWilcoxSign.Margin = New System.Windows.Forms.Padding(4) + Me.grpVarAndWilcoxSign.Name = "grpVarAndWilcoxSign" + Me.grpVarAndWilcoxSign.Padding = New System.Windows.Forms.Padding(4) + Me.grpVarAndWilcoxSign.Size = New System.Drawing.Size(169, 87) + Me.grpVarAndWilcoxSign.TabIndex = 62 + Me.grpVarAndWilcoxSign.TabStop = False + ' + 'rdoWilcoxSignTest + ' + Me.rdoWilcoxSignTest.AutoSize = True + Me.rdoWilcoxSignTest.Location = New System.Drawing.Point(11, 16) + Me.rdoWilcoxSignTest.Margin = New System.Windows.Forms.Padding(4) + Me.rdoWilcoxSignTest.Name = "rdoWilcoxSignTest" + Me.rdoWilcoxSignTest.Size = New System.Drawing.Size(125, 21) + Me.rdoWilcoxSignTest.TabIndex = 65 + Me.rdoWilcoxSignTest.TabStop = True + Me.rdoWilcoxSignTest.Text = "Compare Mean" + Me.rdoWilcoxSignTest.TextAlign = System.Drawing.ContentAlignment.TopLeft + Me.rdoWilcoxSignTest.UseVisualStyleBackColor = True + ' + 'rdoVarSignTest + ' + Me.rdoVarSignTest.AutoSize = True + Me.rdoVarSignTest.Location = New System.Drawing.Point(11, 44) + Me.rdoVarSignTest.Margin = New System.Windows.Forms.Padding(4) + Me.rdoVarSignTest.Name = "rdoVarSignTest" + Me.rdoVarSignTest.Size = New System.Drawing.Size(141, 21) + Me.rdoVarSignTest.TabIndex = 64 + Me.rdoVarSignTest.TabStop = True + Me.rdoVarSignTest.Text = "Compare Vaiance" + Me.rdoVarSignTest.UseVisualStyleBackColor = True + ' + 'grpVarAndWilcox + ' + Me.grpVarAndWilcox.Controls.Add(Me.rdoEnorm) + Me.grpVarAndWilcox.Controls.Add(Me.rdoMeanWilcox) + Me.grpVarAndWilcox.Controls.Add(Me.rdoVarSign) + Me.grpVarAndWilcox.Controls.Add(Me.ucrPnlStats) + Me.grpVarAndWilcox.Location = New System.Drawing.Point(9, 74) + Me.grpVarAndWilcox.Margin = New System.Windows.Forms.Padding(4) + Me.grpVarAndWilcox.Name = "grpVarAndWilcox" + Me.grpVarAndWilcox.Padding = New System.Windows.Forms.Padding(4) + Me.grpVarAndWilcox.Size = New System.Drawing.Size(173, 92) + Me.grpVarAndWilcox.TabIndex = 55 + Me.grpVarAndWilcox.TabStop = False + ' + 'rdoEnorm + ' + Me.rdoEnorm.AutoSize = True + Me.rdoEnorm.Location = New System.Drawing.Point(13, 62) + Me.rdoEnorm.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEnorm.Name = "rdoEnorm" + Me.rdoEnorm.Size = New System.Drawing.Size(69, 21) + Me.rdoEnorm.TabIndex = 65 + Me.rdoEnorm.TabStop = True + Me.rdoEnorm.Text = "enorm" + Me.rdoEnorm.UseVisualStyleBackColor = True + ' + 'rdoMeanWilcox + ' + Me.rdoMeanWilcox.AutoSize = True + Me.rdoMeanWilcox.Location = New System.Drawing.Point(13, 15) + Me.rdoMeanWilcox.Margin = New System.Windows.Forms.Padding(4) + Me.rdoMeanWilcox.Name = "rdoMeanWilcox" + Me.rdoMeanWilcox.Size = New System.Drawing.Size(125, 21) + Me.rdoMeanWilcox.TabIndex = 66 + Me.rdoMeanWilcox.TabStop = True + Me.rdoMeanWilcox.Text = "Compare Mean" + Me.rdoMeanWilcox.TextAlign = System.Drawing.ContentAlignment.TopLeft + Me.rdoMeanWilcox.UseVisualStyleBackColor = True + ' + 'rdoVarSign + ' + Me.rdoVarSign.AutoSize = True + Me.rdoVarSign.Location = New System.Drawing.Point(13, 38) + Me.rdoVarSign.Margin = New System.Windows.Forms.Padding(4) + Me.rdoVarSign.Name = "rdoVarSign" + Me.rdoVarSign.Size = New System.Drawing.Size(146, 21) + Me.rdoVarSign.TabIndex = 64 + Me.rdoVarSign.TabStop = True + Me.rdoVarSign.Text = "Compare Variance" + Me.rdoVarSign.UseVisualStyleBackColor = True + ' + 'lblEquals + ' + Me.lblEquals.AutoSize = True + Me.lblEquals.Location = New System.Drawing.Point(95, 133) + Me.lblEquals.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEquals.Name = "lblEquals" + Me.lblEquals.Size = New System.Drawing.Size(16, 17) + Me.lblEquals.TabIndex = 33 + Me.lblEquals.Text = "=" + ' + 'lblSuccessIf + ' + Me.lblSuccessIf.AutoSize = True + Me.lblSuccessIf.Location = New System.Drawing.Point(4, 135) + Me.lblSuccessIf.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblSuccessIf.Name = "lblSuccessIf" + Me.lblSuccessIf.Size = New System.Drawing.Size(85, 17) + Me.lblSuccessIf.TabIndex = 19 + Me.lblSuccessIf.Text = "Success if X" + ' + 'lblHyp + ' + Me.lblHyp.AutoSize = True + Me.lblHyp.Location = New System.Drawing.Point(8, 49) + Me.lblHyp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblHyp.Name = "lblHyp" + Me.lblHyp.Size = New System.Drawing.Size(110, 17) + Me.lblHyp.TabIndex = 46 + Me.lblHyp.Text = "Null Hypothesis:" + ' + 'lblConfidenceLimit + ' + Me.lblConfidenceLimit.AutoSize = True + Me.lblConfidenceLimit.Location = New System.Drawing.Point(8, 16) + Me.lblConfidenceLimit.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblConfidenceLimit.Name = "lblConfidenceLimit" + Me.lblConfidenceLimit.Size = New System.Drawing.Size(116, 17) + Me.lblConfidenceLimit.TabIndex = 47 + Me.lblConfidenceLimit.Text = "Confidence Limit:" + ' + 'ucrPnlWilcoxVarTest + ' + Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(8, 14) + Me.ucrPnlWilcoxVarTest.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrPnlWilcoxVarTest.Name = "ucrPnlWilcoxVarTest" + Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(156, 59) + Me.ucrPnlWilcoxVarTest.TabIndex = 63 + ' + 'ucrPnlStats + ' + Me.ucrPnlStats.Location = New System.Drawing.Point(8, 12) + Me.ucrPnlStats.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrPnlStats.Name = "ucrPnlStats" + Me.ucrPnlStats.Size = New System.Drawing.Size(157, 78) + Me.ucrPnlStats.TabIndex = 63 + ' + 'ucrChkBinModify + ' + Me.ucrChkBinModify.Checked = False + Me.ucrChkBinModify.Location = New System.Drawing.Point(12, 94) + Me.ucrChkBinModify.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkBinModify.Name = "ucrChkBinModify" + Me.ucrChkBinModify.Size = New System.Drawing.Size(232, 25) + Me.ucrChkBinModify.TabIndex = 54 + ' + 'ucrNudBinomialConditions + ' + Me.ucrNudBinomialConditions.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudBinomialConditions.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(180, 128) + Me.ucrNudBinomialConditions.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudBinomialConditions.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudBinomialConditions.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudBinomialConditions.Name = "ucrNudBinomialConditions" + Me.ucrNudBinomialConditions.Size = New System.Drawing.Size(67, 25) + Me.ucrNudBinomialConditions.TabIndex = 50 + Me.ucrNudBinomialConditions.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrOperator + ' + Me.ucrOperator.AddQuotesIfUnrecognised = True + Me.ucrOperator.IsReadOnly = False + Me.ucrOperator.Location = New System.Drawing.Point(116, 128) + Me.ucrOperator.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) + Me.ucrOperator.Name = "ucrOperator" + Me.ucrOperator.Size = New System.Drawing.Size(59, 26) + Me.ucrOperator.TabIndex = 24 + ' + 'ucrVariables + ' + Me.ucrVariables.AddQuotesIfUnrecognised = True + Me.ucrVariables.IsReadOnly = False + Me.ucrVariables.Location = New System.Drawing.Point(120, 133) + Me.ucrVariables.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) + Me.ucrVariables.Name = "ucrVariables" + Me.ucrVariables.Size = New System.Drawing.Size(117, 26) + Me.ucrVariables.TabIndex = 32 + ' + 'ucrNudHyp + ' + Me.ucrNudHyp.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHyp.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHyp.Location = New System.Drawing.Point(135, 47) + Me.ucrNudHyp.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudHyp.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHyp.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHyp.Name = "ucrNudHyp" + Me.ucrNudHyp.Size = New System.Drawing.Size(67, 25) + Me.ucrNudHyp.TabIndex = 49 + Me.ucrNudHyp.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudCI + ' + Me.ucrNudCI.DecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0}) + Me.ucrNudCI.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudCI.Location = New System.Drawing.Point(133, 12) + Me.ucrNudCI.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudCI.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudCI.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudCI.Name = "ucrNudCI" + Me.ucrNudCI.Size = New System.Drawing.Size(67, 25) + Me.ucrNudCI.TabIndex = 48 + Me.ucrNudCI.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkIgnoreMissing + ' + Me.ucrChkIgnoreMissing.Checked = False + Me.ucrChkIgnoreMissing.Location = New System.Drawing.Point(332, 207) + Me.ucrChkIgnoreMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkIgnoreMissing.Name = "ucrChkIgnoreMissing" + Me.ucrChkIgnoreMissing.Size = New System.Drawing.Size(183, 25) + Me.ucrChkIgnoreMissing.TabIndex = 52 + ' + 'ucrNudTrim + ' + Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudTrim.Location = New System.Drawing.Point(372, 161) + Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudTrim.Name = "ucrNudTrim" + Me.ucrNudTrim.Size = New System.Drawing.Size(67, 25) + Me.ucrNudTrim.TabIndex = 50 + Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'ucrInputComboEstimate ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(88, 310) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboEstimate.TabIndex = 48 ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False - Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboTests.Location = New System.Drawing.Point(60, 310) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputComboTests.Name = "ucrInputComboTests" - Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboTests.TabIndex = 46 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(332, 116) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveModel.Location = New System.Drawing.Point(13, 352) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) + Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -220,54 +519,26 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 316) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Location = New System.Drawing.Point(13, 389) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' - 'ucrNudTrim - ' - Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(279, 131) - Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTrim.Name = "ucrNudTrim" - Me.ucrNudTrim.Size = New System.Drawing.Size(50, 20) - Me.ucrNudTrim.TabIndex = 50 - Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblTrim - ' - Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(246, 135) - Me.lblTrim.Name = "lblTrim" - Me.lblTrim.Size = New System.Drawing.Size(30, 13) - Me.lblTrim.TabIndex = 51 - Me.lblTrim.Text = "Trim:" - ' - 'ucrChkIgnoreMissing - ' - Me.ucrChkIgnoreMissing.Checked = False - Me.ucrChkIgnoreMissing.Location = New System.Drawing.Point(249, 168) - Me.ucrChkIgnoreMissing.Name = "ucrChkIgnoreMissing" - Me.ucrChkIgnoreMissing.Size = New System.Drawing.Size(137, 20) - Me.ucrChkIgnoreMissing.TabIndex = 52 - ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(426, 374) + Me.ClientSize = New System.Drawing.Size(568, 460) + Me.Controls.Add(Me.grpConditions) Me.Controls.Add(Me.ucrChkIgnoreMissing) Me.Controls.Add(Me.lblTrim) Me.Controls.Add(Me.ucrNudTrim) @@ -289,11 +560,18 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" + Me.grpConditions.ResumeLayout(False) + Me.grpConditions.PerformLayout() + Me.grpVarAndWilcoxSign.ResumeLayout(False) + Me.grpVarAndWilcoxSign.PerformLayout() + Me.grpVarAndWilcox.ResumeLayout(False) + Me.grpVarAndWilcox.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -320,4 +598,24 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudTrim As ucrNud Friend WithEvents lblTrim As Label Friend WithEvents ucrChkIgnoreMissing As ucrCheck + Friend WithEvents grpConditions As GroupBox + Friend WithEvents grpVarAndWilcoxSign As GroupBox + Friend WithEvents rdoWilcoxSignTest As RadioButton + Friend WithEvents rdoVarSignTest As RadioButton + Friend WithEvents ucrPnlWilcoxVarTest As UcrPanel + Friend WithEvents grpVarAndWilcox As GroupBox + Friend WithEvents rdoEnorm As RadioButton + Friend WithEvents rdoMeanWilcox As RadioButton + Friend WithEvents rdoVarSign As RadioButton + Friend WithEvents ucrPnlStats As UcrPanel + Friend WithEvents ucrChkBinModify As ucrCheck + Friend WithEvents lblEquals As Label + Friend WithEvents ucrNudBinomialConditions As ucrNud + Friend WithEvents ucrOperator As ucrInputComboBox + Friend WithEvents ucrVariables As ucrInputComboBox + Friend WithEvents lblSuccessIf As Label + Friend WithEvents lblHyp As Label + Friend WithEvents ucrNudHyp As ucrNud + Friend WithEvents lblConfidenceLimit As Label + Friend WithEvents ucrNudCI As ucrNud End Class \ No newline at end of file From dd5e5ea06ac464f555c267a58fb50a89e998be88 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:04:10 +0300 Subject: [PATCH 018/172] More changes --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 69d39eae0d2..eb170e1b930 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -96,6 +96,8 @@ Public Class dlgOneVarFitModel ucrChkIgnoreMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkIgnoreMissing.SetRDefault("FALSE") + ucrChkBinModify.SetText("Modify Conditions for 'Success'") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) From 91bee9c565da4a266cd74ecbd7d855727f79c137 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:06:09 +0300 Subject: [PATCH 019/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index eb170e1b930..70fc5383425 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,6 +82,11 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() + ucrPnlStats.AddRadioButton(rdoEnorm) + ucrPnlStats.AddRadioButton(rdoMeanWilcox) + ucrPnlStats.AddRadioButton(rdoVarSign) + + ucrNudTrim.SetParameter(New RParameter("trim", 1)) ucrNudTrim.Maximum = 0.5 ucrNudTrim.DecimalPlaces = 2 From b9e4bec8b1c81c72ff8ef521f8ff061fa5105285 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:06:38 +0300 Subject: [PATCH 020/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 70fc5383425..d54375bf5ce 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -86,6 +86,10 @@ Public Class dlgOneVarFitModel ucrPnlStats.AddRadioButton(rdoMeanWilcox) ucrPnlStats.AddRadioButton(rdoVarSign) + ucrPnlStats.AddFunctionNamesCondition(rdoEnorm, "enorm") + ucrPnlStats.AddFunctionNamesCondition(rdoMeanWilcox, "t.test") + ucrPnlStats.AddFunctionNamesCondition(rdoVarSign, "varTest") + ucrNudTrim.SetParameter(New RParameter("trim", 1)) ucrNudTrim.Maximum = 0.5 From 2b51374c5d99c739178a3405b0d1cc98ff69f390 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:07:15 +0300 Subject: [PATCH 021/172] Set the properties for the controls --- instat/dlgOneVarFitModel.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index d54375bf5ce..cab12c178b4 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -90,6 +90,12 @@ Public Class dlgOneVarFitModel ucrPnlStats.AddFunctionNamesCondition(rdoMeanWilcox, "t.test") ucrPnlStats.AddFunctionNamesCondition(rdoVarSign, "varTest") + ucrPnlWilcoxVarTest.AddRadioButton(rdoWilcoxSignTest) + ucrPnlWilcoxVarTest.AddRadioButton(rdoVarSignTest) + + ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoWilcoxSignTest, "wilcox.test") + ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoVarSignTest, "signmedian.test") + ucrNudTrim.SetParameter(New RParameter("trim", 1)) ucrNudTrim.Maximum = 0.5 From 4646ce850a766c7ec877a5717b740585e747e34c Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:11:40 +0300 Subject: [PATCH 022/172] Linking controls --- instat/dlgOneVarFitModel.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index cab12c178b4..33e8351876e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -121,6 +121,12 @@ Public Class dlgOneVarFitModel ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrPnlStats, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudCI, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrNudCI.SetLinkedDisplayControl(lblConfidenceLimit) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHyp, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrNudHyp.SetLinkedDisplayControl(lblHyp) + ucrPnlStats.SetLinkedDisplayControl(grpConditions) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) End Sub From 55f10e3f210ad7bb84b537c12bfbeca1b91c6d25 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:15:20 +0300 Subject: [PATCH 023/172] Setting the properties for the controls --- instat/dlgOneVarFitModel.vb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 33e8351876e..b10da9bbe50 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -106,6 +106,14 @@ Public Class dlgOneVarFitModel ucrNudCI.SetParameter(New RParameter("mu")) + ucrNudCI.Increment = 0.05 + ucrNudCI.DecimalPlaces = 2 + ucrNudCI.SetMinMax(0, 1) + + ucrNudHyp.Increment = 1 + ucrNudHyp.DecimalPlaces = 2 + ucrNudHyp.SetMinMax(0.00, Integer.MaxValue) + ucrChkIgnoreMissing.SetParameter(New RParameter("na.rm", 1)) ucrChkIgnoreMissing.SetText("Ignore Missing") ucrChkIgnoreMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") From 0281ac1e04f10688fab4361d873755dd25d1b276 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:25:27 +0300 Subject: [PATCH 024/172] More changes to the dialog --- instat/dlgOneVarFitModel2.Designer.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index df44086bf73..9059647b1da 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -372,7 +372,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudBinomialConditions.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudBinomialConditions.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(180, 128) + Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(180, 126) Me.ucrNudBinomialConditions.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudBinomialConditions.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudBinomialConditions.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) From 785c0958e0dbd7c0972ca0b86764447963ae7c69 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 2 Jul 2020 16:27:37 +0300 Subject: [PATCH 025/172] Minor designer change --- instat/dlgOneVarFitModel2.Designer.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 9059647b1da..e32a95df197 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -209,7 +209,7 @@ Partial Class dlgOneVarFitModel Me.grpConditions.Margin = New System.Windows.Forms.Padding(4) Me.grpConditions.Name = "grpConditions" Me.grpConditions.Padding = New System.Windows.Forms.Padding(4) - Me.grpConditions.Size = New System.Drawing.Size(261, 162) + Me.grpConditions.Size = New System.Drawing.Size(261, 171) Me.grpConditions.TabIndex = 53 Me.grpConditions.TabStop = False Me.grpConditions.Text = "Conditions" From 9233cdf9167d356b6315b0ecdd85a6886098f60f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Sat, 4 Jul 2020 15:34:16 +0300 Subject: [PATCH 026/172] Added a function for Bartel test --- instat/dlgOneVarFitModel.vb | 43 +-- instat/dlgOneVarFitModel2.Designer.vb | 398 ++++---------------------- 2 files changed, 57 insertions(+), 384 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b10da9bbe50..17dd9b127bb 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -18,7 +18,7 @@ Imports instat.Translations Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction - Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction As New RFunction + Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True @@ -82,19 +82,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() - ucrPnlStats.AddRadioButton(rdoEnorm) - ucrPnlStats.AddRadioButton(rdoMeanWilcox) - ucrPnlStats.AddRadioButton(rdoVarSign) - ucrPnlStats.AddFunctionNamesCondition(rdoEnorm, "enorm") - ucrPnlStats.AddFunctionNamesCondition(rdoMeanWilcox, "t.test") - ucrPnlStats.AddFunctionNamesCondition(rdoVarSign, "varTest") - - ucrPnlWilcoxVarTest.AddRadioButton(rdoWilcoxSignTest) - ucrPnlWilcoxVarTest.AddRadioButton(rdoVarSignTest) - - ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoWilcoxSignTest, "wilcox.test") - ucrPnlWilcoxVarTest.AddFunctionNamesCondition(rdoVarSignTest, "signmedian.test") ucrNudTrim.SetParameter(New RParameter("trim", 1)) @@ -102,24 +90,6 @@ Public Class dlgOneVarFitModel ucrNudTrim.DecimalPlaces = 2 ucrNudTrim.Increment = 0.01 - ucrNudHyp.SetParameter(New RParameter("mu")) - - ucrNudCI.SetParameter(New RParameter("mu")) - - ucrNudCI.Increment = 0.05 - ucrNudCI.DecimalPlaces = 2 - ucrNudCI.SetMinMax(0, 1) - - ucrNudHyp.Increment = 1 - ucrNudHyp.DecimalPlaces = 2 - ucrNudHyp.SetMinMax(0.00, Integer.MaxValue) - - ucrChkIgnoreMissing.SetParameter(New RParameter("na.rm", 1)) - ucrChkIgnoreMissing.SetText("Ignore Missing") - ucrChkIgnoreMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkIgnoreMissing.SetRDefault("FALSE") - - ucrChkBinModify.SetText("Modify Conditions for 'Success'") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -129,12 +99,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrPnlStats, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudCI, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrNudCI.SetLinkedDisplayControl(lblConfidenceLimit) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHyp, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrNudHyp.SetLinkedDisplayControl(lblHyp) - ucrPnlStats.SetLinkedDisplayControl(grpConditions) + lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) End Sub @@ -163,6 +128,7 @@ Public Class dlgOneVarFitModel clsTtestFunction = New RFunction clsWilcoxonFunction = New RFunction clsZTestFunction = New RFunction + clsBartelFunction = New RFunction clsMeanCIFunction = New RFunction clsMedianCIFunction = New RFunction @@ -306,6 +272,7 @@ Public Class dlgOneVarFitModel ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) @@ -458,6 +425,8 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) Case "Z" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) + Case "Bartel" + ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index e32a95df197..d305512c98c 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -47,26 +47,6 @@ Partial Class dlgOneVarFitModel Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() Me.lblTrim = New System.Windows.Forms.Label() - Me.grpConditions = New System.Windows.Forms.GroupBox() - Me.grpVarAndWilcoxSign = New System.Windows.Forms.GroupBox() - Me.rdoWilcoxSignTest = New System.Windows.Forms.RadioButton() - Me.rdoVarSignTest = New System.Windows.Forms.RadioButton() - Me.grpVarAndWilcox = New System.Windows.Forms.GroupBox() - Me.rdoEnorm = New System.Windows.Forms.RadioButton() - Me.rdoMeanWilcox = New System.Windows.Forms.RadioButton() - Me.rdoVarSign = New System.Windows.Forms.RadioButton() - Me.lblEquals = New System.Windows.Forms.Label() - Me.lblSuccessIf = New System.Windows.Forms.Label() - Me.lblHyp = New System.Windows.Forms.Label() - Me.lblConfidenceLimit = New System.Windows.Forms.Label() - Me.ucrPnlWilcoxVarTest = New instat.UcrPanel() - Me.ucrPnlStats = New instat.UcrPanel() - Me.ucrChkBinModify = New instat.ucrCheck() - Me.ucrNudBinomialConditions = New instat.ucrNud() - Me.ucrOperator = New instat.ucrInputComboBox() - Me.ucrVariables = New instat.ucrInputComboBox() - Me.ucrNudHyp = New instat.ucrNud() - Me.ucrNudCI = New instat.ucrNud() Me.ucrChkIgnoreMissing = New instat.ucrCheck() Me.ucrNudTrim = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() @@ -78,18 +58,14 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.grpConditions.SuspendLayout() - Me.grpVarAndWilcoxSign.SuspendLayout() - Me.grpVarAndWilcox.SuspendLayout() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(332, 58) - Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.LblVariable.Location = New System.Drawing.Point(249, 47) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(64, 17) + Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' @@ -100,10 +76,9 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(205, 14) - Me.rdoTest.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoTest.Location = New System.Drawing.Point(154, 11) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(163, 34) + Me.rdoTest.Size = New System.Drawing.Size(122, 28) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -116,10 +91,9 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) - Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) + Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -127,20 +101,18 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 352) - Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 286) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 321) - Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 261) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -152,10 +124,9 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) - Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) + Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -164,288 +135,49 @@ Partial Class dlgOneVarFitModel 'lblTests ' Me.lblTests.AutoSize = True - Me.lblTests.Location = New System.Drawing.Point(16, 315) - Me.lblTests.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTests.Location = New System.Drawing.Point(12, 256) Me.lblTests.Name = "lblTests" - Me.lblTests.Size = New System.Drawing.Size(40, 17) + Me.lblTests.Size = New System.Drawing.Size(31, 13) Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(16, 315) - Me.lblEstimate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEstimate.Location = New System.Drawing.Point(12, 256) Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(66, 17) + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(328, 166) - Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTrim.Location = New System.Drawing.Point(246, 135) Me.lblTrim.Name = "lblTrim" - Me.lblTrim.Size = New System.Drawing.Size(40, 17) + Me.lblTrim.Size = New System.Drawing.Size(30, 13) Me.lblTrim.TabIndex = 51 Me.lblTrim.Text = "Trim:" ' - 'grpConditions - ' - Me.grpConditions.Controls.Add(Me.grpVarAndWilcoxSign) - Me.grpConditions.Controls.Add(Me.grpVarAndWilcox) - Me.grpConditions.Controls.Add(Me.ucrChkBinModify) - Me.grpConditions.Controls.Add(Me.lblEquals) - Me.grpConditions.Controls.Add(Me.ucrNudBinomialConditions) - Me.grpConditions.Controls.Add(Me.ucrOperator) - Me.grpConditions.Controls.Add(Me.ucrVariables) - Me.grpConditions.Controls.Add(Me.lblSuccessIf) - Me.grpConditions.Controls.Add(Me.lblHyp) - Me.grpConditions.Controls.Add(Me.ucrNudHyp) - Me.grpConditions.Controls.Add(Me.lblConfidenceLimit) - Me.grpConditions.Controls.Add(Me.ucrNudCI) - Me.grpConditions.Location = New System.Drawing.Point(299, 108) - Me.grpConditions.Margin = New System.Windows.Forms.Padding(4) - Me.grpConditions.Name = "grpConditions" - Me.grpConditions.Padding = New System.Windows.Forms.Padding(4) - Me.grpConditions.Size = New System.Drawing.Size(261, 171) - Me.grpConditions.TabIndex = 53 - Me.grpConditions.TabStop = False - Me.grpConditions.Text = "Conditions" - ' - 'grpVarAndWilcoxSign - ' - Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoWilcoxSignTest) - Me.grpVarAndWilcoxSign.Controls.Add(Me.rdoVarSignTest) - Me.grpVarAndWilcoxSign.Controls.Add(Me.ucrPnlWilcoxVarTest) - Me.grpVarAndWilcoxSign.Location = New System.Drawing.Point(7, 79) - Me.grpVarAndWilcoxSign.Margin = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcoxSign.Name = "grpVarAndWilcoxSign" - Me.grpVarAndWilcoxSign.Padding = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcoxSign.Size = New System.Drawing.Size(169, 87) - Me.grpVarAndWilcoxSign.TabIndex = 62 - Me.grpVarAndWilcoxSign.TabStop = False - ' - 'rdoWilcoxSignTest - ' - Me.rdoWilcoxSignTest.AutoSize = True - Me.rdoWilcoxSignTest.Location = New System.Drawing.Point(11, 16) - Me.rdoWilcoxSignTest.Margin = New System.Windows.Forms.Padding(4) - Me.rdoWilcoxSignTest.Name = "rdoWilcoxSignTest" - Me.rdoWilcoxSignTest.Size = New System.Drawing.Size(125, 21) - Me.rdoWilcoxSignTest.TabIndex = 65 - Me.rdoWilcoxSignTest.TabStop = True - Me.rdoWilcoxSignTest.Text = "Compare Mean" - Me.rdoWilcoxSignTest.TextAlign = System.Drawing.ContentAlignment.TopLeft - Me.rdoWilcoxSignTest.UseVisualStyleBackColor = True - ' - 'rdoVarSignTest - ' - Me.rdoVarSignTest.AutoSize = True - Me.rdoVarSignTest.Location = New System.Drawing.Point(11, 44) - Me.rdoVarSignTest.Margin = New System.Windows.Forms.Padding(4) - Me.rdoVarSignTest.Name = "rdoVarSignTest" - Me.rdoVarSignTest.Size = New System.Drawing.Size(141, 21) - Me.rdoVarSignTest.TabIndex = 64 - Me.rdoVarSignTest.TabStop = True - Me.rdoVarSignTest.Text = "Compare Vaiance" - Me.rdoVarSignTest.UseVisualStyleBackColor = True - ' - 'grpVarAndWilcox - ' - Me.grpVarAndWilcox.Controls.Add(Me.rdoEnorm) - Me.grpVarAndWilcox.Controls.Add(Me.rdoMeanWilcox) - Me.grpVarAndWilcox.Controls.Add(Me.rdoVarSign) - Me.grpVarAndWilcox.Controls.Add(Me.ucrPnlStats) - Me.grpVarAndWilcox.Location = New System.Drawing.Point(9, 74) - Me.grpVarAndWilcox.Margin = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcox.Name = "grpVarAndWilcox" - Me.grpVarAndWilcox.Padding = New System.Windows.Forms.Padding(4) - Me.grpVarAndWilcox.Size = New System.Drawing.Size(173, 92) - Me.grpVarAndWilcox.TabIndex = 55 - Me.grpVarAndWilcox.TabStop = False - ' - 'rdoEnorm - ' - Me.rdoEnorm.AutoSize = True - Me.rdoEnorm.Location = New System.Drawing.Point(13, 62) - Me.rdoEnorm.Margin = New System.Windows.Forms.Padding(4) - Me.rdoEnorm.Name = "rdoEnorm" - Me.rdoEnorm.Size = New System.Drawing.Size(69, 21) - Me.rdoEnorm.TabIndex = 65 - Me.rdoEnorm.TabStop = True - Me.rdoEnorm.Text = "enorm" - Me.rdoEnorm.UseVisualStyleBackColor = True - ' - 'rdoMeanWilcox - ' - Me.rdoMeanWilcox.AutoSize = True - Me.rdoMeanWilcox.Location = New System.Drawing.Point(13, 15) - Me.rdoMeanWilcox.Margin = New System.Windows.Forms.Padding(4) - Me.rdoMeanWilcox.Name = "rdoMeanWilcox" - Me.rdoMeanWilcox.Size = New System.Drawing.Size(125, 21) - Me.rdoMeanWilcox.TabIndex = 66 - Me.rdoMeanWilcox.TabStop = True - Me.rdoMeanWilcox.Text = "Compare Mean" - Me.rdoMeanWilcox.TextAlign = System.Drawing.ContentAlignment.TopLeft - Me.rdoMeanWilcox.UseVisualStyleBackColor = True - ' - 'rdoVarSign - ' - Me.rdoVarSign.AutoSize = True - Me.rdoVarSign.Location = New System.Drawing.Point(13, 38) - Me.rdoVarSign.Margin = New System.Windows.Forms.Padding(4) - Me.rdoVarSign.Name = "rdoVarSign" - Me.rdoVarSign.Size = New System.Drawing.Size(146, 21) - Me.rdoVarSign.TabIndex = 64 - Me.rdoVarSign.TabStop = True - Me.rdoVarSign.Text = "Compare Variance" - Me.rdoVarSign.UseVisualStyleBackColor = True - ' - 'lblEquals - ' - Me.lblEquals.AutoSize = True - Me.lblEquals.Location = New System.Drawing.Point(95, 133) - Me.lblEquals.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblEquals.Name = "lblEquals" - Me.lblEquals.Size = New System.Drawing.Size(16, 17) - Me.lblEquals.TabIndex = 33 - Me.lblEquals.Text = "=" - ' - 'lblSuccessIf - ' - Me.lblSuccessIf.AutoSize = True - Me.lblSuccessIf.Location = New System.Drawing.Point(4, 135) - Me.lblSuccessIf.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblSuccessIf.Name = "lblSuccessIf" - Me.lblSuccessIf.Size = New System.Drawing.Size(85, 17) - Me.lblSuccessIf.TabIndex = 19 - Me.lblSuccessIf.Text = "Success if X" - ' - 'lblHyp - ' - Me.lblHyp.AutoSize = True - Me.lblHyp.Location = New System.Drawing.Point(8, 49) - Me.lblHyp.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblHyp.Name = "lblHyp" - Me.lblHyp.Size = New System.Drawing.Size(110, 17) - Me.lblHyp.TabIndex = 46 - Me.lblHyp.Text = "Null Hypothesis:" - ' - 'lblConfidenceLimit - ' - Me.lblConfidenceLimit.AutoSize = True - Me.lblConfidenceLimit.Location = New System.Drawing.Point(8, 16) - Me.lblConfidenceLimit.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblConfidenceLimit.Name = "lblConfidenceLimit" - Me.lblConfidenceLimit.Size = New System.Drawing.Size(116, 17) - Me.lblConfidenceLimit.TabIndex = 47 - Me.lblConfidenceLimit.Text = "Confidence Limit:" - ' - 'ucrPnlWilcoxVarTest - ' - Me.ucrPnlWilcoxVarTest.Location = New System.Drawing.Point(8, 14) - Me.ucrPnlWilcoxVarTest.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrPnlWilcoxVarTest.Name = "ucrPnlWilcoxVarTest" - Me.ucrPnlWilcoxVarTest.Size = New System.Drawing.Size(156, 59) - Me.ucrPnlWilcoxVarTest.TabIndex = 63 - ' - 'ucrPnlStats - ' - Me.ucrPnlStats.Location = New System.Drawing.Point(8, 12) - Me.ucrPnlStats.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrPnlStats.Name = "ucrPnlStats" - Me.ucrPnlStats.Size = New System.Drawing.Size(157, 78) - Me.ucrPnlStats.TabIndex = 63 - ' - 'ucrChkBinModify - ' - Me.ucrChkBinModify.Checked = False - Me.ucrChkBinModify.Location = New System.Drawing.Point(12, 94) - Me.ucrChkBinModify.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrChkBinModify.Name = "ucrChkBinModify" - Me.ucrChkBinModify.Size = New System.Drawing.Size(232, 25) - Me.ucrChkBinModify.TabIndex = 54 - ' - 'ucrNudBinomialConditions - ' - Me.ucrNudBinomialConditions.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudBinomialConditions.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudBinomialConditions.Location = New System.Drawing.Point(180, 126) - Me.ucrNudBinomialConditions.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudBinomialConditions.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudBinomialConditions.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudBinomialConditions.Name = "ucrNudBinomialConditions" - Me.ucrNudBinomialConditions.Size = New System.Drawing.Size(67, 25) - Me.ucrNudBinomialConditions.TabIndex = 50 - Me.ucrNudBinomialConditions.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrOperator - ' - Me.ucrOperator.AddQuotesIfUnrecognised = True - Me.ucrOperator.IsReadOnly = False - Me.ucrOperator.Location = New System.Drawing.Point(116, 128) - Me.ucrOperator.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) - Me.ucrOperator.Name = "ucrOperator" - Me.ucrOperator.Size = New System.Drawing.Size(59, 26) - Me.ucrOperator.TabIndex = 24 - ' - 'ucrVariables - ' - Me.ucrVariables.AddQuotesIfUnrecognised = True - Me.ucrVariables.IsReadOnly = False - Me.ucrVariables.Location = New System.Drawing.Point(120, 133) - Me.ucrVariables.Margin = New System.Windows.Forms.Padding(9, 7, 9, 7) - Me.ucrVariables.Name = "ucrVariables" - Me.ucrVariables.Size = New System.Drawing.Size(117, 26) - Me.ucrVariables.TabIndex = 32 - ' - 'ucrNudHyp - ' - Me.ucrNudHyp.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHyp.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHyp.Location = New System.Drawing.Point(135, 47) - Me.ucrNudHyp.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudHyp.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudHyp.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHyp.Name = "ucrNudHyp" - Me.ucrNudHyp.Size = New System.Drawing.Size(67, 25) - Me.ucrNudHyp.TabIndex = 49 - Me.ucrNudHyp.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudCI - ' - Me.ucrNudCI.DecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0}) - Me.ucrNudCI.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudCI.Location = New System.Drawing.Point(133, 12) - Me.ucrNudCI.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudCI.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudCI.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudCI.Name = "ucrNudCI" - Me.ucrNudCI.Size = New System.Drawing.Size(67, 25) - Me.ucrNudCI.TabIndex = 48 - Me.ucrNudCI.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrChkIgnoreMissing ' Me.ucrChkIgnoreMissing.Checked = False - Me.ucrChkIgnoreMissing.Location = New System.Drawing.Point(332, 207) - Me.ucrChkIgnoreMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkIgnoreMissing.Location = New System.Drawing.Point(346, 131) + Me.ucrChkIgnoreMissing.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrChkIgnoreMissing.Name = "ucrChkIgnoreMissing" - Me.ucrChkIgnoreMissing.Size = New System.Drawing.Size(183, 25) + Me.ucrChkIgnoreMissing.Size = New System.Drawing.Size(137, 20) Me.ucrChkIgnoreMissing.TabIndex = 52 ' 'ucrNudTrim ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(372, 161) - Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudTrim.Location = New System.Drawing.Point(279, 131) + Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Name = "ucrNudTrim" - Me.ucrNudTrim.Size = New System.Drawing.Size(67, 25) + Me.ucrNudTrim.Size = New System.Drawing.Size(50, 20) Me.ucrNudTrim.TabIndex = 50 Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -453,63 +185,63 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(88, 310) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboEstimate.TabIndex = 48 ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False - Me.ucrInputComboTests.Location = New System.Drawing.Point(60, 310) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputComboTests.Name = "ucrInputComboTests" - Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) + Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboTests.TabIndex = 46 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(332, 116) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(13, 352) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) + Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -519,26 +251,25 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(13, 389) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) + Me.ucrBase.Location = New System.Drawing.Point(10, 316) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(547, 64) + Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(568, 460) - Me.Controls.Add(Me.grpConditions) + Me.ClientSize = New System.Drawing.Size(497, 374) Me.Controls.Add(Me.ucrChkIgnoreMissing) Me.Controls.Add(Me.lblTrim) Me.Controls.Add(Me.ucrNudTrim) @@ -560,18 +291,11 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" - Me.grpConditions.ResumeLayout(False) - Me.grpConditions.PerformLayout() - Me.grpVarAndWilcoxSign.ResumeLayout(False) - Me.grpVarAndWilcoxSign.PerformLayout() - Me.grpVarAndWilcox.ResumeLayout(False) - Me.grpVarAndWilcox.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -598,24 +322,4 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudTrim As ucrNud Friend WithEvents lblTrim As Label Friend WithEvents ucrChkIgnoreMissing As ucrCheck - Friend WithEvents grpConditions As GroupBox - Friend WithEvents grpVarAndWilcoxSign As GroupBox - Friend WithEvents rdoWilcoxSignTest As RadioButton - Friend WithEvents rdoVarSignTest As RadioButton - Friend WithEvents ucrPnlWilcoxVarTest As UcrPanel - Friend WithEvents grpVarAndWilcox As GroupBox - Friend WithEvents rdoEnorm As RadioButton - Friend WithEvents rdoMeanWilcox As RadioButton - Friend WithEvents rdoVarSign As RadioButton - Friend WithEvents ucrPnlStats As UcrPanel - Friend WithEvents ucrChkBinModify As ucrCheck - Friend WithEvents lblEquals As Label - Friend WithEvents ucrNudBinomialConditions As ucrNud - Friend WithEvents ucrOperator As ucrInputComboBox - Friend WithEvents ucrVariables As ucrInputComboBox - Friend WithEvents lblSuccessIf As Label - Friend WithEvents lblHyp As Label - Friend WithEvents ucrNudHyp As ucrNud - Friend WithEvents lblConfidenceLimit As Label - Friend WithEvents ucrNudCI As ucrNud End Class \ No newline at end of file From 359753a5d1f0457ad8351d85ea1c305713f52180 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Sat, 4 Jul 2020 15:53:44 +0300 Subject: [PATCH 027/172] more functions --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 17dd9b127bb..38032bec132 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -223,6 +223,9 @@ Public Class dlgOneVarFitModel clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") + clsBartelFunction.SetPackageName("DescTools") + clsBartelFunction.SetRCommand("BartelsRankTest") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") @@ -271,6 +274,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=13) ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From d21cc0c8f5ca885d1f21fe74c6521e7ed2a96dbe Mon Sep 17 00:00:00 2001 From: Wycklife Date: Sat, 4 Jul 2020 18:26:24 +0300 Subject: [PATCH 028/172] Added Bartel test --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 38032bec132..7e01d2d7d98 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -76,7 +76,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveModel.SetPrefix("Normal") - ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}) + ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) From d538e33643913458829619b57b42e0003223bc77 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Sat, 4 Jul 2020 18:30:41 +0300 Subject: [PATCH 029/172] Added Br function for Br test --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7e01d2d7d98..35c47c85570 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -431,6 +431,8 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) + Case "Br" + ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) From 8b3be1b9c65bffa4d875b99fb5ea771ea9bca50c Mon Sep 17 00:00:00 2001 From: Wycklife Date: Sat, 4 Jul 2020 18:34:28 +0300 Subject: [PATCH 030/172] Added a Br test --- instat/dlgOneVarFitModel.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 35c47c85570..6b78a1986a2 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -18,7 +18,7 @@ Imports instat.Translations Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction - Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction As New RFunction + Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True @@ -76,7 +76,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveModel.SetPrefix("Normal") - ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel"}) + ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) @@ -275,6 +275,7 @@ Public Class dlgOneVarFitModel ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter()) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 8dd8b7a55c39ded78c98f2d544f5f8ae223010d7 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Sat, 4 Jul 2020 18:46:38 +0300 Subject: [PATCH 031/172] Added Br test --- instat/dlgOneVarFitModel.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 6b78a1986a2..8f48567507b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -129,6 +129,7 @@ Public Class dlgOneVarFitModel clsWilcoxonFunction = New RFunction clsZTestFunction = New RFunction clsBartelFunction = New RFunction + clsBrFunction = New RFunction clsMeanCIFunction = New RFunction clsMedianCIFunction = New RFunction @@ -220,12 +221,16 @@ Public Class dlgOneVarFitModel clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") + clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") clsBartelFunction.SetPackageName("DescTools") clsBartelFunction.SetRCommand("BartelsRankTest") + clsBrFunction.SetPackageName("trend") + clsBrFunction.SetRCommand("br.test") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") @@ -275,7 +280,7 @@ Public Class dlgOneVarFitModel ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter()) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From b6fc1d2d026d8f5fd9e8155192630f39e65fe69f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 10:49:43 +0300 Subject: [PATCH 032/172] Added more tests --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8f48567507b..0c5168906cf 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -76,7 +76,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveModel.SetPrefix("Normal") - ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br"}) + ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br", "Runs", "Sen", "Serial Corr", "Snh", ""}) ucrInputComboTests.SetDropDownStyleAsNonEditable() ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) From 3e61ebf0d68e20fa997acdc4fa10ea3513b6329d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 10:52:29 +0300 Subject: [PATCH 033/172] Added more tests --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0c5168906cf..ab890aff637 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -76,7 +76,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetAssignToIfUncheckedValue("last_model") ucrSaveModel.SetPrefix("Normal") - ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br", "Runs", "Sen", "Serial Corr", "Snh", ""}) + ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br", "Runs", "Sen", "Serial Corr", "Snh", "Ad", "Cvm", "Lillie", "Pearson", "Sf"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) From fa3bbdbb4f3c005710a239cf1f732e82ce5c8d18 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 10:54:55 +0300 Subject: [PATCH 034/172] Creating tests functions --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ab890aff637..d34c44db8b2 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -18,7 +18,7 @@ Imports instat.Translations Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction - Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction As New RFunction + Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRuns, clsSen, clsSerialCorr, clsSnh, clsAd, clsCvm, clsLillie, clsPearson, clsSf As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True From 1fa8366e550de23e40a1bea2d7440ef27c94fb9d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:04:00 +0300 Subject: [PATCH 035/172] Creating the base functions for the tests functions --- instat/dlgOneVarFitModel.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index d34c44db8b2..a747e7f024d 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -439,6 +439,11 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) Case "Br" ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) + Case "Runs" + ucrBase.clsRsyntax.SetBaseRFunction(clsRuns) + Case "Sen" + ucrBase.clsRsyntax.SetBaseRFunction(clsSen) + End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) From 3163c4ab18fa37be37099c4d1c4512bd4b0bee45 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:07:59 +0300 Subject: [PATCH 036/172] Added tests function to the base function --- instat/dlgOneVarFitModel.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a747e7f024d..0dce3f4075b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -443,7 +443,10 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsRuns) Case "Sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSen) - + Case "Serial Corr" + ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorr) + Case "Snh" + ucrBase.clsRsyntax.SetBaseRFunction(clsSnh) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) From 1e203a129f96cc561f9d926cb14f3b4aeb06a85b Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:11:00 +0300 Subject: [PATCH 037/172] More tests funtions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0dce3f4075b..e54fa79141b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -447,6 +447,9 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorr) Case "Snh" ucrBase.clsRsyntax.SetBaseRFunction(clsSnh) + Case "Ad" + ucrBase.clsRsyntax.SetBaseRFunction(clsAd) + End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) From f0d41d35cd62b135adbb230d8976505d6483a9b9 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:15:49 +0300 Subject: [PATCH 038/172] Added more tests functions --- instat/dlgOneVarFitModel.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index e54fa79141b..ced04683073 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -449,7 +449,10 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsSnh) Case "Ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAd) - + Case "Cvm" + ucrBase.clsRsyntax.SetBaseRFunction(clsLillie) + Case "Pearson" + ucrBase.clsRsyntax.SetBaseRFunction(clsPearson) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) From 0de70be83d0a355f7fb4a25cb46f56456884ad29 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:17:15 +0300 Subject: [PATCH 039/172] Added more functions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ced04683073..a47b2b25ea8 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -453,6 +453,9 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsLillie) Case "Pearson" ucrBase.clsRsyntax.SetBaseRFunction(clsPearson) + Case "Sf" + ucrBase.clsRsyntax.SetBaseRFunction(clsSf) + End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) From f75de461870ee4e9f78e61b8a2e3ac83065c7088 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:28:11 +0300 Subject: [PATCH 040/172] Setting Rcommand for the tests function --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a47b2b25ea8..8e50507ad3b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -231,6 +231,9 @@ Public Class dlgOneVarFitModel clsBrFunction.SetPackageName("trend") clsBrFunction.SetRCommand("br.test") + clsRuns.SetPackageName("DescTools") + clsRuns.SetRCommand("RunsTest") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") From 7dd462098352633d000283d9a8e4405872557c8f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:35:07 +0300 Subject: [PATCH 041/172] More Addition of functions --- instat/dlgOneVarFitModel.vb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8e50507ad3b..ebb30ae00eb 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -18,7 +18,7 @@ Imports instat.Translations Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction - Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRuns, clsSen, clsSerialCorr, clsSnh, clsAd, clsCvm, clsLillie, clsPearson, clsSf As New RFunction + Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRunsFunction, clsSenFunction, clsSerialCorrFunction, clsSnhFunction, clsAdFunction, clsCvmFunction, clsLillieFunction, clsPearsonFunction, clsSfFunction As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True @@ -130,6 +130,7 @@ Public Class dlgOneVarFitModel clsZTestFunction = New RFunction clsBartelFunction = New RFunction clsBrFunction = New RFunction + clsRunsFunction = New RFunction clsMeanCIFunction = New RFunction clsMedianCIFunction = New RFunction @@ -231,8 +232,8 @@ Public Class dlgOneVarFitModel clsBrFunction.SetPackageName("trend") clsBrFunction.SetRCommand("br.test") - clsRuns.SetPackageName("DescTools") - clsRuns.SetRCommand("RunsTest") + clsRunsFunction.SetPackageName("DescTools") + clsRunsFunction.SetRCommand("RunsTest") 'Estimate clsMeanCIFunction.SetPackageName("DescTools") @@ -443,21 +444,21 @@ Public Class dlgOneVarFitModel Case "Br" ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) Case "Runs" - ucrBase.clsRsyntax.SetBaseRFunction(clsRuns) + ucrBase.clsRsyntax.SetBaseRFunction(clsRunsFunction) Case "Sen" - ucrBase.clsRsyntax.SetBaseRFunction(clsSen) + ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "Serial Corr" - ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorr) + ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "Snh" - ucrBase.clsRsyntax.SetBaseRFunction(clsSnh) + ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "Ad" - ucrBase.clsRsyntax.SetBaseRFunction(clsAd) + ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "Cvm" - ucrBase.clsRsyntax.SetBaseRFunction(clsLillie) + ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "Pearson" - ucrBase.clsRsyntax.SetBaseRFunction(clsPearson) + ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "Sf" - ucrBase.clsRsyntax.SetBaseRFunction(clsSf) + ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) End Select ElseIf rdoEstimate.Checked Then From dfe587bf851f5cfe0d32a2bae94c7a1bb5273efa Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:39:57 +0300 Subject: [PATCH 042/172] More addition of functions --- instat/dlgOneVarFitModel.vb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ebb30ae00eb..30e3f76400d 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -131,6 +131,15 @@ Public Class dlgOneVarFitModel clsBartelFunction = New RFunction clsBrFunction = New RFunction clsRunsFunction = New RFunction + clsSenFunction = New RFunction + clsSerialCorrFunction = New RFunction + clsSnhFunction = New RFunction + clsAdFunction = New RFunction + clsCvmFunction = New RFunction + clsLillieFunction = New RFunction + clsPearsonFunction = New RFunction + clsSfFunction = New RFunction + clsMeanCIFunction = New RFunction clsMedianCIFunction = New RFunction From 30b6060573c04c46d3030747d29146ffd39dac5c Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:48:30 +0300 Subject: [PATCH 043/172] More additional Rcommand and Rpackge settings --- instat/dlgOneVarFitModel.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 30e3f76400d..0c8bfb0d75d 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -244,6 +244,12 @@ Public Class dlgOneVarFitModel clsRunsFunction.SetPackageName("DescTools") clsRunsFunction.SetRCommand("RunsTest") + clsSenFunction.SetPackageName("trend") + clsSenFunction.SetRCommand("sens.slope") + + clsSerialCorrFunction.SetPackageName("EnvStats") + clsSerialCorrFunction.SetRCommand("serialCorrelationTest") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") From ef7af6df350e1092e8f113fd1409912088c6abaa Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 11:50:37 +0300 Subject: [PATCH 044/172] Setting package Name and Rcommand for tests functions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0c8bfb0d75d..82ff63fcfb0 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -250,6 +250,9 @@ Public Class dlgOneVarFitModel clsSerialCorrFunction.SetPackageName("EnvStats") clsSerialCorrFunction.SetRCommand("serialCorrelationTest") + clsSnhFunction.SetPackageName("trend") + clsSnhFunction.SetRCommand("snh.test") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") From 04180b0929a4b8fd3123615d6cdd2a4a4343e2f6 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:02:07 +0300 Subject: [PATCH 045/172] Setting Package Name and R command for the tests functions --- instat/dlgOneVarFitModel.vb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 82ff63fcfb0..97cdf3a55ce 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -253,6 +253,15 @@ Public Class dlgOneVarFitModel clsSnhFunction.SetPackageName("trend") clsSnhFunction.SetRCommand("snh.test") + clsAdFunction.SetPackageName("nortest") + clsAdFunction.SetRCommand("ad.test") + + clsCvmFunction.SetPackageName("nortest") + clsCvmFunction.SetRCommand("cvm.test") + + clsLillieFunction.SetPackageName("nortest") + clsLillieFunction.SetRCommand("lillie.test") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") From 9968b8195346b7c0195ede7ba24cf2ef127c658d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:03:41 +0300 Subject: [PATCH 046/172] Setting Package name and R command for the tests functions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 97cdf3a55ce..90a208c10df 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -262,6 +262,9 @@ Public Class dlgOneVarFitModel clsLillieFunction.SetPackageName("nortest") clsLillieFunction.SetRCommand("lillie.test") + clsPearsonFunction.SetPackageName("nortest") + clsPearsonFunction.SetRCommand("pearson.test") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") From 1cc436ac248b7d49964e9f0f825fdf0b82b02881 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:05:26 +0300 Subject: [PATCH 047/172] Set Package name and Rcommand for the tests functions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 90a208c10df..804d264b14b 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -265,6 +265,9 @@ Public Class dlgOneVarFitModel clsPearsonFunction.SetPackageName("nortest") clsPearsonFunction.SetRCommand("pearson.test") + clsSfFunction.SetPackageName("nortest") + clsSfFunction.SetRCommand("sf.test") + 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") From 36a7f7411541b63c261c07b6a165c7454bbf0d18 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:09:40 +0300 Subject: [PATCH 048/172] Passing Parameters to the tests functions --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 804d264b14b..4f472de40f6 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -318,6 +318,7 @@ Public Class dlgOneVarFitModel ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=16) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From d845583ef97db195384564764d9b03edf1ffd06d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:12:23 +0300 Subject: [PATCH 049/172] Passing parameters to tests functions --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4f472de40f6..1b58a6946ad 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -319,6 +319,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=16) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("x", 0), iAdditionalPairNo:=17) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 4e8bd4bf56cf4887d3690a6691a9154c3aa6b935 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:18:16 +0300 Subject: [PATCH 050/172] Passing Parameters to the tests functions --- instat/dlgOneVarFitModel.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 1b58a6946ad..dd5a60e891e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -320,7 +320,8 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=16) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("x", 0), iAdditionalPairNo:=17) - + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("x", 0), iAdditionalPairNo:=18) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("x", 0), iAdditionalPairNo:=19) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From c28c1ccbb8f283cb5f0f6faebc115c075a919e7a Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:21:39 +0300 Subject: [PATCH 051/172] Passing Parameters to the tests functions --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index dd5a60e891e..018f4b1fb1a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -322,6 +322,8 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("x", 0), iAdditionalPairNo:=17) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("x", 0), iAdditionalPairNo:=18) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("x", 0), iAdditionalPairNo:=19) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsAdFunction, New RParameter("x", 0), iAdditionalPairNo:=20) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsCvmFunction, New RParameter("x", 0), iAdditionalPairNo:=21) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From b763638dcdc213b43239126340f035777786a7a1 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:26:43 +0300 Subject: [PATCH 052/172] More parameters passed to the tests functions --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 018f4b1fb1a..bb356581613 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -324,6 +324,8 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("x", 0), iAdditionalPairNo:=19) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsAdFunction, New RParameter("x", 0), iAdditionalPairNo:=20) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsCvmFunction, New RParameter("x", 0), iAdditionalPairNo:=21) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=22) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 85628d21d6a991b7c04a2f42570a9b870678d078 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 12:33:26 +0300 Subject: [PATCH 053/172] passing parameters to the tests functions --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index bb356581613..ff17967d74f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -326,6 +326,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsCvmFunction, New RParameter("x", 0), iAdditionalPairNo:=21) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 14ab146c32a0adb60a96be1699267681ad171858 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 6 Jul 2020 21:13:30 +0300 Subject: [PATCH 054/172] More changes to one variable fit model dialog --- instat/dlgOneVarFitModel.vb | 12 ++- instat/dlgOneVarFitModel2.Designer.vb | 126 ++++++++++++++------------ 2 files changed, 76 insertions(+), 62 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ff17967d74f..f37d43b8371 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -95,7 +95,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkIgnoreMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) @@ -314,8 +314,8 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=13) - ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=1) - ucrChkIgnoreMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkIgnoreMissing.GetParameter(), iAdditionalPairNo:=2) + ucrOmmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrOmmitMissing.GetParameter(), iAdditionalPairNo:=1) + ucrOmmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrOmmitMissing.GetParameter(), iAdditionalPairNo:=2) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=16) @@ -332,7 +332,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) - ucrChkIgnoreMissing.SetRCode(clsMeanCIFunction, bReset) + ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub @@ -435,11 +435,15 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetCheckBoxText("Save Model") ucrSaveModel.SetPrefix("dist") ElseIf rdoTest.Checked Then + ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Test") ucrSaveModel.SetPrefix("test") + ucrSaveModel.SetAssignToIfUncheckedValue("last_test") ElseIf rdoEstimate.Checked Then + ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Estimate") ucrSaveModel.SetPrefix("ci") + ucrSaveModel.SetAssignToIfUncheckedValue("last_estimate") End If End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index d305512c98c..2e7eb4b57b7 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -47,7 +47,7 @@ Partial Class dlgOneVarFitModel Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() Me.lblTrim = New System.Windows.Forms.Label() - Me.ucrChkIgnoreMissing = New instat.ucrCheck() + Me.ucrOmmitMissing = New instat.ucrCheck() Me.ucrNudTrim = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() @@ -63,9 +63,10 @@ Partial Class dlgOneVarFitModel 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(249, 47) + Me.LblVariable.Location = New System.Drawing.Point(332, 58) + Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(48, 13) + Me.LblVariable.Size = New System.Drawing.Size(64, 17) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' @@ -76,9 +77,10 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(154, 11) + Me.rdoTest.Location = New System.Drawing.Point(205, 14) + Me.rdoTest.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(122, 28) + Me.rdoTest.Size = New System.Drawing.Size(163, 34) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -91,9 +93,10 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) + Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) + Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) + Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -101,18 +104,20 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 286) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 352) + Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 261) + Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 321) + Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -124,9 +129,10 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) + Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) + Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) + Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -135,49 +141,52 @@ Partial Class dlgOneVarFitModel 'lblTests ' Me.lblTests.AutoSize = True - Me.lblTests.Location = New System.Drawing.Point(12, 256) + Me.lblTests.Location = New System.Drawing.Point(16, 315) + Me.lblTests.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTests.Name = "lblTests" - Me.lblTests.Size = New System.Drawing.Size(31, 13) + Me.lblTests.Size = New System.Drawing.Size(40, 17) Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(12, 256) + Me.lblEstimate.Location = New System.Drawing.Point(16, 315) + Me.lblEstimate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.Size = New System.Drawing.Size(66, 17) Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(246, 135) + Me.lblTrim.Location = New System.Drawing.Point(328, 166) + Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" - Me.lblTrim.Size = New System.Drawing.Size(30, 13) + Me.lblTrim.Size = New System.Drawing.Size(40, 17) Me.lblTrim.TabIndex = 51 Me.lblTrim.Text = "Trim:" ' - 'ucrChkIgnoreMissing + 'ucrOmmitMissing ' - Me.ucrChkIgnoreMissing.Checked = False - Me.ucrChkIgnoreMissing.Location = New System.Drawing.Point(346, 131) - Me.ucrChkIgnoreMissing.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) - Me.ucrChkIgnoreMissing.Name = "ucrChkIgnoreMissing" - Me.ucrChkIgnoreMissing.Size = New System.Drawing.Size(137, 20) - Me.ucrChkIgnoreMissing.TabIndex = 52 + Me.ucrOmmitMissing.Checked = False + Me.ucrOmmitMissing.Location = New System.Drawing.Point(461, 161) + Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrOmmitMissing.Name = "ucrOmmitMissing" + Me.ucrOmmitMissing.Size = New System.Drawing.Size(183, 25) + Me.ucrOmmitMissing.TabIndex = 52 ' 'ucrNudTrim ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(279, 131) - Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrNudTrim.Location = New System.Drawing.Point(372, 161) + Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Name = "ucrNudTrim" - Me.ucrNudTrim.Size = New System.Drawing.Size(50, 20) + Me.ucrNudTrim.Size = New System.Drawing.Size(67, 25) Me.ucrNudTrim.TabIndex = 50 Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -185,63 +194,63 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(88, 310) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboEstimate.TabIndex = 48 ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False - Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputComboTests.Location = New System.Drawing.Point(60, 310) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputComboTests.Name = "ucrInputComboTests" - Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboTests.TabIndex = 46 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(332, 116) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveModel.Location = New System.Drawing.Point(13, 352) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) + Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -251,26 +260,26 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 316) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Location = New System.Drawing.Point(13, 389) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(497, 374) - Me.Controls.Add(Me.ucrChkIgnoreMissing) + Me.ClientSize = New System.Drawing.Size(663, 460) + Me.Controls.Add(Me.ucrOmmitMissing) Me.Controls.Add(Me.lblTrim) Me.Controls.Add(Me.ucrNudTrim) Me.Controls.Add(Me.lblEstimate) @@ -291,6 +300,7 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" @@ -321,5 +331,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblEstimate As Label Friend WithEvents ucrNudTrim As ucrNud Friend WithEvents lblTrim As Label - Friend WithEvents ucrChkIgnoreMissing As ucrCheck + Friend WithEvents ucrOmmitMissing As ucrCheck End Class \ No newline at end of file From c75ef05e0e13c6934de13309a2b2e4f526cd334e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 10:24:50 +0300 Subject: [PATCH 055/172] Added test controls to the dialog --- instat/dlgOneVarFitModel2.Designer.vb | 41 +++++++++++++++++++++------ 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 2e7eb4b57b7..1bda0239f47 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -58,6 +58,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputMethod = New instat.ucrInputComboBox() + Me.lblMethod = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -78,7 +80,7 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTest.Location = New System.Drawing.Point(205, 14) - Me.rdoTest.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoTest.Margin = New System.Windows.Forms.Padding(4) Me.rdoTest.Name = "rdoTest" Me.rdoTest.Size = New System.Drawing.Size(163, 34) Me.rdoTest.TabIndex = 41 @@ -94,7 +96,7 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) - Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4) Me.rdoGeneralCase.Name = "rdoGeneralCase" Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) Me.rdoGeneralCase.TabIndex = 40 @@ -105,7 +107,7 @@ Partial Class dlgOneVarFitModel 'cmdDisplayOptions ' Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 352) - Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) Me.cmdDisplayOptions.TabIndex = 44 @@ -115,7 +117,7 @@ Partial Class dlgOneVarFitModel 'cmdFittingOptions ' Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 321) - Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdFittingOptions.Name = "cmdFittingOptions" Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) Me.cmdFittingOptions.TabIndex = 43 @@ -130,7 +132,7 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) - Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4) Me.rdoEstimate.Name = "rdoEstimate" Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) Me.rdoEstimate.TabIndex = 45 @@ -171,7 +173,7 @@ Partial Class dlgOneVarFitModel 'ucrOmmitMissing ' Me.ucrOmmitMissing.Checked = False - Me.ucrOmmitMissing.Location = New System.Drawing.Point(461, 161) + Me.ucrOmmitMissing.Location = New System.Drawing.Point(467, 161) Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrOmmitMissing.Name = "ucrOmmitMissing" Me.ucrOmmitMissing.Size = New System.Drawing.Size(183, 25) @@ -269,16 +271,37 @@ Partial Class dlgOneVarFitModel 'ucrBase ' Me.ucrBase.Location = New System.Drawing.Point(13, 389) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' + 'ucrInputMethod + ' + Me.ucrInputMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMethod.IsReadOnly = False + Me.ucrInputMethod.Location = New System.Drawing.Point(389, 198) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputMethod.Name = "ucrInputMethod" + Me.ucrInputMethod.Size = New System.Drawing.Size(108, 26) + Me.ucrInputMethod.TabIndex = 53 + ' + 'lblMethod + ' + Me.lblMethod.AutoSize = True + Me.lblMethod.Location = New System.Drawing.Point(323, 202) + Me.lblMethod.Name = "lblMethod" + Me.lblMethod.Size = New System.Drawing.Size(59, 17) + Me.lblMethod.TabIndex = 54 + Me.lblMethod.Text = "Method:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(663, 460) + Me.Controls.Add(Me.lblMethod) + Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrOmmitMissing) Me.Controls.Add(Me.lblTrim) Me.Controls.Add(Me.ucrNudTrim) @@ -300,7 +323,7 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" @@ -332,4 +355,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudTrim As ucrNud Friend WithEvents lblTrim As Label Friend WithEvents ucrOmmitMissing As ucrCheck + Friend WithEvents lblMethod As Label + Friend WithEvents ucrInputMethod As ucrInputComboBox End Class \ No newline at end of file From b01cf07f094c4278ff1489e886002d9c4d63b06a Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 10:30:25 +0300 Subject: [PATCH 056/172] Added tests controls --- instat/dlgOneVarFitModel2.Designer.vb | 30 ++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 1bda0239f47..3d06cf0178c 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -60,6 +60,9 @@ Partial Class dlgOneVarFitModel Me.ucrBase = New instat.ucrButtons() Me.ucrInputMethod = New instat.ucrInputComboBox() Me.lblMethod = New System.Windows.Forms.Label() + Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() + Me.lblConfidenceLevel = New System.Windows.Forms.Label() + CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'LblVariable @@ -163,7 +166,7 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(328, 166) + Me.lblTrim.Location = New System.Drawing.Point(328, 163) Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(40, 17) @@ -280,7 +283,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(389, 198) + Me.ucrInputMethod.Location = New System.Drawing.Point(387, 270) Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputMethod.Name = "ucrInputMethod" Me.ucrInputMethod.Size = New System.Drawing.Size(108, 26) @@ -289,17 +292,35 @@ Partial Class dlgOneVarFitModel 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(323, 202) + Me.lblMethod.Location = New System.Drawing.Point(323, 274) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 Me.lblMethod.Text = "Method:" ' + 'NumericUpDown1 + ' + Me.NumericUpDown1.Location = New System.Drawing.Point(467, 192) + Me.NumericUpDown1.Name = "NumericUpDown1" + Me.NumericUpDown1.Size = New System.Drawing.Size(67, 22) + Me.NumericUpDown1.TabIndex = 55 + ' + 'lblConfidenceLevel + ' + Me.lblConfidenceLevel.AutoSize = True + Me.lblConfidenceLevel.Location = New System.Drawing.Point(329, 197) + Me.lblConfidenceLevel.Name = "lblConfidenceLevel" + Me.lblConfidenceLevel.Size = New System.Drawing.Size(121, 17) + Me.lblConfidenceLevel.TabIndex = 56 + Me.lblConfidenceLevel.Text = "Confidence Level:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(663, 460) + Me.Controls.Add(Me.lblConfidenceLevel) + Me.Controls.Add(Me.NumericUpDown1) Me.Controls.Add(Me.lblMethod) Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrOmmitMissing) @@ -329,6 +350,7 @@ Partial Class dlgOneVarFitModel Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" + CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -357,4 +379,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrOmmitMissing As ucrCheck Friend WithEvents lblMethod As Label Friend WithEvents ucrInputMethod As ucrInputComboBox + Friend WithEvents lblConfidenceLevel As Label + Friend WithEvents NumericUpDown1 As NumericUpDown End Class \ No newline at end of file From c5119a6a85d8d9eb3e6b49c648e75a82bf21f983 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 11:07:14 +0300 Subject: [PATCH 057/172] Linking different tests to the test radio button --- instat/dlgOneVarFitModel.vb | 2 +- instat/dlgOneVarFitModel2.Designer.vb | 133 ++++++++++++-------------- 2 files changed, 64 insertions(+), 71 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f37d43b8371..0002b231ab5 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -53,7 +53,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest"}) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope"}) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "PoissonCI", "quantileCI", "sdCI", "VarCI"}) ucrReceiverVariable.SetParameter(New RParameter("object", 0)) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 3d06cf0178c..a68fd4e5bb2 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -68,10 +68,9 @@ Partial Class dlgOneVarFitModel 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(332, 58) - Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.LblVariable.Location = New System.Drawing.Point(249, 47) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(64, 17) + Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' @@ -82,10 +81,9 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(205, 14) - Me.rdoTest.Margin = New System.Windows.Forms.Padding(4) + Me.rdoTest.Location = New System.Drawing.Point(154, 11) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(163, 34) + Me.rdoTest.Size = New System.Drawing.Size(122, 28) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -98,10 +96,9 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) - Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4) + Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) + Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -109,20 +106,18 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 352) - Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 286) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 321) - Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 261) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -134,10 +129,9 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) - Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) + Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -146,52 +140,49 @@ Partial Class dlgOneVarFitModel 'lblTests ' Me.lblTests.AutoSize = True - Me.lblTests.Location = New System.Drawing.Point(16, 315) - Me.lblTests.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTests.Location = New System.Drawing.Point(12, 256) Me.lblTests.Name = "lblTests" - Me.lblTests.Size = New System.Drawing.Size(40, 17) + Me.lblTests.Size = New System.Drawing.Size(31, 13) Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(16, 315) - Me.lblEstimate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEstimate.Location = New System.Drawing.Point(12, 256) Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(66, 17) + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(328, 163) - Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTrim.Location = New System.Drawing.Point(246, 118) Me.lblTrim.Name = "lblTrim" - Me.lblTrim.Size = New System.Drawing.Size(40, 17) + Me.lblTrim.Size = New System.Drawing.Size(30, 13) Me.lblTrim.TabIndex = 51 Me.lblTrim.Text = "Trim:" ' 'ucrOmmitMissing ' Me.ucrOmmitMissing.Checked = False - Me.ucrOmmitMissing.Location = New System.Drawing.Point(467, 161) - Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrOmmitMissing.Location = New System.Drawing.Point(350, 110) + Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrOmmitMissing.Name = "ucrOmmitMissing" - Me.ucrOmmitMissing.Size = New System.Drawing.Size(183, 25) + Me.ucrOmmitMissing.Size = New System.Drawing.Size(137, 20) Me.ucrOmmitMissing.TabIndex = 52 ' 'ucrNudTrim ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(372, 161) - Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudTrim.Location = New System.Drawing.Point(279, 116) + Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Name = "ucrNudTrim" - Me.ucrNudTrim.Size = New System.Drawing.Size(67, 25) + Me.ucrNudTrim.Size = New System.Drawing.Size(50, 20) Me.ucrNudTrim.TabIndex = 50 Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -199,63 +190,63 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(88, 310) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboEstimate.TabIndex = 48 ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False - Me.ucrInputComboTests.Location = New System.Drawing.Point(60, 310) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputComboTests.Name = "ucrInputComboTests" - Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) + Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboTests.TabIndex = 46 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(332, 116) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 88) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(13, 352) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) + Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -265,60 +256,63 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(13, 389) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) + Me.ucrBase.Location = New System.Drawing.Point(10, 316) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(547, 64) + Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' 'ucrInputMethod ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(387, 270) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputMethod.Location = New System.Drawing.Point(290, 219) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(108, 26) + Me.ucrInputMethod.Size = New System.Drawing.Size(81, 21) Me.ucrInputMethod.TabIndex = 53 ' 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(323, 274) + Me.lblMethod.Location = New System.Drawing.Point(242, 223) + Me.lblMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMethod.Name = "lblMethod" - Me.lblMethod.Size = New System.Drawing.Size(59, 17) + Me.lblMethod.Size = New System.Drawing.Size(46, 13) Me.lblMethod.TabIndex = 54 Me.lblMethod.Text = "Method:" ' 'NumericUpDown1 ' - Me.NumericUpDown1.Location = New System.Drawing.Point(467, 192) + Me.NumericUpDown1.Location = New System.Drawing.Point(343, 138) + Me.NumericUpDown1.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2) Me.NumericUpDown1.Name = "NumericUpDown1" - Me.NumericUpDown1.Size = New System.Drawing.Size(67, 22) + Me.NumericUpDown1.Size = New System.Drawing.Size(50, 20) Me.NumericUpDown1.TabIndex = 55 ' 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(329, 197) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(247, 141) + Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(121, 17) + Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) Me.lblConfidenceLevel.TabIndex = 56 Me.lblConfidenceLevel.Text = "Confidence Level:" ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(663, 460) + Me.ClientSize = New System.Drawing.Size(497, 374) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.NumericUpDown1) Me.Controls.Add(Me.lblMethod) @@ -344,7 +338,6 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" From 67cde1e6334f10ccbe873942aa393c888d6b63bd Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 11:10:06 +0300 Subject: [PATCH 058/172] Linking tests to the radio button control --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0002b231ab5..aae3f142cb6 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -53,7 +53,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope"}) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialcorrelationTest", "snh.test"}) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "PoissonCI", "quantileCI", "sdCI", "VarCI"}) ucrReceiverVariable.SetParameter(New RParameter("object", 0)) From 3adbac97e62c95f08f50f9215ee82cfb469c7adb Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 11:12:58 +0300 Subject: [PATCH 059/172] Linking the tests to the control --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index aae3f142cb6..c5a3e559946 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -53,7 +53,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialcorrelationTest", "snh.test"}) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialcorrelationTest", "snh.test", "ad.test", "cvm.test", "lillie.test", "pearson.test", "sf.test"}) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "PoissonCI", "quantileCI", "sdCI", "VarCI"}) ucrReceiverVariable.SetParameter(New RParameter("object", 0)) From 230df99a63bcbf3ee128f133d9b32bf2e079fe16 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 11:26:09 +0300 Subject: [PATCH 060/172] Minor designer changes --- instat/dlgOneVarFitModel2.Designer.vb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index a68fd4e5bb2..2754da6c693 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -60,9 +60,9 @@ Partial Class dlgOneVarFitModel Me.ucrBase = New instat.ucrButtons() Me.ucrInputMethod = New instat.ucrInputComboBox() Me.lblMethod = New System.Windows.Forms.Label() - Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() + Me.ucrNudConfidenceLevel = New System.Windows.Forms.NumericUpDown() Me.lblConfidenceLevel = New System.Windows.Forms.Label() - CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.ucrNudConfidenceLevel, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'LblVariable @@ -290,13 +290,13 @@ Partial Class dlgOneVarFitModel Me.lblMethod.TabIndex = 54 Me.lblMethod.Text = "Method:" ' - 'NumericUpDown1 + 'ucrNudConfidenceLevel ' - Me.NumericUpDown1.Location = New System.Drawing.Point(343, 138) - Me.NumericUpDown1.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2) - Me.NumericUpDown1.Name = "NumericUpDown1" - Me.NumericUpDown1.Size = New System.Drawing.Size(50, 20) - Me.NumericUpDown1.TabIndex = 55 + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(343, 138) + Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2) + Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" + Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(50, 20) + Me.ucrNudConfidenceLevel.TabIndex = 55 ' 'lblConfidenceLevel ' @@ -314,7 +314,7 @@ Partial Class dlgOneVarFitModel Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(497, 374) Me.Controls.Add(Me.lblConfidenceLevel) - Me.Controls.Add(Me.NumericUpDown1) + Me.Controls.Add(Me.ucrNudConfidenceLevel) Me.Controls.Add(Me.lblMethod) Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrOmmitMissing) @@ -343,7 +343,7 @@ Partial Class dlgOneVarFitModel Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" - CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.ucrNudConfidenceLevel, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -373,5 +373,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblMethod As Label Friend WithEvents ucrInputMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label - Friend WithEvents NumericUpDown1 As NumericUpDown + Friend WithEvents ucrNudConfidenceLevel As NumericUpDown End Class \ No newline at end of file From e6b70ceaa090353d63a4a28a62b353457b33b160 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 12:21:03 +0300 Subject: [PATCH 061/172] Added parameters group box for the tests and Estimates --- instat/dlgOneVarFitModel2.Designer.vb | 168 ++++++++++++++++---------- 1 file changed, 106 insertions(+), 62 deletions(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 2754da6c693..e0c019539a9 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -47,6 +47,9 @@ Partial Class dlgOneVarFitModel Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() Me.lblTrim = New System.Windows.Forms.Label() + Me.lblMethod = New System.Windows.Forms.Label() + Me.lblConfidenceLevel = New System.Windows.Forms.Label() + Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrOmmitMissing = New instat.ucrCheck() Me.ucrNudTrim = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() @@ -58,11 +61,11 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputMethod = New instat.ucrInputComboBox() - Me.lblMethod = New System.Windows.Forms.Label() - Me.ucrNudConfidenceLevel = New System.Windows.Forms.NumericUpDown() - Me.lblConfidenceLevel = New System.Windows.Forms.Label() - CType(Me.ucrNudConfidenceLevel, System.ComponentModel.ISupportInitialize).BeginInit() + Me.grpParameters = New System.Windows.Forms.GroupBox() + Me.ucrNudHypothesis = New instat.ucrNud() + Me.ucrNudConfidenceLevel = New instat.ucrNud() + Me.lblDifferenceInMean = New System.Windows.Forms.Label() + Me.grpParameters.SuspendLayout() Me.SuspendLayout() ' 'LblVariable @@ -106,7 +109,7 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 286) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 323) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) Me.cmdDisplayOptions.TabIndex = 44 @@ -115,7 +118,7 @@ Partial Class dlgOneVarFitModel ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 261) + Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 298) Me.cmdFittingOptions.Name = "cmdFittingOptions" Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) Me.cmdFittingOptions.TabIndex = 43 @@ -158,27 +161,57 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(246, 118) + Me.lblTrim.Location = New System.Drawing.Point(5, 23) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(30, 13) Me.lblTrim.TabIndex = 51 Me.lblTrim.Text = "Trim:" ' + 'lblMethod + ' + Me.lblMethod.AutoSize = True + Me.lblMethod.Location = New System.Drawing.Point(6, 105) + Me.lblMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblMethod.Name = "lblMethod" + Me.lblMethod.Size = New System.Drawing.Size(46, 13) + Me.lblMethod.TabIndex = 54 + Me.lblMethod.Text = "Method:" + ' + 'lblConfidenceLevel + ' + Me.lblConfidenceLevel.AutoSize = True + Me.lblConfidenceLevel.Location = New System.Drawing.Point(5, 47) + Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblConfidenceLevel.Name = "lblConfidenceLevel" + Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) + Me.lblConfidenceLevel.TabIndex = 56 + Me.lblConfidenceLevel.Text = "Confidence Level:" + ' + 'ucrInputMethod + ' + Me.ucrInputMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMethod.IsReadOnly = False + Me.ucrInputMethod.Location = New System.Drawing.Point(81, 100) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputMethod.Name = "ucrInputMethod" + Me.ucrInputMethod.Size = New System.Drawing.Size(81, 21) + Me.ucrInputMethod.TabIndex = 53 + ' 'ucrOmmitMissing ' Me.ucrOmmitMissing.Checked = False - Me.ucrOmmitMissing.Location = New System.Drawing.Point(350, 110) - Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrOmmitMissing.Location = New System.Drawing.Point(396, 94) + Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(5) Me.ucrOmmitMissing.Name = "ucrOmmitMissing" - Me.ucrOmmitMissing.Size = New System.Drawing.Size(137, 20) + Me.ucrOmmitMissing.Size = New System.Drawing.Size(120, 20) Me.ucrOmmitMissing.TabIndex = 52 ' 'ucrNudTrim ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(279, 116) - Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrNudTrim.Location = New System.Drawing.Point(112, 16) + Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Name = "ucrNudTrim" @@ -191,7 +224,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboEstimate.TabIndex = 48 @@ -201,7 +234,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboTests.Name = "ucrInputComboTests" Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboTests.TabIndex = 46 @@ -209,8 +242,8 @@ Partial Class dlgOneVarFitModel 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 88) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) Me.ucrChkConvertVariate.TabIndex = 42 @@ -218,14 +251,14 @@ Partial Class dlgOneVarFitModel 'ucrPnlGeneralExactCase ' Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(10, 286) + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 323) Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) @@ -234,7 +267,7 @@ Partial Class dlgOneVarFitModel 'ucrDistributionChoice ' Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) Me.ucrDistributionChoice.TabIndex = 11 @@ -264,67 +297,74 @@ Partial Class dlgOneVarFitModel ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 316) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Location = New System.Drawing.Point(10, 353) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputMethod - ' - Me.ucrInputMethod.AddQuotesIfUnrecognised = True - Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(290, 219) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) - Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(81, 21) - Me.ucrInputMethod.TabIndex = 53 - ' - 'lblMethod - ' - Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(242, 223) - Me.lblMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblMethod.Name = "lblMethod" - Me.lblMethod.Size = New System.Drawing.Size(46, 13) - Me.lblMethod.TabIndex = 54 - Me.lblMethod.Text = "Method:" + 'grpParameters + ' + Me.grpParameters.Controls.Add(Me.lblDifferenceInMean) + Me.grpParameters.Controls.Add(Me.ucrNudConfidenceLevel) + Me.grpParameters.Controls.Add(Me.ucrNudHypothesis) + Me.grpParameters.Controls.Add(Me.ucrNudTrim) + Me.grpParameters.Controls.Add(Me.lblMethod) + Me.grpParameters.Controls.Add(Me.lblConfidenceLevel) + Me.grpParameters.Controls.Add(Me.ucrInputMethod) + Me.grpParameters.Controls.Add(Me.lblTrim) + Me.grpParameters.Location = New System.Drawing.Point(263, 118) + Me.grpParameters.Name = "grpParameters" + Me.grpParameters.Size = New System.Drawing.Size(183, 137) + Me.grpParameters.TabIndex = 57 + Me.grpParameters.TabStop = False + Me.grpParameters.Text = "Parameters" + ' + 'ucrNudHypothesis + ' + Me.ucrNudHypothesis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHypothesis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHypothesis.Location = New System.Drawing.Point(112, 72) + Me.ucrNudHypothesis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHypothesis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHypothesis.Name = "ucrNudHypothesis" + Me.ucrNudHypothesis.Size = New System.Drawing.Size(50, 20) + Me.ucrNudHypothesis.TabIndex = 57 + Me.ucrNudHypothesis.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrNudConfidenceLevel ' - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(343, 138) - Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2) + Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(112, 43) + Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(50, 20) - Me.ucrNudConfidenceLevel.TabIndex = 55 + Me.ucrNudConfidenceLevel.TabIndex = 58 + Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblConfidenceLevel + 'lblDifferenceInMean ' - Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(247, 141) - Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) - Me.lblConfidenceLevel.TabIndex = 56 - Me.lblConfidenceLevel.Text = "Confidence Level:" + Me.lblDifferenceInMean.AutoSize = True + Me.lblDifferenceInMean.Location = New System.Drawing.Point(5, 75) + Me.lblDifferenceInMean.Name = "lblDifferenceInMean" + Me.lblDifferenceInMean.Size = New System.Drawing.Size(101, 13) + Me.lblDifferenceInMean.TabIndex = 59 + Me.lblDifferenceInMean.Text = "Difference In Mean:" ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(497, 374) - Me.Controls.Add(Me.lblConfidenceLevel) - Me.Controls.Add(Me.ucrNudConfidenceLevel) - Me.Controls.Add(Me.lblMethod) - Me.Controls.Add(Me.ucrInputMethod) - Me.Controls.Add(Me.ucrOmmitMissing) - Me.Controls.Add(Me.lblTrim) - Me.Controls.Add(Me.ucrNudTrim) + Me.ClientSize = New System.Drawing.Size(530, 420) + Me.Controls.Add(Me.grpParameters) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) Me.Controls.Add(Me.lblTests) Me.Controls.Add(Me.ucrInputComboTests) Me.Controls.Add(Me.rdoEstimate) + Me.Controls.Add(Me.ucrOmmitMissing) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) Me.Controls.Add(Me.rdoTest) @@ -343,7 +383,8 @@ Partial Class dlgOneVarFitModel Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" - CType(Me.ucrNudConfidenceLevel, System.ComponentModel.ISupportInitialize).EndInit() + Me.grpParameters.ResumeLayout(False) + Me.grpParameters.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -373,5 +414,8 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblMethod As Label Friend WithEvents ucrInputMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label - Friend WithEvents ucrNudConfidenceLevel As NumericUpDown + Friend WithEvents grpParameters As GroupBox + Friend WithEvents ucrNudConfidenceLevel As ucrNud + Friend WithEvents ucrNudHypothesis As ucrNud + Friend WithEvents lblDifferenceInMean As Label End Class \ No newline at end of file From 8dbfbb9fce77548caec003c73adab9e0f00ad5db Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 12:25:20 +0300 Subject: [PATCH 062/172] Implementing the parameters for the tests --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index c5a3e559946..c0f84dce772 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -89,6 +89,7 @@ Public Class dlgOneVarFitModel ucrNudTrim.Maximum = 0.5 ucrNudTrim.DecimalPlaces = 2 ucrNudTrim.Increment = 0.01 + ucrNudTrim.SetLinkedDisplayControl(grpParameters) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") From e4d84b4ac22767d3060e717fa403f9d4a76db326 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 12:34:41 +0300 Subject: [PATCH 063/172] Setting the control parameters for tests --- instat/dlgOneVarFitModel.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index c0f84dce772..0af26487d8e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -89,7 +89,9 @@ Public Class dlgOneVarFitModel ucrNudTrim.Maximum = 0.5 ucrNudTrim.DecimalPlaces = 2 ucrNudTrim.Increment = 0.01 - ucrNudTrim.SetLinkedDisplayControl(grpParameters) + + + ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -100,6 +102,9 @@ Public Class dlgOneVarFitModel ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) + ucrNudTrim.SetLinkedDisplayControl(grpParameters) + ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) + ucrNudConfidenceLevel.SetLinkedDisplayControl(grpParameters) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) From 56ff252ba9b4ca2325fb399c6069f877dc9cca86 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 12:40:04 +0300 Subject: [PATCH 064/172] Setting the control parameters for the tests --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0af26487d8e..d3d9208b2cc 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -99,6 +99,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) From 082c1ad629d6a9e8bf47d0743eff707206289ac2 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 13:07:09 +0300 Subject: [PATCH 065/172] More settings for parameters --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index d3d9208b2cc..0581fc2d83e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -100,12 +100,16 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=Classic) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) ucrNudTrim.SetLinkedDisplayControl(grpParameters) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) ucrNudConfidenceLevel.SetLinkedDisplayControl(grpParameters) + ucrInputMethod.SetLinkedDisplayControl(lblMethod) + ucrInputMethod.SetLinkedDisplayControl(grpParameters) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) From ef526c89176584fa5fe585f9770358c946263488 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 13:59:01 +0300 Subject: [PATCH 066/172] Added an updown for the confidence level --- instat/dlgOneVarFitModel.vb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0581fc2d83e..9e0016e499a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,6 +82,8 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() + ucrInputMethod.SetItems({"classic", "boot"}) + @@ -92,6 +94,10 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) + ucrNudConfidenceLevel.DecimalPlaces = 3 + ucrNudConfidenceLevel.Minimum = 0.8 + ucrNudConfidenceLevel.Maximum = 0.999 + ucrNudConfidenceLevel.Increment = 0.001 ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -101,7 +107,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=Classic) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) From 128e183d6d6019b17a34ef64cefcde57af1e53ed Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 14:29:45 +0300 Subject: [PATCH 067/172] More parameters addition --- instat/dlgOneVarFitModel.vb | 7 +- instat/dlgOneVarFitModel2.Designer.vb | 144 +++++++++++++------------- 2 files changed, 77 insertions(+), 74 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 9e0016e499a..f871ed71c74 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -83,6 +83,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetDropDownStyleAsNonEditable() ucrInputMethod.SetItems({"classic", "boot"}) + ucrInputMethod.SetDropDownStyleAsNonEditable() @@ -99,6 +100,8 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.Maximum = 0.999 ucrNudConfidenceLevel.Increment = 0.001 + ucrNudHypothesis.SetParameter(New RParameter("r")) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -114,6 +117,8 @@ Public Class dlgOneVarFitModel ucrNudTrim.SetLinkedDisplayControl(grpParameters) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) ucrNudConfidenceLevel.SetLinkedDisplayControl(grpParameters) + ucrNudHypothesis.SetLinkedDisplayControl(lblDifferenceInMean) + ucrNudHypothesis.SetLinkedDisplayControl(grpParameters) ucrInputMethod.SetLinkedDisplayControl(lblMethod) ucrInputMethod.SetLinkedDisplayControl(grpParameters) @@ -455,12 +460,10 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Test") ucrSaveModel.SetPrefix("test") - ucrSaveModel.SetAssignToIfUncheckedValue("last_test") ElseIf rdoEstimate.Checked Then ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Estimate") ucrSaveModel.SetPrefix("ci") - ucrSaveModel.SetAssignToIfUncheckedValue("last_estimate") End If End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index e0c019539a9..71f9c6831aa 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -49,11 +49,15 @@ Partial Class dlgOneVarFitModel Me.lblTrim = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() - Me.ucrInputMethod = New instat.ucrInputComboBox() - Me.ucrOmmitMissing = New instat.ucrCheck() + Me.grpParameters = New System.Windows.Forms.GroupBox() + Me.lblDifferenceInMean = New System.Windows.Forms.Label() + Me.ucrNudConfidenceLevel = New instat.ucrNud() + Me.ucrNudHypothesis = New instat.ucrNud() Me.ucrNudTrim = New instat.ucrNud() + Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() + Me.ucrOmmitMissing = New instat.ucrCheck() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() Me.ucrSaveModel = New instat.ucrSave() @@ -61,10 +65,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.grpParameters = New System.Windows.Forms.GroupBox() - Me.ucrNudHypothesis = New instat.ucrNud() - Me.ucrNudConfidenceLevel = New instat.ucrNud() - Me.lblDifferenceInMean = New System.Windows.Forms.Label() Me.grpParameters.SuspendLayout() Me.SuspendLayout() ' @@ -187,24 +187,55 @@ Partial Class dlgOneVarFitModel Me.lblConfidenceLevel.TabIndex = 56 Me.lblConfidenceLevel.Text = "Confidence Level:" ' - 'ucrInputMethod + 'grpParameters ' - Me.ucrInputMethod.AddQuotesIfUnrecognised = True - Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(81, 100) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(81, 21) - Me.ucrInputMethod.TabIndex = 53 + Me.grpParameters.Controls.Add(Me.lblDifferenceInMean) + Me.grpParameters.Controls.Add(Me.ucrNudConfidenceLevel) + Me.grpParameters.Controls.Add(Me.ucrNudHypothesis) + Me.grpParameters.Controls.Add(Me.ucrNudTrim) + Me.grpParameters.Controls.Add(Me.lblMethod) + Me.grpParameters.Controls.Add(Me.lblConfidenceLevel) + Me.grpParameters.Controls.Add(Me.ucrInputMethod) + Me.grpParameters.Controls.Add(Me.lblTrim) + Me.grpParameters.Location = New System.Drawing.Point(263, 118) + Me.grpParameters.Name = "grpParameters" + Me.grpParameters.Size = New System.Drawing.Size(183, 137) + Me.grpParameters.TabIndex = 57 + Me.grpParameters.TabStop = False + Me.grpParameters.Text = "Parameters" ' - 'ucrOmmitMissing + 'lblDifferenceInMean ' - Me.ucrOmmitMissing.Checked = False - Me.ucrOmmitMissing.Location = New System.Drawing.Point(396, 94) - Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(5) - Me.ucrOmmitMissing.Name = "ucrOmmitMissing" - Me.ucrOmmitMissing.Size = New System.Drawing.Size(120, 20) - Me.ucrOmmitMissing.TabIndex = 52 + Me.lblDifferenceInMean.AutoSize = True + Me.lblDifferenceInMean.Location = New System.Drawing.Point(5, 75) + Me.lblDifferenceInMean.Name = "lblDifferenceInMean" + Me.lblDifferenceInMean.Size = New System.Drawing.Size(101, 13) + Me.lblDifferenceInMean.TabIndex = 59 + Me.lblDifferenceInMean.Text = "Difference In Mean:" + ' + 'ucrNudConfidenceLevel + ' + Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(112, 43) + Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" + Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(50, 20) + Me.ucrNudConfidenceLevel.TabIndex = 58 + Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudHypothesis + ' + Me.ucrNudHypothesis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHypothesis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHypothesis.Location = New System.Drawing.Point(113, 72) + Me.ucrNudHypothesis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHypothesis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHypothesis.Name = "ucrNudHypothesis" + Me.ucrNudHypothesis.Size = New System.Drawing.Size(50, 20) + Me.ucrNudHypothesis.TabIndex = 57 + Me.ucrNudHypothesis.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrNudTrim ' @@ -219,6 +250,16 @@ Partial Class dlgOneVarFitModel Me.ucrNudTrim.TabIndex = 50 Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' + 'ucrInputMethod + ' + Me.ucrInputMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMethod.IsReadOnly = False + Me.ucrInputMethod.Location = New System.Drawing.Point(81, 100) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputMethod.Name = "ucrInputMethod" + Me.ucrInputMethod.Size = New System.Drawing.Size(81, 21) + Me.ucrInputMethod.TabIndex = 53 + ' 'ucrInputComboEstimate ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True @@ -239,10 +280,19 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboTests.TabIndex = 46 ' + 'ucrOmmitMissing + ' + Me.ucrOmmitMissing.Checked = False + Me.ucrOmmitMissing.Location = New System.Drawing.Point(404, 94) + Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrOmmitMissing.Name = "ucrOmmitMissing" + Me.ucrOmmitMissing.Size = New System.Drawing.Size(120, 20) + Me.ucrOmmitMissing.TabIndex = 52 + ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(249, 94) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(242, 94) Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) @@ -303,56 +353,6 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'grpParameters - ' - Me.grpParameters.Controls.Add(Me.lblDifferenceInMean) - Me.grpParameters.Controls.Add(Me.ucrNudConfidenceLevel) - Me.grpParameters.Controls.Add(Me.ucrNudHypothesis) - Me.grpParameters.Controls.Add(Me.ucrNudTrim) - Me.grpParameters.Controls.Add(Me.lblMethod) - Me.grpParameters.Controls.Add(Me.lblConfidenceLevel) - Me.grpParameters.Controls.Add(Me.ucrInputMethod) - Me.grpParameters.Controls.Add(Me.lblTrim) - Me.grpParameters.Location = New System.Drawing.Point(263, 118) - Me.grpParameters.Name = "grpParameters" - Me.grpParameters.Size = New System.Drawing.Size(183, 137) - Me.grpParameters.TabIndex = 57 - Me.grpParameters.TabStop = False - Me.grpParameters.Text = "Parameters" - ' - 'ucrNudHypothesis - ' - Me.ucrNudHypothesis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHypothesis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHypothesis.Location = New System.Drawing.Point(112, 72) - Me.ucrNudHypothesis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudHypothesis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHypothesis.Name = "ucrNudHypothesis" - Me.ucrNudHypothesis.Size = New System.Drawing.Size(50, 20) - Me.ucrNudHypothesis.TabIndex = 57 - Me.ucrNudHypothesis.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudConfidenceLevel - ' - Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(112, 43) - Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" - Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(50, 20) - Me.ucrNudConfidenceLevel.TabIndex = 58 - Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblDifferenceInMean - ' - Me.lblDifferenceInMean.AutoSize = True - Me.lblDifferenceInMean.Location = New System.Drawing.Point(5, 75) - Me.lblDifferenceInMean.Name = "lblDifferenceInMean" - Me.lblDifferenceInMean.Size = New System.Drawing.Size(101, 13) - Me.lblDifferenceInMean.TabIndex = 59 - Me.lblDifferenceInMean.Text = "Difference In Mean:" - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) From 2b1e09882c26ab4ccac880590a15e096400256f5 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 7 Jul 2020 16:27:19 +0300 Subject: [PATCH 068/172] More parameter setting --- instat/dlgOneVarFitModel.vb | 18 ++++++++++++++---- instat/dlgOneVarFitModel2.Designer.vb | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f871ed71c74..a637402d048 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -100,7 +100,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.Maximum = 0.999 ucrNudConfidenceLevel.Increment = 0.001 - ucrNudHypothesis.SetParameter(New RParameter("r")) + ucrNudHypothesis.SetParameter(New RParameter("mu")) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -355,6 +355,8 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) + 'ucrNudConfidenceLevel.SetRCode(clsTtestFunction) + 'ucrNudHypothesis.SetRCode(clsTtestFunction) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub @@ -457,19 +459,26 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetCheckBoxText("Save Model") ucrSaveModel.SetPrefix("dist") ElseIf rdoTest.Checked Then - ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Test") ucrSaveModel.SetPrefix("test") ElseIf rdoEstimate.Checked Then - ucrSaveModel.SetDataFrameSelector(ucrSelectorOneVarFitMod.ucrAvailableDataFrames) ucrSaveModel.SetCheckBoxText("Save Estimate") + ucrSaveModel.SetAssignToIfUncheckedValue("last_estimate") ucrSaveModel.SetPrefix("ci") End If End Sub + Private Sub VisibilityOfgrpParameters() + If rdoTest.Checked Or rdoEstimate.Checked Then + grpParameters.Visible = True + Else + grpParameters.Visible = False + End If + End Sub + Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged - SetSaveLabelTextAndPrefix() SetTestEstimateBaseFunction() + VisibilityOfgrpParameters() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged @@ -548,6 +557,7 @@ Public Class dlgOneVarFitModel End Sub Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + SetSaveLabelTextAndPrefix() SetTestEstimateBaseFunction() End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 71f9c6831aa..d16505d7813 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -197,7 +197,7 @@ Partial Class dlgOneVarFitModel Me.grpParameters.Controls.Add(Me.lblConfidenceLevel) Me.grpParameters.Controls.Add(Me.ucrInputMethod) Me.grpParameters.Controls.Add(Me.lblTrim) - Me.grpParameters.Location = New System.Drawing.Point(263, 118) + Me.grpParameters.Location = New System.Drawing.Point(263, 122) Me.grpParameters.Name = "grpParameters" Me.grpParameters.Size = New System.Drawing.Size(183, 137) Me.grpParameters.TabIndex = 57 @@ -357,7 +357,7 @@ Partial Class dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(530, 420) + Me.ClientSize = New System.Drawing.Size(521, 420) Me.Controls.Add(Me.grpParameters) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) From e6f651cffa8bdb11be9b815796386aff0abaafbf Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 9 Jul 2020 10:31:32 +0300 Subject: [PATCH 069/172] Adding code parameter pair for test functions --- instat/dlgOneVarFitModel.vb | 20 +-- instat/dlgOneVarFitModel2.Designer.vb | 176 +++++++++++++------------- 2 files changed, 90 insertions(+), 106 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a637402d048..497b631cc51 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -114,13 +114,9 @@ Public Class dlgOneVarFitModel ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) - ucrNudTrim.SetLinkedDisplayControl(grpParameters) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) - ucrNudConfidenceLevel.SetLinkedDisplayControl(grpParameters) ucrNudHypothesis.SetLinkedDisplayControl(lblDifferenceInMean) - ucrNudHypothesis.SetLinkedDisplayControl(grpParameters) ucrInputMethod.SetLinkedDisplayControl(lblMethod) - ucrInputMethod.SetLinkedDisplayControl(grpParameters) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -349,16 +345,17 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=1) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) - 'ucrNudConfidenceLevel.SetRCode(clsTtestFunction) - 'ucrNudHypothesis.SetRCode(clsTtestFunction) + ucrNudConfidenceLevel.SetRCode(clsTtestFunction) + ucrNudHypothesis.SetRCode(clsTtestFunction) - ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) + ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub Private Sub TestOKEnabled() @@ -468,17 +465,8 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub VisibilityOfgrpParameters() - If rdoTest.Checked Or rdoEstimate.Checked Then - grpParameters.Visible = True - Else - grpParameters.Visible = False - End If - End Sub - Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged SetTestEstimateBaseFunction() - VisibilityOfgrpParameters() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index d16505d7813..b3272cd4771 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -49,7 +49,6 @@ Partial Class dlgOneVarFitModel Me.lblTrim = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() - Me.grpParameters = New System.Windows.Forms.GroupBox() Me.lblDifferenceInMean = New System.Windows.Forms.Label() Me.ucrNudConfidenceLevel = New instat.ucrNud() Me.ucrNudHypothesis = New instat.ucrNud() @@ -65,15 +64,15 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.grpParameters.SuspendLayout() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(249, 47) + Me.LblVariable.Location = New System.Drawing.Point(332, 58) + Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(48, 13) + Me.LblVariable.Size = New System.Drawing.Size(64, 17) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' @@ -84,9 +83,10 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(154, 11) + Me.rdoTest.Location = New System.Drawing.Point(205, 14) + Me.rdoTest.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(122, 28) + Me.rdoTest.Size = New System.Drawing.Size(163, 34) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -99,9 +99,10 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) + Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) + Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) + Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -109,18 +110,20 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 323) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 398) + Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 298) + Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 367) + Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) + Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -132,9 +135,10 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) + Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) + Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) + Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -143,85 +147,71 @@ Partial Class dlgOneVarFitModel 'lblTests ' Me.lblTests.AutoSize = True - Me.lblTests.Location = New System.Drawing.Point(12, 256) + Me.lblTests.Location = New System.Drawing.Point(16, 315) + Me.lblTests.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTests.Name = "lblTests" - Me.lblTests.Size = New System.Drawing.Size(31, 13) + Me.lblTests.Size = New System.Drawing.Size(40, 17) Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(12, 256) + Me.lblEstimate.Location = New System.Drawing.Point(16, 315) + Me.lblEstimate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.Size = New System.Drawing.Size(66, 17) Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(5, 23) + Me.lblTrim.Location = New System.Drawing.Point(332, 155) + Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" - Me.lblTrim.Size = New System.Drawing.Size(30, 13) + Me.lblTrim.Size = New System.Drawing.Size(40, 17) Me.lblTrim.TabIndex = 51 Me.lblTrim.Text = "Trim:" ' 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(6, 105) - Me.lblMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblMethod.Location = New System.Drawing.Point(332, 192) Me.lblMethod.Name = "lblMethod" - Me.lblMethod.Size = New System.Drawing.Size(46, 13) + Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 Me.lblMethod.Text = "Method:" ' 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(5, 47) - Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(330, 226) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) + Me.lblConfidenceLevel.Size = New System.Drawing.Size(121, 17) Me.lblConfidenceLevel.TabIndex = 56 Me.lblConfidenceLevel.Text = "Confidence Level:" ' - 'grpParameters - ' - Me.grpParameters.Controls.Add(Me.lblDifferenceInMean) - Me.grpParameters.Controls.Add(Me.ucrNudConfidenceLevel) - Me.grpParameters.Controls.Add(Me.ucrNudHypothesis) - Me.grpParameters.Controls.Add(Me.ucrNudTrim) - Me.grpParameters.Controls.Add(Me.lblMethod) - Me.grpParameters.Controls.Add(Me.lblConfidenceLevel) - Me.grpParameters.Controls.Add(Me.ucrInputMethod) - Me.grpParameters.Controls.Add(Me.lblTrim) - Me.grpParameters.Location = New System.Drawing.Point(263, 122) - Me.grpParameters.Name = "grpParameters" - Me.grpParameters.Size = New System.Drawing.Size(183, 137) - Me.grpParameters.TabIndex = 57 - Me.grpParameters.TabStop = False - Me.grpParameters.Text = "Parameters" - ' 'lblDifferenceInMean ' Me.lblDifferenceInMean.AutoSize = True - Me.lblDifferenceInMean.Location = New System.Drawing.Point(5, 75) + Me.lblDifferenceInMean.Location = New System.Drawing.Point(330, 258) + Me.lblDifferenceInMean.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblDifferenceInMean.Name = "lblDifferenceInMean" - Me.lblDifferenceInMean.Size = New System.Drawing.Size(101, 13) + Me.lblDifferenceInMean.Size = New System.Drawing.Size(102, 17) Me.lblDifferenceInMean.TabIndex = 59 - Me.lblDifferenceInMean.Text = "Difference In Mean:" + Me.lblDifferenceInMean.Text = "NullHypothesis" ' 'ucrNudConfidenceLevel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(112, 43) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(461, 222) + Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" - Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(50, 20) + Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(67, 25) Me.ucrNudConfidenceLevel.TabIndex = 58 Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -229,11 +219,12 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudHypothesis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHypothesis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHypothesis.Location = New System.Drawing.Point(113, 72) + Me.ucrNudHypothesis.Location = New System.Drawing.Point(461, 255) + Me.ucrNudHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudHypothesis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudHypothesis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHypothesis.Name = "ucrNudHypothesis" - Me.ucrNudHypothesis.Size = New System.Drawing.Size(50, 20) + Me.ucrNudHypothesis.Size = New System.Drawing.Size(67, 25) Me.ucrNudHypothesis.TabIndex = 57 Me.ucrNudHypothesis.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -241,12 +232,12 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(112, 16) - Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(5) + Me.ucrNudTrim.Location = New System.Drawing.Point(383, 151) + Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Name = "ucrNudTrim" - Me.ucrNudTrim.Size = New System.Drawing.Size(50, 20) + Me.ucrNudTrim.Size = New System.Drawing.Size(67, 25) Me.ucrNudTrim.TabIndex = 50 Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -254,82 +245,82 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(81, 100) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputMethod.Location = New System.Drawing.Point(414, 188) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(81, 21) + Me.ucrInputMethod.Size = New System.Drawing.Size(108, 26) Me.ucrInputMethod.TabIndex = 53 ' 'ucrInputComboEstimate ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(88, 310) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboEstimate.TabIndex = 48 ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False - Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboTests.Location = New System.Drawing.Point(60, 310) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputComboTests.Name = "ucrInputComboTests" - Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) + Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboTests.TabIndex = 46 ' 'ucrOmmitMissing ' Me.ucrOmmitMissing.Checked = False - Me.ucrOmmitMissing.Location = New System.Drawing.Point(404, 94) - Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrOmmitMissing.Location = New System.Drawing.Point(333, 292) + Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrOmmitMissing.Name = "ucrOmmitMissing" - Me.ucrOmmitMissing.Size = New System.Drawing.Size(120, 20) + Me.ucrOmmitMissing.Size = New System.Drawing.Size(160, 25) Me.ucrOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(242, 94) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(323, 116) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(10, 323) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveModel.Location = New System.Drawing.Point(13, 398) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) + Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -339,29 +330,36 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 353) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) + Me.ucrBase.Location = New System.Drawing.Point(13, 434) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(521, 420) - Me.Controls.Add(Me.grpParameters) + Me.ClientSize = New System.Drawing.Size(645, 517) + Me.Controls.Add(Me.ucrNudTrim) + Me.Controls.Add(Me.ucrNudConfidenceLevel) + Me.Controls.Add(Me.lblTrim) + Me.Controls.Add(Me.lblDifferenceInMean) + Me.Controls.Add(Me.ucrNudHypothesis) + Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) Me.Controls.Add(Me.lblTests) + Me.Controls.Add(Me.lblMethod) + Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputComboTests) Me.Controls.Add(Me.rdoEstimate) Me.Controls.Add(Me.ucrOmmitMissing) @@ -378,13 +376,12 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "One Variable Fit Model" - Me.grpParameters.ResumeLayout(False) - Me.grpParameters.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -414,7 +411,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblMethod As Label Friend WithEvents ucrInputMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label - Friend WithEvents grpParameters As GroupBox Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrNudHypothesis As ucrNud Friend WithEvents lblDifferenceInMean As Label From 2b7c4e67acd46816066e1f204263d8b152b544c2 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 9 Jul 2020 11:53:37 +0300 Subject: [PATCH 070/172] Added more default parameters to the tests functions --- instat/dlgOneVarFitModel.vb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 497b631cc51..f339d4d9e45 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -95,10 +95,11 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) - ucrNudConfidenceLevel.DecimalPlaces = 3 + ucrNudConfidenceLevel.DecimalPlaces = 2 ucrNudConfidenceLevel.Minimum = 0.8 - ucrNudConfidenceLevel.Maximum = 0.999 - ucrNudConfidenceLevel.Increment = 0.001 + ucrNudConfidenceLevel.Maximum = 1.0 + ucrNudConfidenceLevel.Increment = 0.01 + ucrNudHypothesis.SetParameter(New RParameter("mu")) @@ -236,6 +237,8 @@ Public Class dlgOneVarFitModel 'Test clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") + clsBionomialFunction.AddParameter("n", "", iPosition:=1) + clsBionomialFunction.AddParameter("p", "0.5", iPosition:=2) clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") @@ -345,15 +348,15 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=1) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) - ucrNudConfidenceLevel.SetRCode(clsTtestFunction) - ucrNudHypothesis.SetRCode(clsTtestFunction) + ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) + ucrNudHypothesis.SetRCode(clsTtestFunction, bReset) ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub From 141b468bc760b576588acca26975f1af0c03bc58 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 9 Jul 2020 15:49:11 +0300 Subject: [PATCH 071/172] Added Additional code Parameter Pair for tests controls --- instat/dlgOneVarFitModel.vb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f339d4d9e45..3e9fc5f4ff5 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -96,12 +96,14 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) ucrNudConfidenceLevel.DecimalPlaces = 2 - ucrNudConfidenceLevel.Minimum = 0.8 - ucrNudConfidenceLevel.Maximum = 1.0 - ucrNudConfidenceLevel.Increment = 0.01 + ucrNudConfidenceLevel.Increment = 0.05 + ucrNudConfidenceLevel.SetMinMax(0, 1) ucrNudHypothesis.SetParameter(New RParameter("mu")) + ucrNudHypothesis.Increment = 1 + ucrNudHypothesis.DecimalPlaces = 2 + ucrNudHypothesis.SetMinMax(0.00, Integer.MaxValue) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -242,6 +244,8 @@ Public Class dlgOneVarFitModel clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") + clsProportionFunction.AddParameter("n", "", iPosition:=1) + clsProportionFunction.AddParameter("n", "", iPosition:=2) clsSignTestFunction.SetPackageName("DescTools") clsSignTestFunction.SetRCommand("SignTest") @@ -349,6 +353,10 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) + ucrNudHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), 3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), 3) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From b8321f62a49292050b7edf25fb9d6e46594d82da Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 9 Jul 2020 16:21:29 +0300 Subject: [PATCH 072/172] More Additional code Parameter Pair --- instat/dlgOneVarFitModel.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 3e9fc5f4ff5..68c5a07ba69 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -97,7 +97,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) ucrNudConfidenceLevel.DecimalPlaces = 2 ucrNudConfidenceLevel.Increment = 0.05 - ucrNudConfidenceLevel.SetMinMax(0, 1) + ucrNudHypothesis.SetParameter(New RParameter("mu")) @@ -354,17 +354,17 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) - ucrNudHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), 3) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), 3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) + ucrNudHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) - ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) - ucrNudHypothesis.SetRCode(clsTtestFunction, bReset) + ucrNudConfidenceLevel.SetRCode(clsZTestFunction, bReset) + ucrNudHypothesis.SetRCode(clsZTestFunction, bReset) ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub From 47ac9a234877ee534eb5470d0316c2afce9ee081 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 9 Jul 2020 17:23:30 +0300 Subject: [PATCH 073/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 11 ++++- instat/dlgOneVarFitModel2.Designer.vb | 66 +++++++++++++++++++-------- 2 files changed, 57 insertions(+), 20 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 68c5a07ba69..60213f610e2 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -105,6 +105,11 @@ Public Class dlgOneVarFitModel ucrNudHypothesis.DecimalPlaces = 2 ucrNudHypothesis.SetMinMax(0.00, Integer.MaxValue) + ucrNudHypProportion.SetParameter(New RParameter("p")) + ucrNudHypProportion.Maximum = 1 + ucrNudHypProportion.DecimalPlaces = 2 + ucrNudHypProportion.Increment = 0.01 + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -114,12 +119,14 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHypProportion, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) ucrNudHypothesis.SetLinkedDisplayControl(lblDifferenceInMean) ucrInputMethod.SetLinkedDisplayControl(lblMethod) + ucrNudHypProportion.SetLinkedDisplayControl(lblHypothesis) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -240,7 +247,6 @@ Public Class dlgOneVarFitModel clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") clsBionomialFunction.AddParameter("n", "", iPosition:=1) - clsBionomialFunction.AddParameter("p", "0.5", iPosition:=2) clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") @@ -356,6 +362,9 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) ucrNudHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=4) + ucrNudHypProportion.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("p", 2), iAdditionalPairNo:=1) + ucrNudHypProportion.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("p", 2), iAdditionalPairNo:=2) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index b3272cd4771..ac0f13ecb0d 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -64,6 +64,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrNudHypProportion = New instat.ucrNud() + Me.lblHypothesis = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -84,7 +86,7 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoTest.Location = New System.Drawing.Point(205, 14) - Me.rdoTest.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoTest.Margin = New System.Windows.Forms.Padding(4) Me.rdoTest.Name = "rdoTest" Me.rdoTest.Size = New System.Drawing.Size(163, 34) Me.rdoTest.TabIndex = 41 @@ -100,7 +102,7 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) - Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4) Me.rdoGeneralCase.Name = "rdoGeneralCase" Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) Me.rdoGeneralCase.TabIndex = 40 @@ -111,7 +113,7 @@ Partial Class dlgOneVarFitModel 'cmdDisplayOptions ' Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 398) - Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) Me.cmdDisplayOptions.TabIndex = 44 @@ -121,7 +123,7 @@ Partial Class dlgOneVarFitModel 'cmdFittingOptions ' Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 367) - Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4) Me.cmdFittingOptions.Name = "cmdFittingOptions" Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) Me.cmdFittingOptions.TabIndex = 43 @@ -136,7 +138,7 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) - Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4) Me.rdoEstimate.Name = "rdoEstimate" Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) Me.rdoEstimate.TabIndex = 45 @@ -167,7 +169,7 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(332, 155) + Me.lblTrim.Location = New System.Drawing.Point(546, 126) Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(40, 17) @@ -177,7 +179,7 @@ Partial Class dlgOneVarFitModel 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(332, 192) + Me.lblMethod.Location = New System.Drawing.Point(539, 168) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 @@ -186,7 +188,7 @@ Partial Class dlgOneVarFitModel 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(330, 226) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(317, 154) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(121, 17) Me.lblConfidenceLevel.TabIndex = 56 @@ -195,18 +197,18 @@ Partial Class dlgOneVarFitModel 'lblDifferenceInMean ' Me.lblDifferenceInMean.AutoSize = True - Me.lblDifferenceInMean.Location = New System.Drawing.Point(330, 258) + Me.lblDifferenceInMean.Location = New System.Drawing.Point(317, 186) Me.lblDifferenceInMean.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblDifferenceInMean.Name = "lblDifferenceInMean" - Me.lblDifferenceInMean.Size = New System.Drawing.Size(102, 17) + Me.lblDifferenceInMean.Size = New System.Drawing.Size(106, 17) Me.lblDifferenceInMean.TabIndex = 59 - Me.lblDifferenceInMean.Text = "NullHypothesis" + Me.lblDifferenceInMean.Text = "NullHypothesis:" ' 'ucrNudConfidenceLevel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(461, 222) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(448, 150) Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -219,7 +221,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudHypothesis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHypothesis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHypothesis.Location = New System.Drawing.Point(461, 255) + Me.ucrNudHypothesis.Location = New System.Drawing.Point(448, 183) Me.ucrNudHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudHypothesis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudHypothesis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -232,7 +234,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(383, 151) + Me.ucrNudTrim.Location = New System.Drawing.Point(608, 126) Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -245,10 +247,10 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(414, 188) + Me.ucrInputMethod.Location = New System.Drawing.Point(608, 159) Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(108, 26) + Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) Me.ucrInputMethod.TabIndex = 53 ' 'ucrInputComboEstimate @@ -339,16 +341,40 @@ Partial Class dlgOneVarFitModel 'ucrBase ' Me.ucrBase.Location = New System.Drawing.Point(13, 434) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' + 'ucrNudHypProportion + ' + Me.ucrNudHypProportion.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHypProportion.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHypProportion.Location = New System.Drawing.Point(448, 211) + Me.ucrNudHypProportion.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrNudHypProportion.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHypProportion.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHypProportion.Name = "ucrNudHypProportion" + Me.ucrNudHypProportion.Size = New System.Drawing.Size(67, 25) + Me.ucrNudHypProportion.TabIndex = 60 + Me.ucrNudHypProportion.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblHypothesis + ' + Me.lblHypothesis.AutoSize = True + Me.lblHypothesis.Location = New System.Drawing.Point(327, 213) + Me.lblHypothesis.Name = "lblHypothesis" + Me.lblHypothesis.Size = New System.Drawing.Size(82, 17) + Me.lblHypothesis.TabIndex = 61 + Me.lblHypothesis.Text = "Hypothesis:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(645, 517) + Me.ClientSize = New System.Drawing.Size(695, 517) + Me.Controls.Add(Me.lblHypothesis) + Me.Controls.Add(Me.ucrNudHypProportion) Me.Controls.Add(Me.ucrNudTrim) Me.Controls.Add(Me.ucrNudConfidenceLevel) Me.Controls.Add(Me.lblTrim) @@ -376,7 +402,7 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" @@ -414,4 +440,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrNudHypothesis As ucrNud Friend WithEvents lblDifferenceInMean As Label + Friend WithEvents lblHypothesis As Label + Friend WithEvents ucrNudHypProportion As ucrNud End Class \ No newline at end of file From 7c346690c826bf9054a7c39956e298f363cc41d0 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 13 Jul 2020 09:43:03 +0300 Subject: [PATCH 074/172] Setting more parameters for tests functions --- instat/dlgOneVarFitModel.vb | 26 +++------ instat/dlgOneVarFitModel2.Designer.vb | 76 ++++++++------------------- 2 files changed, 30 insertions(+), 72 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 60213f610e2..4e7a4621db9 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -100,16 +100,8 @@ Public Class dlgOneVarFitModel - ucrNudHypothesis.SetParameter(New RParameter("mu")) - ucrNudHypothesis.Increment = 1 - ucrNudHypothesis.DecimalPlaces = 2 - ucrNudHypothesis.SetMinMax(0.00, Integer.MaxValue) - - ucrNudHypProportion.SetParameter(New RParameter("p")) - ucrNudHypProportion.Maximum = 1 - ucrNudHypProportion.DecimalPlaces = 2 - ucrNudHypProportion.Increment = 0.01 - + ucrInputNullHypothesis.SetParameter(New RParameter("mu", 1)) + ucrInputNullHypothesis.SetText("Null Hypothesis") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -117,16 +109,15 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudHypProportion, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) + ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudTrim.SetLinkedDisplayControl(lblTrim) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) - ucrNudHypothesis.SetLinkedDisplayControl(lblDifferenceInMean) + ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) ucrInputMethod.SetLinkedDisplayControl(lblMethod) - ucrNudHypProportion.SetLinkedDisplayControl(lblHypothesis) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -361,11 +352,8 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) - ucrNudHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=4) - ucrNudHypProportion.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("p", 2), iAdditionalPairNo:=1) - ucrNudHypProportion.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("p", 2), iAdditionalPairNo:=2) - ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) @@ -373,7 +361,7 @@ Public Class dlgOneVarFitModel ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsZTestFunction, bReset) - ucrNudHypothesis.SetRCode(clsZTestFunction, bReset) + ucrInputNullHypothesis.SetRCode(clsZTestFunction, bReset) ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index ac0f13ecb0d..c1f3ec42d16 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -49,9 +49,7 @@ Partial Class dlgOneVarFitModel Me.lblTrim = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() - Me.lblDifferenceInMean = New System.Windows.Forms.Label() Me.ucrNudConfidenceLevel = New instat.ucrNud() - Me.ucrNudHypothesis = New instat.ucrNud() Me.ucrNudTrim = New instat.ucrNud() Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() @@ -64,8 +62,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrNudHypProportion = New instat.ucrNud() - Me.lblHypothesis = New System.Windows.Forms.Label() + Me.lblNullHypothesis = New System.Windows.Forms.Label() + Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() Me.SuspendLayout() ' 'LblVariable @@ -194,16 +192,6 @@ Partial Class dlgOneVarFitModel Me.lblConfidenceLevel.TabIndex = 56 Me.lblConfidenceLevel.Text = "Confidence Level:" ' - 'lblDifferenceInMean - ' - Me.lblDifferenceInMean.AutoSize = True - Me.lblDifferenceInMean.Location = New System.Drawing.Point(317, 186) - Me.lblDifferenceInMean.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblDifferenceInMean.Name = "lblDifferenceInMean" - Me.lblDifferenceInMean.Size = New System.Drawing.Size(106, 17) - Me.lblDifferenceInMean.TabIndex = 59 - Me.lblDifferenceInMean.Text = "NullHypothesis:" - ' 'ucrNudConfidenceLevel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -217,19 +205,6 @@ Partial Class dlgOneVarFitModel Me.ucrNudConfidenceLevel.TabIndex = 58 Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrNudHypothesis - ' - Me.ucrNudHypothesis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHypothesis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHypothesis.Location = New System.Drawing.Point(448, 183) - Me.ucrNudHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudHypothesis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudHypothesis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHypothesis.Name = "ucrNudHypothesis" - Me.ucrNudHypothesis.Size = New System.Drawing.Size(67, 25) - Me.ucrNudHypothesis.TabIndex = 57 - Me.ucrNudHypothesis.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrNudTrim ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -346,40 +321,37 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' - 'ucrNudHypProportion + 'lblNullHypothesis ' - Me.ucrNudHypProportion.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHypProportion.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHypProportion.Location = New System.Drawing.Point(448, 211) - Me.ucrNudHypProportion.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) - Me.ucrNudHypProportion.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudHypProportion.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHypProportion.Name = "ucrNudHypProportion" - Me.ucrNudHypProportion.Size = New System.Drawing.Size(67, 25) - Me.ucrNudHypProportion.TabIndex = 60 - Me.ucrNudHypProportion.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.lblNullHypothesis.AutoSize = True + Me.lblNullHypothesis.Location = New System.Drawing.Point(317, 200) + Me.lblNullHypothesis.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblNullHypothesis.Name = "lblNullHypothesis" + Me.lblNullHypothesis.Size = New System.Drawing.Size(110, 17) + Me.lblNullHypothesis.TabIndex = 59 + Me.lblNullHypothesis.Text = "Null Hypothesis:" ' - 'lblHypothesis + 'ucrInputNullHypothesis ' - Me.lblHypothesis.AutoSize = True - Me.lblHypothesis.Location = New System.Drawing.Point(327, 213) - Me.lblHypothesis.Name = "lblHypothesis" - Me.lblHypothesis.Size = New System.Drawing.Size(82, 17) - Me.lblHypothesis.TabIndex = 61 - Me.lblHypothesis.Text = "Hypothesis:" + Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True + Me.ucrInputNullHypothesis.IsMultiline = False + Me.ucrInputNullHypothesis.IsReadOnly = False + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(438, 199) + Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" + Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(112, 26) + Me.ucrInputNullHypothesis.TabIndex = 60 ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(695, 517) - Me.Controls.Add(Me.lblHypothesis) - Me.Controls.Add(Me.ucrNudHypProportion) + Me.Controls.Add(Me.ucrInputNullHypothesis) Me.Controls.Add(Me.ucrNudTrim) Me.Controls.Add(Me.ucrNudConfidenceLevel) Me.Controls.Add(Me.lblTrim) - Me.Controls.Add(Me.lblDifferenceInMean) - Me.Controls.Add(Me.ucrNudHypothesis) + Me.Controls.Add(Me.lblNullHypothesis) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) @@ -438,8 +410,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrNudConfidenceLevel As ucrNud - Friend WithEvents ucrNudHypothesis As ucrNud - Friend WithEvents lblDifferenceInMean As Label - Friend WithEvents lblHypothesis As Label - Friend WithEvents ucrNudHypProportion As ucrNud + Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox + Friend WithEvents lblNullHypothesis As Label End Class \ No newline at end of file From 0e869db8b4a41744c4af6e3dcc30f5c44c532328 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 13 Jul 2020 12:38:27 +0300 Subject: [PATCH 075/172] Added Additional code parameter pair for more tests functions --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4e7a4621db9..b47cf6acac3 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -354,6 +354,10 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=4) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 4eb2085b0396310d08b402db60c2dc1af6b7d3f5 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 13 Jul 2020 12:50:12 +0300 Subject: [PATCH 076/172] Addition of more tests functions --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b47cf6acac3..a2b2030e0d5 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -262,6 +262,7 @@ Public Class dlgOneVarFitModel clsBrFunction.SetPackageName("trend") clsBrFunction.SetRCommand("br.test") + clsBrFunction.AddParameter("mu", "20000", iPosition:=1) clsRunsFunction.SetPackageName("DescTools") clsRunsFunction.SetRCommand("RunsTest") @@ -359,6 +360,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) From bc26fc1ba90209ed1fbaa4cc0d7c490fc34dfe3f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 13 Jul 2020 12:58:49 +0300 Subject: [PATCH 077/172] More additional code parameter pair for tests functions --- instat/dlgOneVarFitModel.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a2b2030e0d5..ecab3efbda2 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -266,6 +266,7 @@ Public Class dlgOneVarFitModel clsRunsFunction.SetPackageName("DescTools") clsRunsFunction.SetRCommand("RunsTest") + clsRunsFunction.AddParameter("na.rm", "True", iPosition:=1) clsSenFunction.SetPackageName("trend") clsSenFunction.SetRCommand("sens.slope") @@ -359,7 +360,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=7) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 18bfbb2b95c779affaef4f3f9511269f3105e67e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 13 Jul 2020 13:59:25 +0300 Subject: [PATCH 078/172] Adding more additiona code parameter pair for tests functions --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ecab3efbda2..b761f66b8df 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -273,6 +273,7 @@ Public Class dlgOneVarFitModel clsSerialCorrFunction.SetPackageName("EnvStats") clsSerialCorrFunction.SetRCommand("serialCorrelationTest") + clsSerialCorrFunction.AddParameter("test", Chr(34) & "rank.von.Neumann" & Chr(34), iPosition:=1) clsSnhFunction.SetPackageName("trend") clsSnhFunction.SetRCommand("snh.test") @@ -361,6 +362,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=7) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 6dcb26ce0f7e579ff54eac09071ba3d40464af1a Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 13 Jul 2020 21:30:37 +0300 Subject: [PATCH 079/172] More additon --- instat/dlgOneVarFitModel.vb | 2 + instat/dlgOneVarFitModel2.Designer.vb | 88 +++++++++++++-------------- 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b761f66b8df..fa9e53199c3 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -277,6 +277,7 @@ Public Class dlgOneVarFitModel clsSnhFunction.SetPackageName("trend") clsSnhFunction.SetRCommand("snh.test") + clsSfFunction.AddParameter("m", "20000", iPosition:=2) clsAdFunction.SetPackageName("nortest") clsAdFunction.SetRCommand("ad.test") @@ -363,6 +364,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=7) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=4) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index c1f3ec42d16..27e1deeae6c 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -49,10 +49,12 @@ Partial Class dlgOneVarFitModel Me.lblTrim = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() - Me.ucrNudConfidenceLevel = New instat.ucrNud() + Me.lblNullHypothesis = New System.Windows.Forms.Label() + Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() Me.ucrNudTrim = New instat.ucrNud() - Me.ucrInputMethod = New instat.ucrInputComboBox() + Me.ucrNudConfidenceLevel = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() + Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() Me.ucrOmmitMissing = New instat.ucrCheck() Me.ucrChkConvertVariate = New instat.ucrCheck() @@ -62,8 +64,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblNullHypothesis = New System.Windows.Forms.Label() - Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() Me.SuspendLayout() ' 'LblVariable @@ -192,18 +192,26 @@ Partial Class dlgOneVarFitModel Me.lblConfidenceLevel.TabIndex = 56 Me.lblConfidenceLevel.Text = "Confidence Level:" ' - 'ucrNudConfidenceLevel + 'lblNullHypothesis ' - Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(448, 150) - Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" - Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(67, 25) - Me.ucrNudConfidenceLevel.TabIndex = 58 - Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.lblNullHypothesis.AutoSize = True + Me.lblNullHypothesis.Location = New System.Drawing.Point(317, 186) + Me.lblNullHypothesis.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblNullHypothesis.Name = "lblNullHypothesis" + Me.lblNullHypothesis.Size = New System.Drawing.Size(110, 17) + Me.lblNullHypothesis.TabIndex = 59 + Me.lblNullHypothesis.Text = "Null Hypothesis:" + ' + 'ucrInputNullHypothesis + ' + Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True + Me.ucrInputNullHypothesis.IsMultiline = False + Me.ucrInputNullHypothesis.IsReadOnly = False + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(448, 177) + Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" + Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(67, 26) + Me.ucrInputNullHypothesis.TabIndex = 60 ' 'ucrNudTrim ' @@ -218,15 +226,18 @@ Partial Class dlgOneVarFitModel Me.ucrNudTrim.TabIndex = 50 Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrInputMethod + 'ucrNudConfidenceLevel ' - Me.ucrInputMethod.AddQuotesIfUnrecognised = True - Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(608, 159) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) - Me.ucrInputMethod.TabIndex = 53 + Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(448, 150) + Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" + Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(67, 25) + Me.ucrNudConfidenceLevel.TabIndex = 58 + Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrInputComboEstimate ' @@ -238,6 +249,16 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboEstimate.TabIndex = 48 ' + 'ucrInputMethod + ' + Me.ucrInputMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMethod.IsReadOnly = False + Me.ucrInputMethod.Location = New System.Drawing.Point(608, 159) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputMethod.Name = "ucrInputMethod" + Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) + Me.ucrInputMethod.TabIndex = 53 + ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True @@ -321,27 +342,6 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' - 'lblNullHypothesis - ' - Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(317, 200) - Me.lblNullHypothesis.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblNullHypothesis.Name = "lblNullHypothesis" - Me.lblNullHypothesis.Size = New System.Drawing.Size(110, 17) - Me.lblNullHypothesis.TabIndex = 59 - Me.lblNullHypothesis.Text = "Null Hypothesis:" - ' - 'ucrInputNullHypothesis - ' - Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True - Me.ucrInputNullHypothesis.IsMultiline = False - Me.ucrInputNullHypothesis.IsReadOnly = False - Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(438, 199) - Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" - Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(112, 26) - Me.ucrInputNullHypothesis.TabIndex = 60 - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) From 62cbb103c41f0e2e31b965e5cfa7ae834146339f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 11:42:25 +0300 Subject: [PATCH 080/172] Implementing tests functions --- instat/dlgOneVarFitModel.vb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index fa9e53199c3..67e7b617da8 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -101,7 +101,10 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetParameter(New RParameter("mu", 1)) + ucrInputNullHypothesis.SetParameterValue(0) ucrInputNullHypothesis.SetText("Null Hypothesis") + ucrInputNullHypothesis.SetValidationTypeAsNumeric() + ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -109,7 +112,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") ucrInputComboTests.SetLinkedDisplayControl(lblTests) @@ -249,6 +252,7 @@ Public Class dlgOneVarFitModel clsTtestFunction.SetPackageName("mosaic") clsTtestFunction.SetRCommand("t.test") + clsTtestFunction.AddParameter("mu", 0) clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") @@ -356,7 +360,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + 'ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=4) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) @@ -372,7 +376,7 @@ Public Class dlgOneVarFitModel ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsZTestFunction, bReset) - ucrInputNullHypothesis.SetRCode(clsZTestFunction, bReset) + ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub From 5bcfffa3050f6eeeb86671e76d3796ea1c343a7d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 11:53:24 +0300 Subject: [PATCH 081/172] Implementing binomial test --- instat/dlgOneVarFitModel.vb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 67e7b617da8..b117bd51335 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -104,7 +104,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetParameterValue(0) ucrInputNullHypothesis.SetText("Null Hypothesis") ucrInputNullHypothesis.SetValidationTypeAsNumeric() - ucrInputNullHypothesis.AddQuotesIfUnrecognised = False + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") @@ -241,6 +241,7 @@ Public Class dlgOneVarFitModel clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") clsBionomialFunction.AddParameter("n", "", iPosition:=1) + clsBionomialFunction.AddParameter("p", "0.5", iPosition:=2) clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") @@ -252,7 +253,7 @@ Public Class dlgOneVarFitModel clsTtestFunction.SetPackageName("mosaic") clsTtestFunction.SetRCommand("t.test") - clsTtestFunction.AddParameter("mu", 0) + clsTtestFunction.AddParameter("mu", 1) clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") @@ -360,7 +361,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) - 'ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("p", 2), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=4) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From 9be936d3296e1468cb6693a726db8da02aceeb4b Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 12:10:16 +0300 Subject: [PATCH 082/172] Implementing proportion test --- instat/dlgOneVarFitModel.vb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b117bd51335..b849234cf24 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -246,7 +246,7 @@ Public Class dlgOneVarFitModel clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") clsProportionFunction.AddParameter("n", "", iPosition:=1) - clsProportionFunction.AddParameter("n", "", iPosition:=2) + clsProportionFunction.AddParameter("p", "0.5", iPosition:=2) clsSignTestFunction.SetPackageName("DescTools") clsSignTestFunction.SetRCommand("SignTest") @@ -361,15 +361,15 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("p", 2), iAdditionalPairNo:=1) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=4) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=7) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=4) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("p", 2), iAdditionalPairNo:=2) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=4) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=5) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 49c29eb89684a3f8f3e78d245964e33b24cd1dd2 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 14:35:25 +0300 Subject: [PATCH 083/172] Implementing test for proportion --- instat/dlgOneVarFitModel.vb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b849234cf24..21415c3c83f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -112,7 +112,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") ucrInputComboTests.SetLinkedDisplayControl(lblTests) @@ -254,6 +254,7 @@ Public Class dlgOneVarFitModel clsTtestFunction.SetPackageName("mosaic") clsTtestFunction.SetRCommand("t.test") clsTtestFunction.AddParameter("mu", 1) + clsTtestFunction.AddParameter("conf.level", "0.95", iPosition:=2) clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") @@ -261,6 +262,7 @@ Public Class dlgOneVarFitModel clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") + clsZTestFunction.AddParameter("mu", 2) clsBartelFunction.SetPackageName("DescTools") clsBartelFunction.SetRCommand("BartelsRankTest") @@ -360,23 +362,21 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("p", 2), iAdditionalPairNo:=1) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("p", 2), iAdditionalPairNo:=2) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=4) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=5) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) - ucrNudConfidenceLevel.SetRCode(clsZTestFunction, bReset) + ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 57f8fef93ecce5859fd4df1a6e2d359a0f1bbf4b Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 14:45:36 +0300 Subject: [PATCH 084/172] Implementing wilcoxon test --- instat/dlgOneVarFitModel.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 21415c3c83f..f0030a23578 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -258,6 +258,7 @@ Public Class dlgOneVarFitModel clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") + clsWilcoxonFunction.AddParameter("mu", 1) clsZTestFunction.SetPackageName("DescTools") @@ -368,8 +369,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=3) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 5c6388adea19bd21dcabec3fee9adceccfcea99c Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 14:47:41 +0300 Subject: [PATCH 085/172] Implementing Z test --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f0030a23578..5640778e086 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -369,7 +369,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 5048193391c08036e857f295a495e93e9462dfb8 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 15:13:26 +0300 Subject: [PATCH 086/172] Implementing more tests --- instat/dlgOneVarFitModel.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5640778e086..cb6686af3ae 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -253,17 +253,17 @@ Public Class dlgOneVarFitModel clsTtestFunction.SetPackageName("mosaic") clsTtestFunction.SetRCommand("t.test") - clsTtestFunction.AddParameter("mu", 1) + clsTtestFunction.AddParameter("mu", "0", iPosition:=1) clsTtestFunction.AddParameter("conf.level", "0.95", iPosition:=2) clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") - clsWilcoxonFunction.AddParameter("mu", 1) + clsWilcoxonFunction.AddParameter("mu", "0", iPosition:=1) clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") - clsZTestFunction.AddParameter("mu", 2) + clsZTestFunction.AddParameter("mu", "0", iPosition:=2) clsBartelFunction.SetPackageName("DescTools") clsBartelFunction.SetRCommand("BartelsRankTest") From b426fef062b662571ab98da99b616d87ba7687e9 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:10:49 +0300 Subject: [PATCH 087/172] Added an AdditionalRcode to the ucrSaveModel for the tests functions --- instat/dlgOneVarFitModel.vb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index cb6686af3ae..3d002bd7e74 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -270,7 +270,7 @@ Public Class dlgOneVarFitModel clsBrFunction.SetPackageName("trend") clsBrFunction.SetRCommand("br.test") - clsBrFunction.AddParameter("mu", "20000", iPosition:=1) + clsBrFunction.AddParameter("m", "20000", iPosition:=1) clsRunsFunction.SetPackageName("DescTools") clsRunsFunction.SetRCommand("RunsTest") @@ -371,6 +371,9 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) + ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) + ucrSaveModel.AddAdditionalRCode(clsProportionFunction, iAdditionalPairNo:=2) + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) @@ -379,7 +382,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) - ucrSaveModel.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub Private Sub TestOKEnabled() From af034df54d128a2487f29f09386a41296acebf9b Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:14:45 +0300 Subject: [PATCH 088/172] Add AdditonalRcode to the ucrSaveModel control --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 3d002bd7e74..aade4caef7a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -373,6 +373,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) ucrSaveModel.AddAdditionalRCode(clsProportionFunction, iAdditionalPairNo:=2) + ucrSaveModel.AddAdditionalRCode(clsSignTestFunction, iAdditionalPairNo:=3) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 6c6bf4a14eb2f20d9b2b23a0b670852fd903987e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:18:15 +0300 Subject: [PATCH 089/172] Add Additional Rcode to the ucrSaveModel control --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index aade4caef7a..5530d3b349a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -374,6 +374,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) ucrSaveModel.AddAdditionalRCode(clsProportionFunction, iAdditionalPairNo:=2) ucrSaveModel.AddAdditionalRCode(clsSignTestFunction, iAdditionalPairNo:=3) + ucrSaveModel.AddAdditionalRCode(clsTtestFunction, iAdditionalPairNo:=4) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From da9822aa5e0dba75c0000319709cdd356b79c20d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:20:13 +0300 Subject: [PATCH 090/172] Added Additiona Rcode to the ucrSave model --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5530d3b349a..40ecf721c8c 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -375,6 +375,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsProportionFunction, iAdditionalPairNo:=2) ucrSaveModel.AddAdditionalRCode(clsSignTestFunction, iAdditionalPairNo:=3) ucrSaveModel.AddAdditionalRCode(clsTtestFunction, iAdditionalPairNo:=4) + ucrSaveModel.AddAdditionalRCode(clsZTestFunction, iAdditionalPairNo:=5) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From ad576873fefc03f496bfd6fba8559a5ef1bf14c1 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:23:52 +0300 Subject: [PATCH 091/172] Added an additional Rcode structure for the ucrSave model --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 40ecf721c8c..ddb2b937051 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -376,6 +376,8 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsSignTestFunction, iAdditionalPairNo:=3) ucrSaveModel.AddAdditionalRCode(clsTtestFunction, iAdditionalPairNo:=4) ucrSaveModel.AddAdditionalRCode(clsZTestFunction, iAdditionalPairNo:=5) + ucrSaveModel.AddAdditionalRCode(clsBartelFunction, iAdditionalPairNo:=6) + ucrSaveModel.AddAdditionalRCode(clsBrFunction, iAdditionalPairNo:=7) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From e3e9a8de21abe3986182ae5e5769e79332c3ee9d Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:26:49 +0300 Subject: [PATCH 092/172] Added an additional Rcode to ucrSave model control --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ddb2b937051..ce98e58bfcf 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -378,6 +378,9 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsZTestFunction, iAdditionalPairNo:=5) ucrSaveModel.AddAdditionalRCode(clsBartelFunction, iAdditionalPairNo:=6) ucrSaveModel.AddAdditionalRCode(clsBrFunction, iAdditionalPairNo:=7) + ucrSaveModel.AddAdditionalRCode(clsRunsFunction, iAdditionalPairNo:=8) + ucrSaveModel.AddAdditionalRCode(clsSenFunction, iAdditionalPairNo:=9) + ucrSaveModel.AddAdditionalRCode(clsSerialCorrFunction, iAdditionalPairNo:=10) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 350d6519b7e39f0b9b226447e571b8e48d35b842 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:30:32 +0300 Subject: [PATCH 093/172] Adding additional Rcode to the ucrSaveModel control --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ce98e58bfcf..973d56c3c6d 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -381,6 +381,9 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsRunsFunction, iAdditionalPairNo:=8) ucrSaveModel.AddAdditionalRCode(clsSenFunction, iAdditionalPairNo:=9) ucrSaveModel.AddAdditionalRCode(clsSerialCorrFunction, iAdditionalPairNo:=10) + ucrSaveModel.AddAdditionalRCode(clsSfFunction, iAdditionalPairNo:=11) + ucrSaveModel.AddAdditionalRCode(clsSnhFunction, iAdditionalPairNo:=12) + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From ab0872813a9c4dc971229c47bc416a2d58029bd3 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:32:38 +0300 Subject: [PATCH 094/172] Adding additional Rcode to the ucrSaveModelControl --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 973d56c3c6d..1b774543c67 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -383,6 +383,8 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsSerialCorrFunction, iAdditionalPairNo:=10) ucrSaveModel.AddAdditionalRCode(clsSfFunction, iAdditionalPairNo:=11) ucrSaveModel.AddAdditionalRCode(clsSnhFunction, iAdditionalPairNo:=12) + ucrSaveModel.AddAdditionalRCode(clsAdFunction, iAdditionalPairNo:=13) + ucrSaveModel.AddAdditionalRCode(clsCvmFunction, iAdditionalPairNo:=14) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 2f6eab5d7ce850cb33883203f79f05ed2d8642b1 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 21:43:09 +0300 Subject: [PATCH 095/172] Adding estimate functions to ucrSaveModel control --- instat/dlgOneVarFitModel.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 1b774543c67..2fe92742778 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -371,6 +371,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) + ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) ucrSaveModel.AddAdditionalRCode(clsProportionFunction, iAdditionalPairNo:=2) ucrSaveModel.AddAdditionalRCode(clsSignTestFunction, iAdditionalPairNo:=3) @@ -385,7 +386,12 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsSnhFunction, iAdditionalPairNo:=12) ucrSaveModel.AddAdditionalRCode(clsAdFunction, iAdditionalPairNo:=13) ucrSaveModel.AddAdditionalRCode(clsCvmFunction, iAdditionalPairNo:=14) + ucrSaveModel.AddAdditionalRCode(clsWilcoxonFunction, iAdditionalPairNo:=15) + ucrSaveModel.AddAdditionalRCode(clsLillieFunction, iAdditionalPairNo:=16) + ucrSaveModel.AddAdditionalRCode(clsPearsonFunction, iAdditionalPairNo:=17) + ' Additional Rcode for estimates functions + ucrSaveModel.AddAdditionalRCode(clsMeanCIFunction, iAdditionalPairNo:=18) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From 001229f68b7bbbf0c5c36edbe319132c281f3d48 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 22:06:36 +0300 Subject: [PATCH 096/172] Adding additional Rcode to ucrSaveModel for Estimates functions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 2fe92742778..5919a6d81b3 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -392,6 +392,9 @@ Public Class dlgOneVarFitModel ' Additional Rcode for estimates functions ucrSaveModel.AddAdditionalRCode(clsMeanCIFunction, iAdditionalPairNo:=18) + ucrSaveModel.AddAdditionalRCode(clsMedianCIFunction, iAdditionalPairNo:=19) + + ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) From d7f9de43b5e750fc940150969e9d29024d608092 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 22:07:47 +0300 Subject: [PATCH 097/172] More implementation of the Save control --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5919a6d81b3..cd88320b520 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -393,7 +393,7 @@ Public Class dlgOneVarFitModel ' Additional Rcode for estimates functions ucrSaveModel.AddAdditionalRCode(clsMeanCIFunction, iAdditionalPairNo:=18) ucrSaveModel.AddAdditionalRCode(clsMedianCIFunction, iAdditionalPairNo:=19) - + ucrSaveModel.AddAdditionalRCode(clsPoissonCIFunction, iAdditionalPairNo:=20) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 03e1b81a1ccc3eae8e580ba0c12107f422c7338e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 22:10:28 +0300 Subject: [PATCH 098/172] implementation of the Save control for estimates --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index cd88320b520..6e8bc6aeaf4 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -394,6 +394,8 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsMeanCIFunction, iAdditionalPairNo:=18) ucrSaveModel.AddAdditionalRCode(clsMedianCIFunction, iAdditionalPairNo:=19) ucrSaveModel.AddAdditionalRCode(clsPoissonCIFunction, iAdditionalPairNo:=20) + ucrSaveModel.AddAdditionalRCode(clsQuantileCIFunction, iAdditionalPairNo:=21) + ucrSaveModel.AddAdditionalRCode(clsSdCIFunction, iAdditionalPairNo:=22) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 3022774af780e44845181c4145d49a22fb2a09a8 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Tue, 14 Jul 2020 22:11:36 +0300 Subject: [PATCH 099/172] Implementation of the save control --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 6e8bc6aeaf4..df0ab37e33f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -396,6 +396,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.AddAdditionalRCode(clsPoissonCIFunction, iAdditionalPairNo:=20) ucrSaveModel.AddAdditionalRCode(clsQuantileCIFunction, iAdditionalPairNo:=21) ucrSaveModel.AddAdditionalRCode(clsSdCIFunction, iAdditionalPairNo:=22) + ucrSaveModel.AddAdditionalRCode(clsVarCIFunction, iAdditionalPairNo:=23) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) From 233f6724e8e9dcaf0865c7503c6ceaa72cf1ff83 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 11:56:41 +0300 Subject: [PATCH 100/172] Adding estimates functions --- instat/dlgOneVarFitModel.vb | 12 +++--- instat/dlgOneVarFitModel2.Designer.vb | 54 +++++++++++++-------------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index df0ab37e33f..5e886737f67 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -93,6 +93,8 @@ Public Class dlgOneVarFitModel ucrNudTrim.DecimalPlaces = 2 ucrNudTrim.Increment = 0.01 + ucrChkOmmitMissing.SetText("Ommit Missing") + ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) ucrNudConfidenceLevel.DecimalPlaces = 2 @@ -110,8 +112,9 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedDisabledIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") @@ -348,8 +351,8 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=13) - ucrOmmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrOmmitMissing.GetParameter(), iAdditionalPairNo:=1) - ucrOmmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrOmmitMissing.GetParameter(), iAdditionalPairNo:=2) + ucrChkOmmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkOmmitMissing.GetParameter(), iAdditionalPairNo:=1) + ucrChkOmmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkOmmitMissing.GetParameter(), iAdditionalPairNo:=2) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=16) @@ -403,7 +406,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) - ucrOmmitMissing.SetRCode(clsMeanCIFunction, bReset) + ucrChkOmmitMissing.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) @@ -512,7 +515,6 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetPrefix("test") ElseIf rdoEstimate.Checked Then ucrSaveModel.SetCheckBoxText("Save Estimate") - ucrSaveModel.SetAssignToIfUncheckedValue("last_estimate") ucrSaveModel.SetPrefix("ci") End If End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 27e1deeae6c..9d2ea751e19 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -50,13 +50,13 @@ Partial Class dlgOneVarFitModel Me.lblMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.lblNullHypothesis = New System.Windows.Forms.Label() + Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() Me.ucrNudTrim = New instat.ucrNud() Me.ucrNudConfidenceLevel = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() - Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() - Me.ucrOmmitMissing = New instat.ucrCheck() + Me.ucrChkOmmitMissing = New instat.ucrCheck() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() Me.ucrSaveModel = New instat.ucrSave() @@ -167,7 +167,7 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(546, 126) + Me.lblTrim.Location = New System.Drawing.Point(319, 155) Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(40, 17) @@ -177,7 +177,7 @@ Partial Class dlgOneVarFitModel 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(539, 168) + Me.lblMethod.Location = New System.Drawing.Point(321, 186) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 @@ -202,6 +202,16 @@ Partial Class dlgOneVarFitModel Me.lblNullHypothesis.TabIndex = 59 Me.lblNullHypothesis.Text = "Null Hypothesis:" ' + 'ucrInputMethod + ' + Me.ucrInputMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMethod.IsReadOnly = False + Me.ucrInputMethod.Location = New System.Drawing.Point(380, 177) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputMethod.Name = "ucrInputMethod" + Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) + Me.ucrInputMethod.TabIndex = 53 + ' 'ucrInputNullHypothesis ' Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True @@ -217,7 +227,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(608, 126) + Me.ucrNudTrim.Location = New System.Drawing.Point(380, 150) Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -249,16 +259,6 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboEstimate.TabIndex = 48 ' - 'ucrInputMethod - ' - Me.ucrInputMethod.AddQuotesIfUnrecognised = True - Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(608, 159) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) - Me.ucrInputMethod.TabIndex = 53 - ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True @@ -269,14 +269,14 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) Me.ucrInputComboTests.TabIndex = 46 ' - 'ucrOmmitMissing + 'ucrChkOmmitMissing ' - Me.ucrOmmitMissing.Checked = False - Me.ucrOmmitMissing.Location = New System.Drawing.Point(333, 292) - Me.ucrOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrOmmitMissing.Name = "ucrOmmitMissing" - Me.ucrOmmitMissing.Size = New System.Drawing.Size(160, 25) - Me.ucrOmmitMissing.TabIndex = 52 + Me.ucrChkOmmitMissing.Checked = False + Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(324, 215) + Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" + Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(160, 25) + Me.ucrChkOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate ' @@ -346,7 +346,9 @@ Partial Class dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(695, 517) + Me.ClientSize = New System.Drawing.Size(552, 517) + Me.Controls.Add(Me.lblMethod) + Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) Me.Controls.Add(Me.ucrNudTrim) Me.Controls.Add(Me.ucrNudConfidenceLevel) @@ -356,11 +358,9 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) Me.Controls.Add(Me.lblTests) - Me.Controls.Add(Me.lblMethod) - Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputComboTests) Me.Controls.Add(Me.rdoEstimate) - Me.Controls.Add(Me.ucrOmmitMissing) + Me.Controls.Add(Me.ucrChkOmmitMissing) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) Me.Controls.Add(Me.rdoTest) @@ -405,7 +405,7 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblEstimate As Label Friend WithEvents ucrNudTrim As ucrNud Friend WithEvents lblTrim As Label - Friend WithEvents ucrOmmitMissing As ucrCheck + Friend WithEvents ucrChkOmmitMissing As ucrCheck Friend WithEvents lblMethod As Label Friend WithEvents ucrInputMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label From 4ca0bd40c9fe3553238c5734e4a2415e0394be0b Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 12:04:38 +0300 Subject: [PATCH 101/172] Implementing Mean Estimate --- instat/dlgOneVarFitModel.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5e886737f67..64d0c30358e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -308,6 +308,8 @@ Public Class dlgOneVarFitModel 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") + clsMeanCIFunction.AddParameter("tream", "0", iPosition:=1) + clsMeanCIFunction.AddParameter("na.rm", "True", iPosition:=3) clsMedianCIFunction.SetPackageName("DescTools") clsMedianCIFunction.SetRCommand("MedianCI ") @@ -370,7 +372,8 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From 4f655b4033acbea06f24b8889e6e980d92f64731 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 12:13:03 +0300 Subject: [PATCH 102/172] Implementing median estimate --- instat/dlgOneVarFitModel.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 64d0c30358e..b4606b4b631 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -309,10 +309,11 @@ Public Class dlgOneVarFitModel clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") clsMeanCIFunction.AddParameter("tream", "0", iPosition:=1) - clsMeanCIFunction.AddParameter("na.rm", "True", iPosition:=3) + clsMeanCIFunction.AddParameter("na.rm", "TRUE", iPosition:=3) clsMedianCIFunction.SetPackageName("DescTools") clsMedianCIFunction.SetRCommand("MedianCI ") + clsMedianCIFunction.AddParameter("na.rm", "TRUE", iPosition:=2) clsNormCIFunction.SetPackageName("MKinfer") clsNormCIFunction.SetRCommand("normCI") @@ -374,6 +375,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From ef05615d4c129dcb01d7624b1658bb30a750addb Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 12:27:41 +0300 Subject: [PATCH 103/172] Implementing estimate for normality --- instat/dlgOneVarFitModel.vb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b4606b4b631..7b4253c34f7 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -317,6 +317,11 @@ Public Class dlgOneVarFitModel clsNormCIFunction.SetPackageName("MKinfer") clsNormCIFunction.SetRCommand("normCI") + clsNormCIFunction.AddParameter("mean", "NULL", iPosition:=1) + clsNormCIFunction.AddParameter("sd", "NULL", iPosition:=2) + clsNormCIFunction.AddParameter("boot", "FALSE", iPosition:=4) + clsNormCIFunction.AddParameter("R", "9999", iPosition:=5) + clsNormCIFunction.AddParameter("bootci.type", "all", iPosition:=6) clsPoissonCIFunction.SetPackageName("DescTools") clsPoissonCIFunction.SetRCommand("PoissonCI") @@ -376,6 +381,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From d76231bb6fdd758b2aeefe427bf3bab76a12252c Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 12:32:11 +0300 Subject: [PATCH 104/172] Implementing poisson estimate --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7b4253c34f7..9aacb476f0a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -325,6 +325,8 @@ Public Class dlgOneVarFitModel clsPoissonCIFunction.SetPackageName("DescTools") clsPoissonCIFunction.SetRCommand("PoissonCI") + clsPoissonCIFunction.AddParameter("n", "1", iPosition:=1) + clsQuantileCIFunction.SetPackageName("MKinfer") clsQuantileCIFunction.SetRCommand("quantileCI") @@ -382,6 +384,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From 0aac71b9a2c89b343a787f21118af605ef9b1972 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 12:39:32 +0300 Subject: [PATCH 105/172] Implementing Sd estimate --- instat/dlgOneVarFitModel.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 9aacb476f0a..7f41a01fd41 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -330,6 +330,8 @@ Public Class dlgOneVarFitModel clsQuantileCIFunction.SetPackageName("MKinfer") clsQuantileCIFunction.SetRCommand("quantileCI") + clsQuantileCIFunction.AddParameter("prob", "0.5", iPosition:=1) + clsSdCIFunction.SetPackageName("MKinfer") clsSdCIFunction.SetRCommand("sdCI") @@ -385,6 +387,8 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=12) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From c7cc229d2655adcc749bd56590b658086b081650 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 12:45:24 +0300 Subject: [PATCH 106/172] Implementing quantile function --- instat/dlgOneVarFitModel.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7f41a01fd41..f6158a7b9dc 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -335,6 +335,10 @@ Public Class dlgOneVarFitModel clsSdCIFunction.SetPackageName("MKinfer") clsSdCIFunction.SetRCommand("sdCI") + clsSdCIFunction.AddParameter("boot", "FALSE", iPosition:=2) + clsSdCIFunction.AddParameter("R", "9999", iPosition:=3) + clsSdCIFunction.AddParameter("bootci.type", "all", iPosition:=4) + clsSdCIFunction.AddParameter("na.rm", "TRUE", iPosition:=5) clsVarCIFunction.SetPackageName("DescTools") clsVarCIFunction.SetRCommand("VarCI") @@ -388,7 +392,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=12) - + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) From 4716d7702790dd4284c3f71bade97fdb4af91311 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 14:36:01 +0300 Subject: [PATCH 107/172] Adding methodes for the estimates --- instat/dlgOneVarFitModel.vb | 23 ++++++++------ instat/dlgOneVarFitModel2.Designer.vb | 44 ++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f6158a7b9dc..bd823b7668c 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,7 +82,8 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() - ucrInputMethod.SetItems({"classic", "boot"}) + ucrInputMethod.SetParameter(New RParameter("y", 0)) + ucrInputMethod.SetItems({"classic", "boot", "bonett", "norm", "basic", "stud", "perc", "bca", "exact", "boot", "score", "wald", "byar"}) ucrInputMethod.SetDropDownStyleAsNonEditable() @@ -96,10 +97,13 @@ Public Class dlgOneVarFitModel ucrChkOmmitMissing.SetText("Ommit Missing") - ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level")) + ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 1)) ucrNudConfidenceLevel.DecimalPlaces = 2 ucrNudConfidenceLevel.Increment = 0.05 + ucrNudConfLevel.SetParameter(New RParameter("conf.level", 1)) + ucrNudConfLevel.DecimalPlaces = 2 + ucrNudConfLevel.Increment = 0.05 ucrInputNullHypothesis.SetParameter(New RParameter("mu", 1)) @@ -114,7 +118,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedDisabledIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfLevel, {rdoEstimate}, bNewLinkedDisabledIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") @@ -387,12 +391,12 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=12) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) + ucrNudConfLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) + ucrNudConfLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=2) + ucrNudConfLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=3) + ucrNudConfLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) + ucrNudConfLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) + 'ucrNudConfLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) @@ -429,6 +433,7 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrChkOmmitMissing.SetRCode(clsMeanCIFunction, bReset) + ucrNudConfLevel.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 9d2ea751e19..727bd39490a 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -64,6 +64,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrNudConfLevel = New instat.ucrNud() + Me.lblConfLevel = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -167,7 +169,7 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(319, 155) + Me.lblTrim.Location = New System.Drawing.Point(396, 155) Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(40, 17) @@ -177,7 +179,7 @@ Partial Class dlgOneVarFitModel 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(321, 186) + Me.lblMethod.Location = New System.Drawing.Point(363, 187) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 @@ -195,7 +197,7 @@ Partial Class dlgOneVarFitModel 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(317, 186) + Me.lblNullHypothesis.Location = New System.Drawing.Point(316, 187) Me.lblNullHypothesis.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(110, 17) @@ -206,7 +208,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(380, 177) + Me.ucrInputMethod.Location = New System.Drawing.Point(437, 184) Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputMethod.Name = "ucrInputMethod" Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) @@ -217,7 +219,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputNullHypothesis.IsMultiline = False Me.ucrInputNullHypothesis.IsReadOnly = False - Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(448, 177) + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(437, 184) Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(67, 26) @@ -227,7 +229,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(380, 150) + Me.ucrNudTrim.Location = New System.Drawing.Point(447, 150) Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -272,10 +274,10 @@ Partial Class dlgOneVarFitModel 'ucrChkOmmitMissing ' Me.ucrChkOmmitMissing.Checked = False - Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(324, 215) + Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(319, 228) Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" - Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(160, 25) + Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(198, 25) Me.ucrChkOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate @@ -342,11 +344,35 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' + 'ucrNudConfLevel + ' + Me.ucrNudConfLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudConfLevel.Location = New System.Drawing.Point(447, 150) + Me.ucrNudConfLevel.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrNudConfLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudConfLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConfLevel.Name = "ucrNudConfLevel" + Me.ucrNudConfLevel.Size = New System.Drawing.Size(67, 25) + Me.ucrNudConfLevel.TabIndex = 61 + Me.ucrNudConfLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblConfLevel + ' + Me.lblConfLevel.AutoSize = True + Me.lblConfLevel.Location = New System.Drawing.Point(317, 154) + Me.lblConfLevel.Name = "lblConfLevel" + Me.lblConfLevel.Size = New System.Drawing.Size(121, 17) + Me.lblConfLevel.TabIndex = 62 + Me.lblConfLevel.Text = "Confidence Level:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(552, 517) + Me.Controls.Add(Me.lblConfLevel) + Me.Controls.Add(Me.ucrNudConfLevel) Me.Controls.Add(Me.lblMethod) Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) @@ -412,4 +438,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox Friend WithEvents lblNullHypothesis As Label + Friend WithEvents lblConfLevel As Label + Friend WithEvents ucrNudConfLevel As ucrNud End Class \ No newline at end of file From e26a8c3bead2b8c3b098e4cd43462df055c26aee Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 16:44:03 +0300 Subject: [PATCH 108/172] More Addition of the estimates function --- instat/dlgOneVarFitModel.vb | 30 ++++++++++---------- instat/dlgOneVarFitModel2.Designer.vb | 40 ++++----------------------- 2 files changed, 22 insertions(+), 48 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index bd823b7668c..981592fca2e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,7 +82,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() - ucrInputMethod.SetParameter(New RParameter("y", 0)) + ucrInputMethod.SetParameter(New RParameter("method", 3)) ucrInputMethod.SetItems({"classic", "boot", "bonett", "norm", "basic", "stud", "perc", "bca", "exact", "boot", "score", "wald", "byar"}) ucrInputMethod.SetDropDownStyleAsNonEditable() @@ -97,13 +97,13 @@ Public Class dlgOneVarFitModel ucrChkOmmitMissing.SetText("Ommit Missing") - ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 1)) + ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) ucrNudConfidenceLevel.DecimalPlaces = 2 ucrNudConfidenceLevel.Increment = 0.05 - ucrNudConfLevel.SetParameter(New RParameter("conf.level", 1)) - ucrNudConfLevel.DecimalPlaces = 2 - ucrNudConfLevel.Increment = 0.05 + 'ucrNudConfLevel.SetParameter(New RParameter("conf.level", 2)) + 'ucrNudConfLevel.DecimalPlaces = 2 + 'ucrNudConfLevel.Increment = 0.05 ucrInputNullHypothesis.SetParameter(New RParameter("mu", 1)) @@ -118,7 +118,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfLevel, {rdoEstimate}, bNewLinkedDisabledIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedChangeParameterValue:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") @@ -261,7 +261,6 @@ Public Class dlgOneVarFitModel clsTtestFunction.SetPackageName("mosaic") clsTtestFunction.SetRCommand("t.test") clsTtestFunction.AddParameter("mu", "0", iPosition:=1) - clsTtestFunction.AddParameter("conf.level", "0.95", iPosition:=2) clsWilcoxonFunction.SetPackageName("stats") clsWilcoxonFunction.SetRCommand("wilcox.test") @@ -391,14 +390,16 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) - ucrNudConfLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) - ucrNudConfLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=2) - ucrNudConfLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=3) - ucrNudConfLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) - ucrNudConfLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) - 'ucrNudConfLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=12) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) + ucrInputMethod.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("method", 3), 1) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) @@ -433,9 +434,10 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrChkOmmitMissing.SetRCode(clsMeanCIFunction, bReset) - ucrNudConfLevel.SetRCode(clsMeanCIFunction, bReset) + 'ucrNudConfLevel.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) + ucrInputMethod.SetRCode(clsMeanCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 727bd39490a..10f6e863f4e 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -64,8 +64,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrNudConfLevel = New instat.ucrNud() - Me.lblConfLevel = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -169,7 +167,7 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(396, 155) + Me.lblTrim.Location = New System.Drawing.Point(406, 222) Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(40, 17) @@ -179,7 +177,7 @@ Partial Class dlgOneVarFitModel 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(363, 187) + Me.lblMethod.Location = New System.Drawing.Point(366, 189) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 @@ -229,7 +227,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(447, 150) + Me.ucrNudTrim.Location = New System.Drawing.Point(450, 219) Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -242,7 +240,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(448, 150) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(448, 154) Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) @@ -274,10 +272,10 @@ Partial Class dlgOneVarFitModel 'ucrChkOmmitMissing ' Me.ucrChkOmmitMissing.Checked = False - Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(319, 228) + Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(421, 254) Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" - Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(198, 25) + Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(115, 25) Me.ucrChkOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate @@ -344,35 +342,11 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(547, 64) Me.ucrBase.TabIndex = 0 ' - 'ucrNudConfLevel - ' - Me.ucrNudConfLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfLevel.Location = New System.Drawing.Point(447, 150) - Me.ucrNudConfLevel.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) - Me.ucrNudConfLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudConfLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfLevel.Name = "ucrNudConfLevel" - Me.ucrNudConfLevel.Size = New System.Drawing.Size(67, 25) - Me.ucrNudConfLevel.TabIndex = 61 - Me.ucrNudConfLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblConfLevel - ' - Me.lblConfLevel.AutoSize = True - Me.lblConfLevel.Location = New System.Drawing.Point(317, 154) - Me.lblConfLevel.Name = "lblConfLevel" - Me.lblConfLevel.Size = New System.Drawing.Size(121, 17) - Me.lblConfLevel.TabIndex = 62 - Me.lblConfLevel.Text = "Confidence Level:" - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(552, 517) - Me.Controls.Add(Me.lblConfLevel) - Me.Controls.Add(Me.ucrNudConfLevel) Me.Controls.Add(Me.lblMethod) Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) @@ -438,6 +412,4 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox Friend WithEvents lblNullHypothesis As Label - Friend WithEvents lblConfLevel As Label - Friend WithEvents ucrNudConfLevel As ucrNud End Class \ No newline at end of file From 5ecd3b8312655ab14ba5c1b4be87faeef6c034d9 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 16:54:28 +0300 Subject: [PATCH 109/172] Implementing Estimate functions --- instat/dlgOneVarFitModel.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 981592fca2e..ae040ce8162 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -118,7 +118,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedChangeParameterValue:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") @@ -334,6 +334,8 @@ Public Class dlgOneVarFitModel clsQuantileCIFunction.SetPackageName("MKinfer") clsQuantileCIFunction.SetRCommand("quantileCI") clsQuantileCIFunction.AddParameter("prob", "0.5", iPosition:=1) + clsQuantileCIFunction.AddParameter("method", "exact", iPosition:=3) + clsQuantileCIFunction.AddParameter("R", "9999", iPosition:=4) clsSdCIFunction.SetPackageName("MKinfer") @@ -400,6 +402,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) ucrInputMethod.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("method", 3), 1) + ucrInputMethod.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("bootci.type", 5), 2) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) From f2731eb52ca302df7b66643e352134b24d373789 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 16:57:19 +0300 Subject: [PATCH 110/172] Implementing estimate functions --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index ae040ce8162..08ccc61cbee 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -336,6 +336,8 @@ Public Class dlgOneVarFitModel clsQuantileCIFunction.AddParameter("prob", "0.5", iPosition:=1) clsQuantileCIFunction.AddParameter("method", "exact", iPosition:=3) clsQuantileCIFunction.AddParameter("R", "9999", iPosition:=4) + clsQuantileCIFunction.AddParameter("minLength", "FALSE", iPosition:=6) + clsQuantileCIFunction.AddParameter("na.rm", "TRUE", iPosition:=7) clsSdCIFunction.SetPackageName("MKinfer") From aade9afa87acabef31fb1d07d192e7a1e59cf504 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 17:00:28 +0300 Subject: [PATCH 111/172] Implementing estimate functions --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 08ccc61cbee..71287121783 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -405,6 +405,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) ucrInputMethod.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("method", 3), 1) ucrInputMethod.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("bootci.type", 5), 2) + ucrInputMethod.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("method", 3), iAdditionalPairNo:=3) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) From bee634b8fecf838656ada7740d13552df32e2e20 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 17:10:16 +0300 Subject: [PATCH 112/172] Implementing Estimate functions --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 71287121783..516dc34ea20 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -349,6 +349,7 @@ Public Class dlgOneVarFitModel clsVarCIFunction.SetPackageName("DescTools") clsVarCIFunction.SetRCommand("VarCI") + clsVarCIFunction.AddParameter("na.rm", "TRUE", iPosition:=3) clsROneVarFitModel.SetAssignTo("last_model", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model") clsRLogLikFunction.SetAssignTo("last_likelihood", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_likelihood") @@ -401,11 +402,13 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=12) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=15) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) ucrInputMethod.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("method", 3), 1) ucrInputMethod.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("bootci.type", 5), 2) ucrInputMethod.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("method", 3), iAdditionalPairNo:=3) + ucrInputMethod.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("method", 1), iAdditionalPairNo:=4) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) From 7997472a9c5862a48f663bb7e1654c9bda6e1a1f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Wed, 15 Jul 2020 17:45:01 +0300 Subject: [PATCH 113/172] Implementing estimate functions --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 516dc34ea20..a7afffdd0ac 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -120,7 +120,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) From 6b80c1e8d1bb5a4e5498340c54577ce64d862d45 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 16 Jul 2020 10:27:08 +0300 Subject: [PATCH 114/172] Setting the ucrInput for estimates methods --- instat/dlgOneVarFitModel.vb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a7afffdd0ac..5e1939e0c2e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -117,10 +117,10 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) + 'ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) @@ -639,6 +639,15 @@ Public Class dlgOneVarFitModel Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetSaveLabelTextAndPrefix() SetTestEstimateBaseFunction() + If ucrInputComboEstimate.GetText() = "median" Then + ucrInputMethod.SetItems({"exact", "boot"}) + ucrInputMethod.SetDefaultState("exact") + ElseIf ucrInputComboEstimate.GetText() = "mean" Then + ucrInputMethod.SetItems({"classic", "boot"}) + ElseIf ucrInputComboEstimate.GetText() = "variance" Then + ucrInputMethod.SetItems({"classic", "bonett", "norm", "basic", "stud", "perc", "bca"}) + End If + End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged From fddd376f1c7b42d0b42d2ff6b4ebe87fe49b11d2 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 16 Jul 2020 10:44:42 +0300 Subject: [PATCH 115/172] Setting ucrInputMethods --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5e1939e0c2e..488c4a465af 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -646,6 +646,8 @@ Public Class dlgOneVarFitModel ucrInputMethod.SetItems({"classic", "boot"}) ElseIf ucrInputComboEstimate.GetText() = "variance" Then ucrInputMethod.SetItems({"classic", "bonett", "norm", "basic", "stud", "perc", "bca"}) + ElseIf ucrInputComboTests.GetText() = "poisson" Then + ucrInputMethod.SetItems({"exact", "score", "wald", "byar"}) End If End Sub From f1998420cb151352cb9faf19bb6be4b563c56c78 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 16 Jul 2020 10:55:35 +0300 Subject: [PATCH 116/172] More addition --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 488c4a465af..b55edc786a0 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -648,6 +648,8 @@ Public Class dlgOneVarFitModel ucrInputMethod.SetItems({"classic", "bonett", "norm", "basic", "stud", "perc", "bca"}) ElseIf ucrInputComboTests.GetText() = "poisson" Then ucrInputMethod.SetItems({"exact", "score", "wald", "byar"}) + ElseIf ucrInputComboEstimate.GetText() = "quantile" Then + ucrInputMethod.SetItems({"norm", "basic", "per", "bca"}) End If End Sub From bbac352c7c4c59520997efcc338d41fbc17597c2 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 16 Jul 2020 13:13:44 +0300 Subject: [PATCH 117/172] More changes on estimates --- instat/dlgOneVarFitModel.vb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b55edc786a0..f088b53ffb6 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -74,7 +74,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetCheckBoxText("Save Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") - ucrSaveModel.SetPrefix("Normal") + 'ucrSaveModel.SetPrefix("Normal") ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br", "Runs", "Sen", "Serial Corr", "Snh", "Ad", "Cvm", "Lillie", "Pearson", "Sf"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() @@ -118,7 +118,6 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - 'ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") @@ -334,7 +333,7 @@ Public Class dlgOneVarFitModel clsQuantileCIFunction.SetPackageName("MKinfer") clsQuantileCIFunction.SetRCommand("quantileCI") clsQuantileCIFunction.AddParameter("prob", "0.5", iPosition:=1) - clsQuantileCIFunction.AddParameter("method", "exact", iPosition:=3) + clsQuantileCIFunction.AddParameter("method", Chr(34) & "exact" & Chr(34), iPosition:=3) clsQuantileCIFunction.AddParameter("R", "9999", iPosition:=4) clsQuantileCIFunction.AddParameter("minLength", "FALSE", iPosition:=6) clsQuantileCIFunction.AddParameter("na.rm", "TRUE", iPosition:=7) @@ -559,6 +558,7 @@ Public Class dlgOneVarFitModel Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged SetTestEstimateBaseFunction() + SetSaveLabelTextAndPrefix() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged @@ -637,16 +637,14 @@ Public Class dlgOneVarFitModel End Sub Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged - SetSaveLabelTextAndPrefix() SetTestEstimateBaseFunction() If ucrInputComboEstimate.GetText() = "median" Then ucrInputMethod.SetItems({"exact", "boot"}) - ucrInputMethod.SetDefaultState("exact") ElseIf ucrInputComboEstimate.GetText() = "mean" Then ucrInputMethod.SetItems({"classic", "boot"}) ElseIf ucrInputComboEstimate.GetText() = "variance" Then ucrInputMethod.SetItems({"classic", "bonett", "norm", "basic", "stud", "perc", "bca"}) - ElseIf ucrInputComboTests.GetText() = "poisson" Then + ElseIf ucrInputComboEstimate.GetText() = "poisson" Then ucrInputMethod.SetItems({"exact", "score", "wald", "byar"}) ElseIf ucrInputComboEstimate.GetText() = "quantile" Then ucrInputMethod.SetItems({"norm", "basic", "per", "bca"}) From a3d0d3d6f6355214eeeb9254be4effa791b91a2f Mon Sep 17 00:00:00 2001 From: Wycklife Date: Thu, 16 Jul 2020 15:08:48 +0300 Subject: [PATCH 118/172] More changes to the estimates --- instat/dlgOneVarFitModel.vb | 10 ++++++++++ instat/dlgOneVarFitModel2.Designer.vb | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f088b53ffb6..4d147de2b17 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -640,14 +640,24 @@ Public Class dlgOneVarFitModel SetTestEstimateBaseFunction() If ucrInputComboEstimate.GetText() = "median" Then ucrInputMethod.SetItems({"exact", "boot"}) + ucrInputMethod.SetName("exact") ElseIf ucrInputComboEstimate.GetText() = "mean" Then ucrInputMethod.SetItems({"classic", "boot"}) + ucrInputMethod.SetName("classic") ElseIf ucrInputComboEstimate.GetText() = "variance" Then ucrInputMethod.SetItems({"classic", "bonett", "norm", "basic", "stud", "perc", "bca"}) + ucrInputMethod.SetName("classic") ElseIf ucrInputComboEstimate.GetText() = "poisson" Then ucrInputMethod.SetItems({"exact", "score", "wald", "byar"}) + ucrInputMethod.SetName("exact") ElseIf ucrInputComboEstimate.GetText() = "quantile" Then ucrInputMethod.SetItems({"norm", "basic", "per", "bca"}) + ucrInputMethod.SetName("norm") + End If + If ucrInputComboEstimate.GetText() = "normal" Or ucrInputComboEstimate.GetText() = "sd" Then + ucrInputMethod.Visible = False + Else + ucrInputMethod.Visible = True End If End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 10f6e863f4e..8ff4f555922 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -167,7 +167,7 @@ Partial Class dlgOneVarFitModel 'lblTrim ' Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(406, 222) + Me.lblTrim.Location = New System.Drawing.Point(385, 219) Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblTrim.Name = "lblTrim" Me.lblTrim.Size = New System.Drawing.Size(40, 17) @@ -272,10 +272,10 @@ Partial Class dlgOneVarFitModel 'ucrChkOmmitMissing ' Me.ucrChkOmmitMissing.Checked = False - Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(421, 254) + Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(369, 256) Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" - Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(115, 25) + Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(167, 25) Me.ucrChkOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate From 039d83a4b9b905bae1786ac9bcd74300d7537f27 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Fri, 17 Jul 2020 12:18:17 +0300 Subject: [PATCH 119/172] Implementing tests --- instat/dlgOneVarFitModel.vb | 20 +++--------- instat/dlgOneVarFitModel2.Designer.vb | 47 +++++---------------------- 2 files changed, 14 insertions(+), 53 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4d147de2b17..f446f963192 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -87,13 +87,6 @@ Public Class dlgOneVarFitModel ucrInputMethod.SetDropDownStyleAsNonEditable() - - - ucrNudTrim.SetParameter(New RParameter("trim", 1)) - ucrNudTrim.Maximum = 0.5 - ucrNudTrim.DecimalPlaces = 2 - ucrNudTrim.Increment = 0.01 - ucrChkOmmitMissing.SetText("Ommit Missing") @@ -115,15 +108,13 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudTrim, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) - ucrNudTrim.SetLinkedDisplayControl(lblTrim) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) ucrInputMethod.SetLinkedDisplayControl(lblMethod) @@ -247,7 +238,7 @@ Public Class dlgOneVarFitModel clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") clsBionomialFunction.AddParameter("n", "", iPosition:=1) - clsBionomialFunction.AddParameter("p", "0.5", iPosition:=2) + clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") @@ -387,7 +378,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) @@ -440,11 +431,10 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) - ucrNudTrim.SetRCode(clsMeanCIFunction, bReset) ucrChkOmmitMissing.SetRCode(clsMeanCIFunction, bReset) 'ucrNudConfLevel.SetRCode(clsMeanCIFunction, bReset) - ucrNudConfidenceLevel.SetRCode(clsTtestFunction, bReset) - ucrInputNullHypothesis.SetRCode(clsTtestFunction, bReset) + ucrNudConfidenceLevel.SetRCode(clsBionomialFunction, bReset) + ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMethod.SetRCode(clsMeanCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 8ff4f555922..7e1e4b899e9 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -46,13 +46,11 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() - Me.lblTrim = New System.Windows.Forms.Label() Me.lblMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.lblNullHypothesis = New System.Windows.Forms.Label() Me.ucrInputMethod = New instat.ucrInputComboBox() Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() - Me.ucrNudTrim = New instat.ucrNud() Me.ucrNudConfidenceLevel = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() @@ -164,20 +162,10 @@ Partial Class dlgOneVarFitModel Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' - 'lblTrim - ' - Me.lblTrim.AutoSize = True - Me.lblTrim.Location = New System.Drawing.Point(385, 219) - Me.lblTrim.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) - Me.lblTrim.Name = "lblTrim" - Me.lblTrim.Size = New System.Drawing.Size(40, 17) - Me.lblTrim.TabIndex = 51 - Me.lblTrim.Text = "Trim:" - ' 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(366, 189) + Me.lblMethod.Location = New System.Drawing.Point(359, 218) Me.lblMethod.Name = "lblMethod" Me.lblMethod.Size = New System.Drawing.Size(59, 17) Me.lblMethod.TabIndex = 54 @@ -186,7 +174,7 @@ Partial Class dlgOneVarFitModel 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(317, 154) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(313, 154) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(121, 17) Me.lblConfidenceLevel.TabIndex = 56 @@ -206,7 +194,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(437, 184) + Me.ucrInputMethod.Location = New System.Drawing.Point(438, 215) Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputMethod.Name = "ucrInputMethod" Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) @@ -217,35 +205,22 @@ Partial Class dlgOneVarFitModel Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputNullHypothesis.IsMultiline = False Me.ucrInputNullHypothesis.IsReadOnly = False - Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(437, 184) + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(439, 184) Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" - Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(67, 26) + Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(78, 26) Me.ucrInputNullHypothesis.TabIndex = 60 ' - 'ucrNudTrim - ' - Me.ucrNudTrim.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTrim.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudTrim.Location = New System.Drawing.Point(450, 219) - Me.ucrNudTrim.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) - Me.ucrNudTrim.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudTrim.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudTrim.Name = "ucrNudTrim" - Me.ucrNudTrim.Size = New System.Drawing.Size(67, 25) - Me.ucrNudTrim.TabIndex = 50 - Me.ucrNudTrim.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrNudConfidenceLevel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(448, 154) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(440, 153) Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" - Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(67, 25) + Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(78, 25) Me.ucrNudConfidenceLevel.TabIndex = 58 Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -272,10 +247,10 @@ Partial Class dlgOneVarFitModel 'ucrChkOmmitMissing ' Me.ucrChkOmmitMissing.Checked = False - Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(369, 256) + Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(413, 50) Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" - Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(167, 25) + Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(111, 25) Me.ucrChkOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate @@ -350,9 +325,7 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.lblMethod) Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) - Me.Controls.Add(Me.ucrNudTrim) Me.Controls.Add(Me.ucrNudConfidenceLevel) - Me.Controls.Add(Me.lblTrim) Me.Controls.Add(Me.lblNullHypothesis) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.lblEstimate) @@ -403,8 +376,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblTests As Label Friend WithEvents ucrInputComboEstimate As ucrInputComboBox Friend WithEvents lblEstimate As Label - Friend WithEvents ucrNudTrim As ucrNud - Friend WithEvents lblTrim As Label Friend WithEvents ucrChkOmmitMissing As ucrCheck Friend WithEvents lblMethod As Label Friend WithEvents ucrInputMethod As ucrInputComboBox From d7ffe08021542a7f6cc6713c0ba43beba3111635 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 17 Jul 2020 12:20:37 +0300 Subject: [PATCH 120/172] Implementing tests --- instat/dlgOneVarFitModel.vb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4d147de2b17..f0433e86b55 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -654,10 +654,12 @@ Public Class dlgOneVarFitModel ucrInputMethod.SetItems({"norm", "basic", "per", "bca"}) ucrInputMethod.SetName("norm") End If - If ucrInputComboEstimate.GetText() = "normal" Or ucrInputComboEstimate.GetText() = "sd" Then - ucrInputMethod.Visible = False - Else - ucrInputMethod.Visible = True + If rdoEstimate.Checked Then + If (ucrInputComboEstimate.GetText() = "normal" Or ucrInputComboEstimate.GetText() = "sd") Then + ucrInputMethod.Visible = False + Else + ucrInputMethod.Visible = True + End If End If End Sub From 699c9febc4d33651443ca1ad8ca57ff28f4f3708 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 17 Jul 2020 12:43:41 +0300 Subject: [PATCH 121/172] Implementing tests --- instat/dlgOneVarFitModel.vb | 7 +- instat/dlgOneVarFitModel2.Designer.vb | 158 ++++++++++++++------------ 2 files changed, 93 insertions(+), 72 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f57459c6c9e..8e058f82997 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -86,6 +86,10 @@ Public Class dlgOneVarFitModel ucrInputMethod.SetItems({"classic", "boot", "bonett", "norm", "basic", "stud", "perc", "bca", "exact", "boot", "score", "wald", "byar"}) ucrInputMethod.SetDropDownStyleAsNonEditable() + ucrInputCIMethods.SetParameter(New RParameter("ci.method", 4)) + ucrInputCIMethods.SetItems({"Clopper-Pearson", "binom.test", "Score", "Wilson", "prop.test", "Wald", "Agresti-Coull", "Plus4", "normal", "beta", "auto"}) + ucrInputCIMethods.SetDropDownStyleAsNonEditable() + ucrChkOmmitMissing.SetText("Ommit Missing") @@ -112,12 +116,13 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") - + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputCIMethods, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Clopper-Pearson") ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) ucrInputMethod.SetLinkedDisplayControl(lblMethod) + ucrInputCIMethods.SetLinkedDisplayControl(lblCIMethods) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 7e1e4b899e9..98eaf2722b5 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -62,15 +62,16 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputCIMethods = New instat.ucrInputComboBox() + Me.lblCIMethods = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(332, 58) - Me.LblVariable.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.LblVariable.Location = New System.Drawing.Point(249, 47) Me.LblVariable.Name = "LblVariable" - Me.LblVariable.Size = New System.Drawing.Size(64, 17) + Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 Me.LblVariable.Text = "Variable:" ' @@ -81,10 +82,9 @@ Partial Class dlgOneVarFitModel Me.rdoTest.FlatAppearance.BorderSize = 2 Me.rdoTest.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoTest.Location = New System.Drawing.Point(205, 14) - Me.rdoTest.Margin = New System.Windows.Forms.Padding(4) + Me.rdoTest.Location = New System.Drawing.Point(154, 11) Me.rdoTest.Name = "rdoTest" - Me.rdoTest.Size = New System.Drawing.Size(163, 34) + Me.rdoTest.Size = New System.Drawing.Size(122, 28) Me.rdoTest.TabIndex = 41 Me.rdoTest.Text = "Test" Me.rdoTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -97,10 +97,9 @@ Partial Class dlgOneVarFitModel Me.rdoGeneralCase.FlatAppearance.BorderSize = 2 Me.rdoGeneralCase.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoGeneralCase.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoGeneralCase.Location = New System.Drawing.Point(45, 14) - Me.rdoGeneralCase.Margin = New System.Windows.Forms.Padding(4) + Me.rdoGeneralCase.Location = New System.Drawing.Point(34, 11) Me.rdoGeneralCase.Name = "rdoGeneralCase" - Me.rdoGeneralCase.Size = New System.Drawing.Size(163, 34) + Me.rdoGeneralCase.Size = New System.Drawing.Size(122, 28) Me.rdoGeneralCase.TabIndex = 40 Me.rdoGeneralCase.Text = "General Case" Me.rdoGeneralCase.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -108,20 +107,18 @@ Partial Class dlgOneVarFitModel ' 'cmdDisplayOptions ' - Me.cmdDisplayOptions.Location = New System.Drawing.Point(416, 398) - Me.cmdDisplayOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdDisplayOptions.Location = New System.Drawing.Point(312, 323) Me.cmdDisplayOptions.Name = "cmdDisplayOptions" - Me.cmdDisplayOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdDisplayOptions.Size = New System.Drawing.Size(92, 23) Me.cmdDisplayOptions.TabIndex = 44 Me.cmdDisplayOptions.Text = "Display Options" Me.cmdDisplayOptions.UseVisualStyleBackColor = True ' 'cmdFittingOptions ' - Me.cmdFittingOptions.Location = New System.Drawing.Point(416, 367) - Me.cmdFittingOptions.Margin = New System.Windows.Forms.Padding(4) + Me.cmdFittingOptions.Location = New System.Drawing.Point(312, 298) Me.cmdFittingOptions.Name = "cmdFittingOptions" - Me.cmdFittingOptions.Size = New System.Drawing.Size(123, 28) + Me.cmdFittingOptions.Size = New System.Drawing.Size(92, 23) Me.cmdFittingOptions.TabIndex = 43 Me.cmdFittingOptions.Text = "Fitting Options" Me.cmdFittingOptions.UseVisualStyleBackColor = True @@ -133,10 +130,9 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate.FlatAppearance.BorderSize = 2 Me.rdoEstimate.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoEstimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.rdoEstimate.Location = New System.Drawing.Point(365, 14) - Me.rdoEstimate.Margin = New System.Windows.Forms.Padding(4) + Me.rdoEstimate.Location = New System.Drawing.Point(274, 11) Me.rdoEstimate.Name = "rdoEstimate" - Me.rdoEstimate.Size = New System.Drawing.Size(163, 34) + Me.rdoEstimate.Size = New System.Drawing.Size(122, 28) Me.rdoEstimate.TabIndex = 45 Me.rdoEstimate.Text = "Estimate" Me.rdoEstimate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -145,48 +141,47 @@ Partial Class dlgOneVarFitModel 'lblTests ' Me.lblTests.AutoSize = True - Me.lblTests.Location = New System.Drawing.Point(16, 315) - Me.lblTests.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblTests.Location = New System.Drawing.Point(12, 256) Me.lblTests.Name = "lblTests" - Me.lblTests.Size = New System.Drawing.Size(40, 17) + Me.lblTests.Size = New System.Drawing.Size(31, 13) Me.lblTests.TabIndex = 47 Me.lblTests.Text = "Test:" ' 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(16, 315) - Me.lblEstimate.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblEstimate.Location = New System.Drawing.Point(12, 256) Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(66, 17) + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' 'lblMethod ' Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(359, 218) + Me.lblMethod.Location = New System.Drawing.Point(240, 153) + Me.lblMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMethod.Name = "lblMethod" - Me.lblMethod.Size = New System.Drawing.Size(59, 17) + Me.lblMethod.Size = New System.Drawing.Size(46, 13) Me.lblMethod.TabIndex = 54 Me.lblMethod.Text = "Method:" ' 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(313, 154) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(232, 127) + Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(121, 17) + Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) Me.lblConfidenceLevel.TabIndex = 56 Me.lblConfidenceLevel.Text = "Confidence Level:" ' 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(316, 187) - Me.lblNullHypothesis.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblNullHypothesis.Location = New System.Drawing.Point(240, 153) Me.lblNullHypothesis.Name = "lblNullHypothesis" - Me.lblNullHypothesis.Size = New System.Drawing.Size(110, 17) + Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 Me.lblNullHypothesis.Text = "Null Hypothesis:" ' @@ -194,10 +189,10 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMethod.AddQuotesIfUnrecognised = True Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(438, 215) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputMethod.Location = New System.Drawing.Point(329, 150) + Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(80, 26) + Me.ucrInputMethod.Size = New System.Drawing.Size(60, 21) Me.ucrInputMethod.TabIndex = 53 ' 'ucrInputNullHypothesis @@ -205,22 +200,22 @@ Partial Class dlgOneVarFitModel Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputNullHypothesis.IsMultiline = False Me.ucrInputNullHypothesis.IsReadOnly = False - Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(439, 184) - Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(329, 150) + Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" - Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(78, 26) + Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(58, 21) Me.ucrInputNullHypothesis.TabIndex = 60 ' 'ucrNudConfidenceLevel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(440, 153) - Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(330, 124) + Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" - Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(78, 25) + Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(58, 20) Me.ucrNudConfidenceLevel.TabIndex = 58 Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -228,72 +223,72 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False - Me.ucrInputComboEstimate.Location = New System.Drawing.Point(88, 310) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" - Me.ucrInputComboEstimate.Size = New System.Drawing.Size(123, 26) + Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboEstimate.TabIndex = 48 ' 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False - Me.ucrInputComboTests.Location = New System.Drawing.Point(60, 310) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrInputComboTests.Name = "ucrInputComboTests" - Me.ucrInputComboTests.Size = New System.Drawing.Size(123, 26) + Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboTests.TabIndex = 46 ' 'ucrChkOmmitMissing ' Me.ucrChkOmmitMissing.Checked = False - Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(413, 50) - Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(310, 41) + Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" - Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(111, 25) + Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(83, 20) Me.ucrChkOmmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(323, 116) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(242, 94) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" - Me.ucrChkConvertVariate.Size = New System.Drawing.Size(208, 25) + Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) Me.ucrChkConvertVariate.TabIndex = 42 ' 'ucrPnlGeneralExactCase ' - Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(45, 9) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" - Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(495, 43) + Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 ' 'ucrSaveModel ' - Me.ucrSaveModel.Location = New System.Drawing.Point(13, 398) - Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(5, 6, 5, 6) + Me.ucrSaveModel.Location = New System.Drawing.Point(10, 323) + Me.ucrSaveModel.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveModel.Name = "ucrSaveModel" - Me.ucrSaveModel.Size = New System.Drawing.Size(369, 30) + Me.ucrSaveModel.Size = New System.Drawing.Size(277, 24) Me.ucrSaveModel.TabIndex = 38 ' 'ucrDistributionChoice ' - Me.ucrDistributionChoice.Location = New System.Drawing.Point(13, 306) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" - Me.ucrDistributionChoice.Size = New System.Drawing.Size(292, 37) + Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) Me.ucrDistributionChoice.TabIndex = 11 ' 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(332, 79) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing - Me.ucrReceiverVariable.Size = New System.Drawing.Size(183, 25) + Me.ucrReceiverVariable.Size = New System.Drawing.Size(137, 20) Me.ucrReceiverVariable.strNcFilePath = "" Me.ucrReceiverVariable.TabIndex = 2 Me.ucrReceiverVariable.ucrSelector = Nothing @@ -303,25 +298,45 @@ Partial Class dlgOneVarFitModel Me.ucrSelectorOneVarFitMod.bDropUnusedFilterLevels = False Me.ucrSelectorOneVarFitMod.bShowHiddenColumns = False Me.ucrSelectorOneVarFitMod.bUseCurrentFilter = True - Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(13, 57) + Me.ucrSelectorOneVarFitMod.Location = New System.Drawing.Point(10, 46) Me.ucrSelectorOneVarFitMod.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorOneVarFitMod.Name = "ucrSelectorOneVarFitMod" - Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(280, 222) + Me.ucrSelectorOneVarFitMod.Size = New System.Drawing.Size(210, 180) Me.ucrSelectorOneVarFitMod.TabIndex = 1 ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(13, 434) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(5) + Me.ucrBase.Location = New System.Drawing.Point(10, 353) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(547, 64) + Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrInputCIMethods + ' + Me.ucrInputCIMethods.AddQuotesIfUnrecognised = True + Me.ucrInputCIMethods.IsReadOnly = False + Me.ucrInputCIMethods.Location = New System.Drawing.Point(328, 179) + Me.ucrInputCIMethods.Name = "ucrInputCIMethods" + Me.ucrInputCIMethods.Size = New System.Drawing.Size(60, 21) + Me.ucrInputCIMethods.TabIndex = 61 + ' + 'lblCIMethods + ' + Me.lblCIMethods.AutoSize = True + Me.lblCIMethods.Location = New System.Drawing.Point(243, 185) + Me.lblCIMethods.Name = "lblCIMethods" + Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) + Me.lblCIMethods.TabIndex = 62 + Me.lblCIMethods.Text = "C.I.Method:" + ' 'dlgOneVarFitModel ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(552, 517) + Me.ClientSize = New System.Drawing.Size(414, 420) + Me.Controls.Add(Me.lblCIMethods) + Me.Controls.Add(Me.ucrInputCIMethods) Me.Controls.Add(Me.lblMethod) Me.Controls.Add(Me.ucrInputMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) @@ -347,7 +362,6 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrSelectorOneVarFitMod) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Margin = New System.Windows.Forms.Padding(4) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgOneVarFitModel" @@ -383,4 +397,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox Friend WithEvents lblNullHypothesis As Label + Friend WithEvents lblCIMethods As Label + Friend WithEvents ucrInputCIMethods As ucrInputComboBox End Class \ No newline at end of file From 65c290b1f4945fa18a09d0b105a18e63383d1df5 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 17 Jul 2020 12:56:33 +0300 Subject: [PATCH 122/172] Implementing tests --- instat/dlgOneVarFitModel.vb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8e058f82997..eeaecf811a3 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -441,6 +441,7 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.SetRCode(clsBionomialFunction, bReset) ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMethod.SetRCode(clsMeanCIFunction, bReset) + ucrInputCIMethods.SetRCode(clsBionomialFunction) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub @@ -656,6 +657,13 @@ Public Class dlgOneVarFitModel ucrInputMethod.Visible = True End If End If + If ucrInputComboTests.GetText() = "Binomial" Then + ucrInputCIMethods.SetItems({"Clopper-Pearson", "binom.test", "Score", "Wilson", "prop.test", "Wald", "Agresti-Coull", "Plus4"}) + ucrInputCIMethods.SetName("Clopper-Pearson") + ElseIf ucrInputCIMethods.GetText() = "Bartel" Then + ucrInputCIMethods.SetItems({"normal", "beta", "auto"}) + ucrInputCIMethods.SetName("normal") + End If End Sub From 98869b5d23890388a44750b28ea2a97205a45f0b Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 17 Jul 2020 20:27:08 +0300 Subject: [PATCH 123/172] More addition to the test functions --- instat/dlgOneVarFitModel.vb | 236 ++++++++++++++------------ instat/dlgOneVarFitModel2.Designer.vb | 231 ++++++++++++++++++------- 2 files changed, 293 insertions(+), 174 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index eeaecf811a3..523340339d9 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -19,7 +19,7 @@ Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRunsFunction, clsSenFunction, clsSerialCorrFunction, clsSnhFunction, clsAdFunction, clsCvmFunction, clsLillieFunction, clsPearsonFunction, clsSfFunction As New RFunction - Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsPoissonCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction + Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -41,7 +41,12 @@ Public Class dlgOneVarFitModel End Sub Private Sub InitialiseDialog() - Dim dctucrOperator As New Dictionary(Of String, String) + Dim dctCIMethods As New Dictionary(Of String, String) + Dim dctMethods As New Dictionary(Of String, String) + Dim dctmeanCI As New Dictionary(Of String, String) + Dim dctMedianCI As New Dictionary(Of String, String) + Dim dctVarCI As New Dictionary(Of String, String) + Dim dctQuantileCI As New Dictionary(Of String, String) Dim lstCommandButtons As New List(Of Control) ucrBase.iHelpTopicID = 296 @@ -74,55 +79,100 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetCheckBoxText("Save Model") ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") - 'ucrSaveModel.SetPrefix("Normal") ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br", "Runs", "Sen", "Serial Corr", "Snh", "Ad", "Cvm", "Lillie", "Pearson", "Sf"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() - ucrInputComboEstimate.SetItems({"mean", "median", "normal", "poisson", "quantile", "sd", "variance"}) + ucrInputComboEstimate.SetItems({"Mean", "Median", "Normal", "Quantile", "Sd", "Variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() - ucrInputMethod.SetParameter(New RParameter("method", 3)) - ucrInputMethod.SetItems({"classic", "boot", "bonett", "norm", "basic", "stud", "perc", "bca", "exact", "boot", "score", "wald", "byar"}) - ucrInputMethod.SetDropDownStyleAsNonEditable() - - ucrInputCIMethods.SetParameter(New RParameter("ci.method", 4)) - ucrInputCIMethods.SetItems({"Clopper-Pearson", "binom.test", "Score", "Wilson", "prop.test", "Wald", "Agresti-Coull", "Plus4", "normal", "beta", "auto"}) + ucrInputMeanCIMethod.SetParameter(New RParameter("method", 3)) + dctmeanCI.Add("Classic", Chr(34) & "classic" & Chr(34)) + dctmeanCI.Add("Boot", Chr(34) & "boot" & Chr(34)) + ucrInputMeanCIMethod.SetItems(dctmeanCI) + ucrInputMeanCIMethod.SetDropDownStyleAsNonEditable() + + ucrInputComboMedianCI.SetParameter(New RParameter("method", 2)) + dctMedianCI.Add("Exact", Chr(34) & "exact" & Chr(34)) + dctMedianCI.Add("Boot", Chr(34) & "boot" & Chr(34)) + ucrInputComboMedianCI.SetItems(dctMedianCI) + ucrInputComboMedianCI.SetDropDownStyleAsNonEditable() + + ucrInputComboVarianceCI.SetParameter(New RParameter("method", 1)) + dctVarCI.Add("Classic", Chr(34) & "classic" & Chr(34)) + dctVarCI.Add("Bonett", Chr(34) & "bonett" & Chr(34)) + dctVarCI.Add("Norm", Chr(34) & "norm" & Chr(34)) + dctVarCI.Add("Basic", Chr(34) & "basic" & Chr(34)) + dctVarCI.Add("Stud", Chr(34) & "stud" & Chr(34)) + dctVarCI.Add("Perc", Chr(34) & "perc" & Chr(34)) + dctVarCI.Add("Bca", Chr(34) & "bca" & Chr(34)) + ucrInputComboVarianceCI.SetItems(dctVarCI) + ucrInputComboVarianceCI.SetDropDownStyleAsNonEditable() + + ucrInputComboQuantilCI.SetParameter(New RParameter("bootci.type", 5)) + dctQuantileCI.Add("Norm", Chr(34) & "norm" & Chr(34)) + dctQuantileCI.Add("Basic", Chr(34) & "basic" & Chr(34)) + dctQuantileCI.Add("Perc", Chr(34) & "perc" & Chr(34)) + dctQuantileCI.Add("Bca", Chr(34) & "bca" & Chr(34)) + ucrInputComboQuantilCI.SetItems(dctQuantileCI) + ucrInputComboQuantilCI.SetDropDownStyleAsNonEditable() + + ucrInputCIMethods.SetParameter(New RParameter("ci.method", 3)) + dctCIMethods.Add("Clopper-Pearson", Chr(34) & "Clopper-Pearson" & Chr(34)) + dctCIMethods.Add("binom.test", Chr(34) & "binom.test" & Chr(34)) + dctCIMethods.Add("Score", Chr(34) & "Score" & Chr(34)) + dctCIMethods.Add("Wilson", Chr(34) & "Wilson" & Chr(34)) + dctCIMethods.Add("prop.test", Chr(34) & "prop.test" & Chr(34)) + dctCIMethods.Add("Plus4", Chr(34) & "Plus4" & Chr(34)) + dctCIMethods.Add("Agresti-Coull", Chr(34) & "Agresti-Coull" & Chr(34)) + dctCIMethods.Add("Wald", Chr(34) & "Wald" & Chr(34)) + ucrInputCIMethods.SetItems(dctCIMethods) ucrInputCIMethods.SetDropDownStyleAsNonEditable() + ucrInputComboMethod.SetParameter(New RParameter("method", 1)) + dctMethods.Add("Normal", Chr(34) & "normal" & Chr(34)) + dctMethods.Add("Beta", Chr(34) & "beta" & Chr(34)) + dctMethods.Add("Auto", Chr(34) & "auto" & Chr(34)) + ucrInputComboMethod.SetItems(dctMethods) + ucrInputComboMethod.SetDropDownStyleAsNonEditable() - ucrChkOmmitMissing.SetText("Ommit Missing") - + ucrChkOmitMissing.SetText("Omit Missing Values") ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) ucrNudConfidenceLevel.DecimalPlaces = 2 ucrNudConfidenceLevel.Increment = 0.05 - - 'ucrNudConfLevel.SetParameter(New RParameter("conf.level", 2)) - 'ucrNudConfLevel.DecimalPlaces = 2 - 'ucrNudConfLevel.Increment = 0.05 + ucrNudConfidenceLevel.Maximum = 1 + ucrNudConfidenceLevel.SetRDefault(0.95) - ucrInputNullHypothesis.SetParameter(New RParameter("mu", 1)) - ucrInputNullHypothesis.SetParameterValue(0) + ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) + ucrInputNullHypothesis.SetParameterValue("0.5") ucrInputNullHypothesis.SetText("Null Hypothesis") - ucrInputNullHypothesis.SetValidationTypeAsNumeric() - + ucrInputNullHypothesis.SetValidationTypeAsNumeric(0, 1) + ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.95) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.5) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputMethod, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="classic") - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputCIMethods, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Clopper-Pearson") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"Mean"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"Median"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"Variance"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) - ucrInputMethod.SetLinkedDisplayControl(lblMethod) + ucrInputMeanCIMethod.SetLinkedDisplayControl(lblMeanCIMethod) + ucrInputComboMedianCI.SetLinkedDisplayControl(lblMedianCIMethod) + ucrInputComboQuantilCI.SetLinkedDisplayControl(lblQuantileCI) + ucrInputComboVarianceCI.SetLinkedDisplayControl(lblVarCI) ucrInputCIMethods.SetLinkedDisplayControl(lblCIMethods) + ucrInputComboMethod.SetLinkedDisplayControl(lblMethods) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -168,7 +218,6 @@ Public Class dlgOneVarFitModel clsMeanCIFunction = New RFunction clsMedianCIFunction = New RFunction clsNormCIFunction = New RFunction - clsPoissonCIFunction = New RFunction clsQuantileCIFunction = New RFunction clsSdCIFunction = New RFunction clsVarCIFunction = New RFunction @@ -242,8 +291,8 @@ Public Class dlgOneVarFitModel 'Test clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") - clsBionomialFunction.AddParameter("n", "", iPosition:=1) - + clsBionomialFunction.AddParameter("p", 0.5, iPosition:=1) + clsBionomialFunction.AddParameter("ci.method", Chr(34) & "Clopper-Pearson" & Chr(34), iPosition:=3) clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") @@ -268,6 +317,7 @@ Public Class dlgOneVarFitModel clsBartelFunction.SetPackageName("DescTools") clsBartelFunction.SetRCommand("BartelsRankTest") + clsBartelFunction.AddParameter("method", Chr(34) & "normal" & Chr(34), iPosition:=1) clsBrFunction.SetPackageName("trend") clsBrFunction.SetRCommand("br.test") @@ -307,11 +357,12 @@ Public Class dlgOneVarFitModel clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") clsMeanCIFunction.AddParameter("tream", "0", iPosition:=1) - clsMeanCIFunction.AddParameter("na.rm", "TRUE", iPosition:=3) + clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=3) + clsMedianCIFunction.SetPackageName("DescTools") clsMedianCIFunction.SetRCommand("MedianCI ") - clsMedianCIFunction.AddParameter("na.rm", "TRUE", iPosition:=2) + clsMedianCIFunction.AddParameter("method", Chr(34) & "exact" & Chr(34), iPosition:=2) clsNormCIFunction.SetPackageName("MKinfer") clsNormCIFunction.SetRCommand("normCI") @@ -319,11 +370,7 @@ Public Class dlgOneVarFitModel clsNormCIFunction.AddParameter("sd", "NULL", iPosition:=2) clsNormCIFunction.AddParameter("boot", "FALSE", iPosition:=4) clsNormCIFunction.AddParameter("R", "9999", iPosition:=5) - clsNormCIFunction.AddParameter("bootci.type", "all", iPosition:=6) - - clsPoissonCIFunction.SetPackageName("DescTools") - clsPoissonCIFunction.SetRCommand("PoissonCI") - clsPoissonCIFunction.AddParameter("n", "1", iPosition:=1) + clsNormCIFunction.AddParameter("bootci.type", Chr(34) & "all" & Chr(34), iPosition:=6) clsQuantileCIFunction.SetPackageName("MKinfer") @@ -332,7 +379,8 @@ Public Class dlgOneVarFitModel clsQuantileCIFunction.AddParameter("method", Chr(34) & "exact" & Chr(34), iPosition:=3) clsQuantileCIFunction.AddParameter("R", "9999", iPosition:=4) clsQuantileCIFunction.AddParameter("minLength", "FALSE", iPosition:=6) - clsQuantileCIFunction.AddParameter("na.rm", "TRUE", iPosition:=7) + clsQuantileCIFunction.AddParameter("bootci.type", Chr(34) & "norm" & Chr(34), iPosition:=5) + clsSdCIFunction.SetPackageName("MKinfer") @@ -344,7 +392,7 @@ Public Class dlgOneVarFitModel clsVarCIFunction.SetPackageName("DescTools") clsVarCIFunction.SetRCommand("VarCI") - clsVarCIFunction.AddParameter("na.rm", "TRUE", iPosition:=3) + clsVarCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=1) clsROneVarFitModel.SetAssignTo("last_model", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempModel:="last_model") clsRLogLikFunction.SetAssignTo("last_likelihood", strTempDataframe:=ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_likelihood") @@ -366,23 +414,22 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("x", 0), iAdditionalPairNo:=7) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("x", 0), iAdditionalPairNo:=8) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("x", 0), iAdditionalPairNo:=9) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("x", 0), iAdditionalPairNo:=10) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=13) - ucrChkOmmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkOmmitMissing.GetParameter(), iAdditionalPairNo:=1) - ucrChkOmmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkOmmitMissing.GetParameter(), iAdditionalPairNo:=2) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=14) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=15) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=16) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("x", 0), iAdditionalPairNo:=17) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("x", 0), iAdditionalPairNo:=18) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("x", 0), iAdditionalPairNo:=19) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsAdFunction, New RParameter("x", 0), iAdditionalPairNo:=20) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsCvmFunction, New RParameter("x", 0), iAdditionalPairNo:=21) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=22) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=23) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=24) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=10) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) + ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=1) + ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=2) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=13) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=14) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=15) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("x", 0), iAdditionalPairNo:=16) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("x", 0), iAdditionalPairNo:=17) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("x", 0), iAdditionalPairNo:=18) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsAdFunction, New RParameter("x", 0), iAdditionalPairNo:=19) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsCvmFunction, New RParameter("x", 0), iAdditionalPairNo:=20) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=21) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=22) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) @@ -392,18 +439,15 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("conf.leve", 3), iAdditionalPairNo:=10) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=12) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=13) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=15) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=10) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=12) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=13) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) - ucrInputMethod.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("method", 3), 1) - ucrInputMethod.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("bootci.type", 5), 2) - ucrInputMethod.AddAdditionalCodeParameterPair(clsPoissonCIFunction, New RParameter("method", 3), iAdditionalPairNo:=3) - ucrInputMethod.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("method", 1), iAdditionalPairNo:=4) + + ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) @@ -427,21 +471,24 @@ Public Class dlgOneVarFitModel ' Additional Rcode for estimates functions ucrSaveModel.AddAdditionalRCode(clsMeanCIFunction, iAdditionalPairNo:=18) ucrSaveModel.AddAdditionalRCode(clsMedianCIFunction, iAdditionalPairNo:=19) - ucrSaveModel.AddAdditionalRCode(clsPoissonCIFunction, iAdditionalPairNo:=20) - ucrSaveModel.AddAdditionalRCode(clsQuantileCIFunction, iAdditionalPairNo:=21) - ucrSaveModel.AddAdditionalRCode(clsSdCIFunction, iAdditionalPairNo:=22) - ucrSaveModel.AddAdditionalRCode(clsVarCIFunction, iAdditionalPairNo:=23) + ucrSaveModel.AddAdditionalRCode(clsQuantileCIFunction, iAdditionalPairNo:=20) + ucrSaveModel.AddAdditionalRCode(clsSdCIFunction, iAdditionalPairNo:=21) + ucrSaveModel.AddAdditionalRCode(clsVarCIFunction, iAdditionalPairNo:=22) ucrPnlGeneralExactCase.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) - ucrChkOmmitMissing.SetRCode(clsMeanCIFunction, bReset) + ucrChkOmitMissing.SetRCode(clsMeanCIFunction, bReset) 'ucrNudConfLevel.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsBionomialFunction, bReset) ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) - ucrInputMethod.SetRCode(clsMeanCIFunction, bReset) - ucrInputCIMethods.SetRCode(clsBionomialFunction) + ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) + ucrInputCIMethods.SetRCode(clsBionomialFunction, bReset) + ucrInputComboMethod.SetRCode(clsBartelFunction, bReset) + ucrInputComboMedianCI.SetRCode(clsMedianCIFunction, bReset) + ucrInputComboVarianceCI.SetRCode(clsVarCIFunction, bReset) + ucrInputComboQuantilCI.SetRCode(clsQuantileCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub @@ -558,11 +605,13 @@ Public Class dlgOneVarFitModel End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged - clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) - ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) - PlotResiduals() - StartParameterValues() - TestOKEnabled() + If rdoGeneralCase.Checked Then + clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) + ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) + PlotResiduals() + StartParameterValues() + TestOKEnabled() + End If End Sub Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged @@ -620,8 +669,6 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsMedianCIFunction) Case "normal" ucrBase.clsRsyntax.SetBaseRFunction(clsNormCIFunction) - Case "poisson" - ucrBase.clsRsyntax.SetBaseRFunction(clsPoissonCIFunction) Case "quantile" ucrBase.clsRsyntax.SetBaseRFunction(clsQuantileCIFunction) Case "sd" @@ -634,37 +681,6 @@ Public Class dlgOneVarFitModel Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetTestEstimateBaseFunction() - If ucrInputComboEstimate.GetText() = "median" Then - ucrInputMethod.SetItems({"exact", "boot"}) - ucrInputMethod.SetName("exact") - ElseIf ucrInputComboEstimate.GetText() = "mean" Then - ucrInputMethod.SetItems({"classic", "boot"}) - ucrInputMethod.SetName("classic") - ElseIf ucrInputComboEstimate.GetText() = "variance" Then - ucrInputMethod.SetItems({"classic", "bonett", "norm", "basic", "stud", "perc", "bca"}) - ucrInputMethod.SetName("classic") - ElseIf ucrInputComboEstimate.GetText() = "poisson" Then - ucrInputMethod.SetItems({"exact", "score", "wald", "byar"}) - ucrInputMethod.SetName("exact") - ElseIf ucrInputComboEstimate.GetText() = "quantile" Then - ucrInputMethod.SetItems({"norm", "basic", "per", "bca"}) - ucrInputMethod.SetName("norm") - End If - If rdoEstimate.Checked Then - If (ucrInputComboEstimate.GetText() = "normal" Or ucrInputComboEstimate.GetText() = "sd") Then - ucrInputMethod.Visible = False - Else - ucrInputMethod.Visible = True - End If - End If - If ucrInputComboTests.GetText() = "Binomial" Then - ucrInputCIMethods.SetItems({"Clopper-Pearson", "binom.test", "Score", "Wilson", "prop.test", "Wald", "Agresti-Coull", "Plus4"}) - ucrInputCIMethods.SetName("Clopper-Pearson") - ElseIf ucrInputCIMethods.GetText() = "Bartel" Then - ucrInputCIMethods.SetItems({"normal", "beta", "auto"}) - ucrInputCIMethods.SetName("normal") - End If - End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 98eaf2722b5..955f633e5f2 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -46,15 +46,22 @@ Partial Class dlgOneVarFitModel Me.rdoEstimate = New System.Windows.Forms.RadioButton() Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() - Me.lblMethod = New System.Windows.Forms.Label() + Me.lblMeanCIMethod = New System.Windows.Forms.Label() Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.lblNullHypothesis = New System.Windows.Forms.Label() - Me.ucrInputMethod = New instat.ucrInputComboBox() + Me.lblCIMethods = New System.Windows.Forms.Label() + Me.lblMethods = New System.Windows.Forms.Label() + Me.ucrInputComboQuantilCI = New instat.ucrInputComboBox() + Me.ucrInputComboMedianCI = New instat.ucrInputComboBox() + Me.ucrInputComboVarianceCI = New instat.ucrInputComboBox() + Me.ucrInputComboMethod = New instat.ucrInputComboBox() + Me.ucrInputCIMethods = New instat.ucrInputComboBox() + Me.ucrInputMeanCIMethod = New instat.ucrInputComboBox() Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() Me.ucrNudConfidenceLevel = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() - Me.ucrChkOmmitMissing = New instat.ucrCheck() + Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkConvertVariate = New instat.ucrCheck() Me.ucrPnlGeneralExactCase = New instat.UcrPanel() Me.ucrSaveModel = New instat.ucrSave() @@ -62,14 +69,15 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputCIMethods = New instat.ucrInputComboBox() - Me.lblCIMethods = New System.Windows.Forms.Label() + Me.lblMedianCIMethod = New System.Windows.Forms.Label() + Me.lblVarCI = New System.Windows.Forms.Label() + Me.lblQuantileCI = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(249, 47) + Me.LblVariable.Location = New System.Drawing.Point(257, 69) Me.LblVariable.Name = "LblVariable" Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 @@ -156,20 +164,20 @@ Partial Class dlgOneVarFitModel Me.lblEstimate.TabIndex = 49 Me.lblEstimate.Text = "Estimate:" ' - 'lblMethod + 'lblMeanCIMethod ' - Me.lblMethod.AutoSize = True - Me.lblMethod.Location = New System.Drawing.Point(240, 153) - Me.lblMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblMethod.Name = "lblMethod" - Me.lblMethod.Size = New System.Drawing.Size(46, 13) - Me.lblMethod.TabIndex = 54 - Me.lblMethod.Text = "Method:" + Me.lblMeanCIMethod.AutoSize = True + Me.lblMeanCIMethod.Location = New System.Drawing.Point(257, 175) + Me.lblMeanCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblMeanCIMethod.Name = "lblMeanCIMethod" + Me.lblMeanCIMethod.Size = New System.Drawing.Size(46, 13) + Me.lblMeanCIMethod.TabIndex = 54 + Me.lblMeanCIMethod.Text = "Method:" ' 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(232, 127) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(257, 149) Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) @@ -179,29 +187,96 @@ Partial Class dlgOneVarFitModel 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(240, 153) + Me.lblNullHypothesis.Location = New System.Drawing.Point(257, 175) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 Me.lblNullHypothesis.Text = "Null Hypothesis:" ' - 'ucrInputMethod + 'lblCIMethods + ' + Me.lblCIMethods.AutoSize = True + Me.lblCIMethods.Location = New System.Drawing.Point(257, 206) + Me.lblCIMethods.Name = "lblCIMethods" + Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) + Me.lblCIMethods.TabIndex = 62 + Me.lblCIMethods.Text = "C.I.Method:" + ' + 'lblMethods + ' + Me.lblMethods.AutoSize = True + Me.lblMethods.Location = New System.Drawing.Point(257, 206) + Me.lblMethods.Name = "lblMethods" + Me.lblMethods.Size = New System.Drawing.Size(46, 13) + Me.lblMethods.TabIndex = 64 + Me.lblMethods.Text = "Method:" + Me.lblMethods.UseWaitCursor = True + ' + 'ucrInputComboQuantilCI + ' + Me.ucrInputComboQuantilCI.AddQuotesIfUnrecognised = True + Me.ucrInputComboQuantilCI.IsReadOnly = False + Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(351, 172) + Me.ucrInputComboQuantilCI.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboQuantilCI.Name = "ucrInputComboQuantilCI" + Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboQuantilCI.TabIndex = 67 + ' + 'ucrInputComboMedianCI + ' + Me.ucrInputComboMedianCI.AddQuotesIfUnrecognised = True + Me.ucrInputComboMedianCI.IsReadOnly = False + Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(351, 172) + Me.ucrInputComboMedianCI.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboMedianCI.Name = "ucrInputComboMedianCI" + Me.ucrInputComboMedianCI.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboMedianCI.TabIndex = 66 + ' + 'ucrInputComboVarianceCI + ' + Me.ucrInputComboVarianceCI.AddQuotesIfUnrecognised = True + Me.ucrInputComboVarianceCI.IsReadOnly = False + Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(351, 172) + Me.ucrInputComboVarianceCI.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboVarianceCI.Name = "ucrInputComboVarianceCI" + Me.ucrInputComboVarianceCI.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboVarianceCI.TabIndex = 65 + ' + 'ucrInputComboMethod + ' + Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboMethod.IsReadOnly = False + Me.ucrInputComboMethod.Location = New System.Drawing.Point(351, 201) + Me.ucrInputComboMethod.Name = "ucrInputComboMethod" + Me.ucrInputComboMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboMethod.TabIndex = 63 ' - Me.ucrInputMethod.AddQuotesIfUnrecognised = True - Me.ucrInputMethod.IsReadOnly = False - Me.ucrInputMethod.Location = New System.Drawing.Point(329, 150) - Me.ucrInputMethod.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) - Me.ucrInputMethod.Name = "ucrInputMethod" - Me.ucrInputMethod.Size = New System.Drawing.Size(60, 21) - Me.ucrInputMethod.TabIndex = 53 + 'ucrInputCIMethods + ' + Me.ucrInputCIMethods.AddQuotesIfUnrecognised = True + Me.ucrInputCIMethods.IsReadOnly = False + Me.ucrInputCIMethods.Location = New System.Drawing.Point(351, 201) + Me.ucrInputCIMethods.Name = "ucrInputCIMethods" + Me.ucrInputCIMethods.Size = New System.Drawing.Size(60, 21) + Me.ucrInputCIMethods.TabIndex = 61 + ' + 'ucrInputMeanCIMethod + ' + Me.ucrInputMeanCIMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMeanCIMethod.IsReadOnly = False + Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(351, 172) + Me.ucrInputMeanCIMethod.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputMeanCIMethod.Name = "ucrInputMeanCIMethod" + Me.ucrInputMeanCIMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputMeanCIMethod.TabIndex = 53 ' 'ucrInputNullHypothesis ' Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputNullHypothesis.IsMultiline = False Me.ucrInputNullHypothesis.IsReadOnly = False - Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(329, 150) - Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(351, 172) + Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(58, 21) Me.ucrInputNullHypothesis.TabIndex = 60 @@ -210,8 +285,8 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(330, 124) - Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(351, 146) + Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" @@ -224,7 +299,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True Me.ucrInputComboEstimate.IsReadOnly = False Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) - Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboEstimate.Name = "ucrInputComboEstimate" Me.ucrInputComboEstimate.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboEstimate.TabIndex = 48 @@ -234,25 +309,25 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboTests.AddQuotesIfUnrecognised = True Me.ucrInputComboTests.IsReadOnly = False Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) - Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboTests.Name = "ucrInputComboTests" Me.ucrInputComboTests.Size = New System.Drawing.Size(92, 21) Me.ucrInputComboTests.TabIndex = 46 ' - 'ucrChkOmmitMissing + 'ucrChkOmitMissing ' - Me.ucrChkOmmitMissing.Checked = False - Me.ucrChkOmmitMissing.Location = New System.Drawing.Point(310, 41) - Me.ucrChkOmmitMissing.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) - Me.ucrChkOmmitMissing.Name = "ucrChkOmmitMissing" - Me.ucrChkOmmitMissing.Size = New System.Drawing.Size(83, 20) - Me.ucrChkOmmitMissing.TabIndex = 52 + Me.ucrChkOmitMissing.Checked = False + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(257, 116) + Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(142, 20) + Me.ucrChkOmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(242, 94) - Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(257, 116) + Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) Me.ucrChkConvertVariate.TabIndex = 42 @@ -260,7 +335,7 @@ Partial Class dlgOneVarFitModel 'ucrPnlGeneralExactCase ' Me.ucrPnlGeneralExactCase.Location = New System.Drawing.Point(34, 7) - Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrPnlGeneralExactCase.Margin = New System.Windows.Forms.Padding(5) Me.ucrPnlGeneralExactCase.Name = "ucrPnlGeneralExactCase" Me.ucrPnlGeneralExactCase.Size = New System.Drawing.Size(371, 35) Me.ucrPnlGeneralExactCase.TabIndex = 39 @@ -276,7 +351,7 @@ Partial Class dlgOneVarFitModel 'ucrDistributionChoice ' Me.ucrDistributionChoice.Location = New System.Drawing.Point(10, 249) - Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5, 5, 5, 5) + Me.ucrDistributionChoice.Margin = New System.Windows.Forms.Padding(5) Me.ucrDistributionChoice.Name = "ucrDistributionChoice" Me.ucrDistributionChoice.Size = New System.Drawing.Size(219, 30) Me.ucrDistributionChoice.TabIndex = 11 @@ -284,7 +359,7 @@ Partial Class dlgOneVarFitModel 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(249, 64) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(257, 86) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing @@ -307,38 +382,58 @@ Partial Class dlgOneVarFitModel 'ucrBase ' Me.ucrBase.Location = New System.Drawing.Point(10, 353) - Me.ucrBase.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4) + Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputCIMethods + 'lblMedianCIMethod ' - Me.ucrInputCIMethods.AddQuotesIfUnrecognised = True - Me.ucrInputCIMethods.IsReadOnly = False - Me.ucrInputCIMethods.Location = New System.Drawing.Point(328, 179) - Me.ucrInputCIMethods.Name = "ucrInputCIMethods" - Me.ucrInputCIMethods.Size = New System.Drawing.Size(60, 21) - Me.ucrInputCIMethods.TabIndex = 61 + Me.lblMedianCIMethod.AutoSize = True + Me.lblMedianCIMethod.Location = New System.Drawing.Point(250, 175) + Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblMedianCIMethod.Name = "lblMedianCIMethod" + Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) + Me.lblMedianCIMethod.TabIndex = 68 + Me.lblMedianCIMethod.Text = "MedianCI Method:" ' - 'lblCIMethods + 'lblVarCI ' - Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(243, 185) - Me.lblCIMethods.Name = "lblCIMethods" - Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) - Me.lblCIMethods.TabIndex = 62 - Me.lblCIMethods.Text = "C.I.Method:" + Me.lblVarCI.AutoSize = True + Me.lblVarCI.Location = New System.Drawing.Point(250, 175) + Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblVarCI.Name = "lblVarCI" + Me.lblVarCI.Size = New System.Drawing.Size(75, 13) + Me.lblVarCI.TabIndex = 69 + Me.lblVarCI.Text = "VarCI Method:" + ' + 'lblQuantileCI + ' + Me.lblQuantileCI.AutoSize = True + Me.lblQuantileCI.Location = New System.Drawing.Point(254, 175) + Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblQuantileCI.Name = "lblQuantileCI" + Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) + Me.lblQuantileCI.TabIndex = 70 + Me.lblQuantileCI.Text = "Bootci.Type:" ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(414, 420) + Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblQuantileCI) + Me.Controls.Add(Me.lblVarCI) + Me.Controls.Add(Me.lblMedianCIMethod) + Me.Controls.Add(Me.ucrInputComboQuantilCI) + Me.Controls.Add(Me.ucrInputComboMedianCI) + Me.Controls.Add(Me.ucrInputComboVarianceCI) + Me.Controls.Add(Me.lblMethods) + Me.Controls.Add(Me.ucrInputComboMethod) Me.Controls.Add(Me.lblCIMethods) Me.Controls.Add(Me.ucrInputCIMethods) - Me.Controls.Add(Me.lblMethod) - Me.Controls.Add(Me.ucrInputMethod) + Me.Controls.Add(Me.lblMeanCIMethod) + Me.Controls.Add(Me.ucrInputMeanCIMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) Me.Controls.Add(Me.ucrNudConfidenceLevel) Me.Controls.Add(Me.lblNullHypothesis) @@ -348,7 +443,7 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.lblTests) Me.Controls.Add(Me.ucrInputComboTests) Me.Controls.Add(Me.rdoEstimate) - Me.Controls.Add(Me.ucrChkOmmitMissing) + Me.Controls.Add(Me.ucrChkOmitMissing) Me.Controls.Add(Me.cmdDisplayOptions) Me.Controls.Add(Me.ucrChkConvertVariate) Me.Controls.Add(Me.rdoTest) @@ -390,13 +485,21 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblTests As Label Friend WithEvents ucrInputComboEstimate As ucrInputComboBox Friend WithEvents lblEstimate As Label - Friend WithEvents ucrChkOmmitMissing As ucrCheck - Friend WithEvents lblMethod As Label - Friend WithEvents ucrInputMethod As ucrInputComboBox + Friend WithEvents ucrChkOmitMissing As ucrCheck + Friend WithEvents lblMeanCIMethod As Label + Friend WithEvents ucrInputMeanCIMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox Friend WithEvents lblNullHypothesis As Label Friend WithEvents lblCIMethods As Label Friend WithEvents ucrInputCIMethods As ucrInputComboBox + Friend WithEvents lblMethods As Label + Friend WithEvents ucrInputComboMethod As ucrInputComboBox + Friend WithEvents ucrInputComboMedianCI As ucrInputComboBox + Friend WithEvents ucrInputComboVarianceCI As ucrInputComboBox + Friend WithEvents ucrInputComboQuantilCI As ucrInputComboBox + Friend WithEvents lblQuantileCI As Label + Friend WithEvents lblVarCI As Label + Friend WithEvents lblMedianCIMethod As Label End Class \ No newline at end of file From ca3a79a3b02e0a856a1edb9ddf6998433e1f1ab4 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sat, 18 Jul 2020 13:59:12 +0300 Subject: [PATCH 124/172] More addition to the test functions --- instat/dlgOneVarFitModel.vb | 19 ++++- instat/dlgOneVarFitModel2.Designer.vb | 110 +++++++++++++++++--------- 2 files changed, 89 insertions(+), 40 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 523340339d9..a75854dd012 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -147,12 +147,18 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) ucrInputNullHypothesis.SetParameterValue("0.5") - ucrInputNullHypothesis.SetText("Null Hypothesis") + 'ucrInputNullHypothesis.SetText("Null Hypothesis") ucrInputNullHypothesis.SetValidationTypeAsNumeric(0, 1) ucrInputNullHypothesis.AddQuotesIfUnrecognised = False + ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) + 'ucrInputTxtSd.SetText("Sd_Pop:") + ucrInputTxtSd.SetParameterValue(1) + ucrInputTxtSd.SetValidationTypeAsNumeric() + ucrInputTxtSd.AddQuotesIfUnrecognised = False + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="mean") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) @@ -163,6 +169,9 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) @@ -173,6 +182,7 @@ Public Class dlgOneVarFitModel ucrInputComboVarianceCI.SetLinkedDisplayControl(lblVarCI) ucrInputCIMethods.SetLinkedDisplayControl(lblCIMethods) ucrInputComboMethod.SetLinkedDisplayControl(lblMethods) + ucrInputTxtSd.SetLinkedDisplayControl(lblSd) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -313,7 +323,7 @@ Public Class dlgOneVarFitModel clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") - clsZTestFunction.AddParameter("mu", "0", iPosition:=2) + clsZTestFunction.AddParameter("mu", "0", iPosition:=1) clsBartelFunction.SetPackageName("DescTools") clsBartelFunction.SetRCommand("BartelsRankTest") @@ -432,7 +442,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) @@ -489,6 +499,7 @@ Public Class dlgOneVarFitModel ucrInputComboMedianCI.SetRCode(clsMedianCIFunction, bReset) ucrInputComboVarianceCI.SetRCode(clsVarCIFunction, bReset) ucrInputComboQuantilCI.SetRCode(clsQuantileCIFunction, bReset) + ucrInputTxtSd.SetRCode(clsZTestFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 955f633e5f2..685eb99197f 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -51,6 +51,11 @@ Partial Class dlgOneVarFitModel Me.lblNullHypothesis = New System.Windows.Forms.Label() Me.lblCIMethods = New System.Windows.Forms.Label() Me.lblMethods = New System.Windows.Forms.Label() + Me.lblMedianCIMethod = New System.Windows.Forms.Label() + Me.lblVarCI = New System.Windows.Forms.Label() + Me.lblQuantileCI = New System.Windows.Forms.Label() + Me.lblSd = New System.Windows.Forms.Label() + Me.ucrInputTxtSd = New instat.ucrInputTextBox() Me.ucrInputComboQuantilCI = New instat.ucrInputComboBox() Me.ucrInputComboMedianCI = New instat.ucrInputComboBox() Me.ucrInputComboVarianceCI = New instat.ucrInputComboBox() @@ -69,9 +74,7 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblMedianCIMethod = New System.Windows.Forms.Label() - Me.lblVarCI = New System.Windows.Forms.Label() - Me.lblQuantileCI = New System.Windows.Forms.Label() + Me.ucrInputComboConfidenceLevel = New instat.ucrInputComboBox() Me.SuspendLayout() ' 'LblVariable @@ -177,7 +180,7 @@ Partial Class dlgOneVarFitModel 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(257, 149) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(250, 149) Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) @@ -196,7 +199,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(257, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(265, 206) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -205,18 +208,67 @@ Partial Class dlgOneVarFitModel 'lblMethods ' Me.lblMethods.AutoSize = True - Me.lblMethods.Location = New System.Drawing.Point(257, 206) + Me.lblMethods.Location = New System.Drawing.Point(273, 206) Me.lblMethods.Name = "lblMethods" Me.lblMethods.Size = New System.Drawing.Size(46, 13) Me.lblMethods.TabIndex = 64 Me.lblMethods.Text = "Method:" Me.lblMethods.UseWaitCursor = True ' + 'lblMedianCIMethod + ' + Me.lblMedianCIMethod.AutoSize = True + Me.lblMedianCIMethod.Location = New System.Drawing.Point(249, 175) + Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblMedianCIMethod.Name = "lblMedianCIMethod" + Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) + Me.lblMedianCIMethod.TabIndex = 68 + Me.lblMedianCIMethod.Text = "MedianCI Method:" + ' + 'lblVarCI + ' + Me.lblVarCI.AutoSize = True + Me.lblVarCI.Location = New System.Drawing.Point(250, 175) + Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblVarCI.Name = "lblVarCI" + Me.lblVarCI.Size = New System.Drawing.Size(75, 13) + Me.lblVarCI.TabIndex = 69 + Me.lblVarCI.Text = "VarCI Method:" + ' + 'lblQuantileCI + ' + Me.lblQuantileCI.AutoSize = True + Me.lblQuantileCI.Location = New System.Drawing.Point(263, 175) + Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) + Me.lblQuantileCI.Name = "lblQuantileCI" + Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) + Me.lblQuantileCI.TabIndex = 70 + Me.lblQuantileCI.Text = "Bootci.Type:" + ' + 'lblSd + ' + Me.lblSd.AutoSize = True + Me.lblSd.Location = New System.Drawing.Point(265, 206) + Me.lblSd.Name = "lblSd" + Me.lblSd.Size = New System.Drawing.Size(48, 13) + Me.lblSd.TabIndex = 72 + Me.lblSd.Text = "Sd_Pop:" + ' + 'ucrInputTxtSd + ' + Me.ucrInputTxtSd.AddQuotesIfUnrecognised = True + Me.ucrInputTxtSd.IsMultiline = False + Me.ucrInputTxtSd.IsReadOnly = False + Me.ucrInputTxtSd.Location = New System.Drawing.Point(350, 201) + Me.ucrInputTxtSd.Name = "ucrInputTxtSd" + Me.ucrInputTxtSd.Size = New System.Drawing.Size(61, 21) + Me.ucrInputTxtSd.TabIndex = 71 + ' 'ucrInputComboQuantilCI ' Me.ucrInputComboQuantilCI.AddQuotesIfUnrecognised = True Me.ucrInputComboQuantilCI.IsReadOnly = False - Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(351, 172) + Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(350, 172) Me.ucrInputComboQuantilCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboQuantilCI.Name = "ucrInputComboQuantilCI" Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(60, 21) @@ -246,7 +298,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True Me.ucrInputComboMethod.IsReadOnly = False - Me.ucrInputComboMethod.Location = New System.Drawing.Point(351, 201) + Me.ucrInputComboMethod.Location = New System.Drawing.Point(350, 201) Me.ucrInputComboMethod.Name = "ucrInputComboMethod" Me.ucrInputComboMethod.Size = New System.Drawing.Size(60, 21) Me.ucrInputComboMethod.TabIndex = 63 @@ -387,41 +439,24 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'lblMedianCIMethod - ' - Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(250, 175) - Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblMedianCIMethod.Name = "lblMedianCIMethod" - Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) - Me.lblMedianCIMethod.TabIndex = 68 - Me.lblMedianCIMethod.Text = "MedianCI Method:" - ' - 'lblVarCI - ' - Me.lblVarCI.AutoSize = True - Me.lblVarCI.Location = New System.Drawing.Point(250, 175) - Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblVarCI.Name = "lblVarCI" - Me.lblVarCI.Size = New System.Drawing.Size(75, 13) - Me.lblVarCI.TabIndex = 69 - Me.lblVarCI.Text = "VarCI Method:" - ' - 'lblQuantileCI + 'ucrInputComboConfidenceLevel ' - Me.lblQuantileCI.AutoSize = True - Me.lblQuantileCI.Location = New System.Drawing.Point(254, 175) - Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblQuantileCI.Name = "lblQuantileCI" - Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) - Me.lblQuantileCI.TabIndex = 70 - Me.lblQuantileCI.Text = "Bootci.Type:" + Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True + Me.ucrInputComboConfidenceLevel.IsReadOnly = False + Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(350, 145) + Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboConfidenceLevel.Name = "ucrInputComboConfidenceLevel" + Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboConfidenceLevel.TabIndex = 73 ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.ucrInputComboConfidenceLevel) + Me.Controls.Add(Me.lblSd) + Me.Controls.Add(Me.ucrInputTxtSd) Me.Controls.Add(Me.lblQuantileCI) Me.Controls.Add(Me.lblVarCI) Me.Controls.Add(Me.lblMedianCIMethod) @@ -502,4 +537,7 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblQuantileCI As Label Friend WithEvents lblVarCI As Label Friend WithEvents lblMedianCIMethod As Label + Friend WithEvents ucrInputTxtSd As ucrInputTextBox + Friend WithEvents lblSd As Label + Friend WithEvents ucrInputComboConfidenceLevel As ucrInputComboBox End Class \ No newline at end of file From 58b3c5166bd56761e8e08c6956cbcf9113c25d14 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sat, 18 Jul 2020 15:44:51 +0300 Subject: [PATCH 125/172] More changes to the estimate part --- instat/dlgOneVarFitModel.vb | 40 +++++++++++++++++++-------- instat/dlgOneVarFitModel2.Designer.vb | 38 ++++++++++++++++--------- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a75854dd012..9c2fb37e8e2 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -47,6 +47,7 @@ Public Class dlgOneVarFitModel Dim dctMedianCI As New Dictionary(Of String, String) Dim dctVarCI As New Dictionary(Of String, String) Dim dctQuantileCI As New Dictionary(Of String, String) + Dim dctConfidence As New Dictionary(Of String, String) Dim lstCommandButtons As New List(Of Control) ucrBase.iHelpTopicID = 296 @@ -59,7 +60,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialcorrelationTest", "snh.test", "ad.test", "cvm.test", "lillie.test", "pearson.test", "sf.test"}) - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "PoissonCI", "quantileCI", "sdCI", "VarCI"}) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "quantileCI", "sdCI", "VarCI"}) ucrReceiverVariable.SetParameter(New RParameter("object", 0)) ucrReceiverVariable.Selector = ucrSelectorOneVarFitMod @@ -147,22 +148,35 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) ucrInputNullHypothesis.SetParameterValue("0.5") - 'ucrInputNullHypothesis.SetText("Null Hypothesis") + ucrInputNullHypothesis.SetText("Null Hypothesis") ucrInputNullHypothesis.SetValidationTypeAsNumeric(0, 1) ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) - 'ucrInputTxtSd.SetText("Sd_Pop:") + ucrInputTxtSd.SetText("Sd_Pop:") ucrInputTxtSd.SetParameterValue(1) ucrInputTxtSd.SetValidationTypeAsNumeric() ucrInputTxtSd.AddQuotesIfUnrecognised = False + ucrInputComboConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) + ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(0, 1) + dctConfidence.Add("0.500", "0.500") + dctConfidence.Add("0.900", "0.900") + dctConfidence.Add("0.950", "0.950") + dctConfidence.Add("0.980", "0.980") + dctConfidence.Add("0.990", "0.990") + dctConfidence.Add("0.999", "0.999") + ucrInputComboConfidenceLevel.SetItems(dctConfidence) + ucrInputComboConfidenceLevel.SetDropDownStyleAsEditable(bAdditionsAllowed:=True) + + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest, rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"Mean"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"Median"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"Variance"}, bNewLinkedHideIfParameterMissing:=True) @@ -172,6 +186,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"Mean", "Median", "Variance", "Normal", "Quantile", "Sd"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) @@ -183,6 +198,7 @@ Public Class dlgOneVarFitModel ucrInputCIMethods.SetLinkedDisplayControl(lblCIMethods) ucrInputComboMethod.SetLinkedDisplayControl(lblMethods) ucrInputTxtSd.SetLinkedDisplayControl(lblSd) + ucrInputComboConfidenceLevel.SetLinkedDisplayControl(lblCI) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -367,6 +383,7 @@ Public Class dlgOneVarFitModel clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") clsMeanCIFunction.AddParameter("tream", "0", iPosition:=1) + clsMeanCIFunction.AddParameter("conf.level", "0.500", iPosition:=2) clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=3) @@ -447,13 +464,12 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=8) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=9) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=10) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=12) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=13) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=2) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=5) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) @@ -500,7 +516,7 @@ Public Class dlgOneVarFitModel ucrInputComboVarianceCI.SetRCode(clsVarCIFunction, bReset) ucrInputComboQuantilCI.SetRCode(clsQuantileCIFunction, bReset) ucrInputTxtSd.SetRCode(clsZTestFunction, bReset) - + ucrInputComboConfidenceLevel.SetRCode(clsMeanCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 685eb99197f..c16f74f4f86 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -55,6 +55,7 @@ Partial Class dlgOneVarFitModel Me.lblVarCI = New System.Windows.Forms.Label() Me.lblQuantileCI = New System.Windows.Forms.Label() Me.lblSd = New System.Windows.Forms.Label() + Me.ucrInputComboConfidenceLevel = New instat.ucrInputComboBox() Me.ucrInputTxtSd = New instat.ucrInputTextBox() Me.ucrInputComboQuantilCI = New instat.ucrInputComboBox() Me.ucrInputComboMedianCI = New instat.ucrInputComboBox() @@ -74,7 +75,7 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputComboConfidenceLevel = New instat.ucrInputComboBox() + Me.lblCI = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -199,7 +200,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(265, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(244, 206) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -218,7 +219,7 @@ Partial Class dlgOneVarFitModel 'lblMedianCIMethod ' Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(249, 175) + Me.lblMedianCIMethod.Location = New System.Drawing.Point(244, 175) Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMedianCIMethod.Name = "lblMedianCIMethod" Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) @@ -238,7 +239,7 @@ Partial Class dlgOneVarFitModel 'lblQuantileCI ' Me.lblQuantileCI.AutoSize = True - Me.lblQuantileCI.Location = New System.Drawing.Point(263, 175) + Me.lblQuantileCI.Location = New System.Drawing.Point(244, 175) Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblQuantileCI.Name = "lblQuantileCI" Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) @@ -248,12 +249,22 @@ Partial Class dlgOneVarFitModel 'lblSd ' Me.lblSd.AutoSize = True - Me.lblSd.Location = New System.Drawing.Point(265, 206) + Me.lblSd.Location = New System.Drawing.Point(244, 206) Me.lblSd.Name = "lblSd" Me.lblSd.Size = New System.Drawing.Size(48, 13) Me.lblSd.TabIndex = 72 Me.lblSd.Text = "Sd_Pop:" ' + 'ucrInputComboConfidenceLevel + ' + Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True + Me.ucrInputComboConfidenceLevel.IsReadOnly = False + Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(350, 145) + Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboConfidenceLevel.Name = "ucrInputComboConfidenceLevel" + Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboConfidenceLevel.TabIndex = 73 + ' 'ucrInputTxtSd ' Me.ucrInputTxtSd.AddQuotesIfUnrecognised = True @@ -439,21 +450,21 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputComboConfidenceLevel + 'lblCI ' - Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True - Me.ucrInputComboConfidenceLevel.IsReadOnly = False - Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(350, 145) - Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputComboConfidenceLevel.Name = "ucrInputComboConfidenceLevel" - Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(60, 21) - Me.ucrInputComboConfidenceLevel.TabIndex = 73 + Me.lblCI.AutoSize = True + Me.lblCI.Location = New System.Drawing.Point(244, 148) + Me.lblCI.Name = "lblCI" + Me.lblCI.Size = New System.Drawing.Size(102, 13) + Me.lblCI.TabIndex = 74 + Me.lblCI.Text = "Confidence Interval:" ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblCI) Me.Controls.Add(Me.ucrInputComboConfidenceLevel) Me.Controls.Add(Me.lblSd) Me.Controls.Add(Me.ucrInputTxtSd) @@ -540,4 +551,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputTxtSd As ucrInputTextBox Friend WithEvents lblSd As Label Friend WithEvents ucrInputComboConfidenceLevel As ucrInputComboBox + Friend WithEvents lblCI As Label End Class \ No newline at end of file From 5a4ffc64131f037f2ad7e4bdefc448224669645a Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sat, 18 Jul 2020 17:09:22 +0300 Subject: [PATCH 126/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 9 +++- instat/dlgOneVarFitModel2.Designer.vb | 73 ++++++++++++++++++--------- 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 9c2fb37e8e2..1149e1daa8e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -145,6 +145,11 @@ Public Class dlgOneVarFitModel ucrNudConfidenceLevel.Maximum = 1 ucrNudConfidenceLevel.SetRDefault(0.95) + ucrNudQuantile.SetParameter(New RParameter("prob", 1)) + ucrNudQuantile.DecimalPlaces = 2 + ucrNudQuantile.Increment = 0.05 + ucrNudQuantile.Maximum = 1 + ucrNudQuantile.SetRDefault(0.5) ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) ucrInputNullHypothesis.SetParameterValue("0.5") @@ -186,7 +191,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"Mean", "Median", "Variance", "Normal", "Quantile", "Sd"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) @@ -199,6 +204,7 @@ Public Class dlgOneVarFitModel ucrInputComboMethod.SetLinkedDisplayControl(lblMethods) ucrInputTxtSd.SetLinkedDisplayControl(lblSd) ucrInputComboConfidenceLevel.SetLinkedDisplayControl(lblCI) + ucrNudQuantile.SetLinkedDisplayControl(lblQuantile) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -517,6 +523,7 @@ Public Class dlgOneVarFitModel ucrInputComboQuantilCI.SetRCode(clsQuantileCIFunction, bReset) ucrInputTxtSd.SetRCode(clsZTestFunction, bReset) ucrInputComboConfidenceLevel.SetRCode(clsMeanCIFunction, bReset) + ucrNudQuantile.SetRCode(clsQuantileCIFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index c16f74f4f86..99cbebd85fd 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -55,6 +55,9 @@ Partial Class dlgOneVarFitModel Me.lblVarCI = New System.Windows.Forms.Label() Me.lblQuantileCI = New System.Windows.Forms.Label() Me.lblSd = New System.Windows.Forms.Label() + Me.lblCI = New System.Windows.Forms.Label() + Me.lblQuantile = New System.Windows.Forms.Label() + Me.ucrNudQuantile = New instat.ucrNud() Me.ucrInputComboConfidenceLevel = New instat.ucrInputComboBox() Me.ucrInputTxtSd = New instat.ucrInputTextBox() Me.ucrInputComboQuantilCI = New instat.ucrInputComboBox() @@ -75,7 +78,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblCI = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -171,7 +173,7 @@ Partial Class dlgOneVarFitModel 'lblMeanCIMethod ' Me.lblMeanCIMethod.AutoSize = True - Me.lblMeanCIMethod.Location = New System.Drawing.Point(257, 175) + Me.lblMeanCIMethod.Location = New System.Drawing.Point(254, 175) Me.lblMeanCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMeanCIMethod.Name = "lblMeanCIMethod" Me.lblMeanCIMethod.Size = New System.Drawing.Size(46, 13) @@ -181,7 +183,7 @@ Partial Class dlgOneVarFitModel 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(250, 149) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(231, 149) Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) @@ -191,7 +193,7 @@ Partial Class dlgOneVarFitModel 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(257, 175) + Me.lblNullHypothesis.Location = New System.Drawing.Point(236, 175) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 @@ -200,7 +202,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(244, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(246, 206) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -209,7 +211,7 @@ Partial Class dlgOneVarFitModel 'lblMethods ' Me.lblMethods.AutoSize = True - Me.lblMethods.Location = New System.Drawing.Point(273, 206) + Me.lblMethods.Location = New System.Drawing.Point(254, 206) Me.lblMethods.Name = "lblMethods" Me.lblMethods.Size = New System.Drawing.Size(46, 13) Me.lblMethods.TabIndex = 64 @@ -219,7 +221,7 @@ Partial Class dlgOneVarFitModel 'lblMedianCIMethod ' Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(244, 175) + Me.lblMedianCIMethod.Location = New System.Drawing.Point(230, 175) Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMedianCIMethod.Name = "lblMedianCIMethod" Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) @@ -229,7 +231,7 @@ Partial Class dlgOneVarFitModel 'lblVarCI ' Me.lblVarCI.AutoSize = True - Me.lblVarCI.Location = New System.Drawing.Point(250, 175) + Me.lblVarCI.Location = New System.Drawing.Point(240, 175) Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblVarCI.Name = "lblVarCI" Me.lblVarCI.Size = New System.Drawing.Size(75, 13) @@ -249,12 +251,42 @@ Partial Class dlgOneVarFitModel 'lblSd ' Me.lblSd.AutoSize = True - Me.lblSd.Location = New System.Drawing.Point(244, 206) + Me.lblSd.Location = New System.Drawing.Point(253, 206) Me.lblSd.Name = "lblSd" Me.lblSd.Size = New System.Drawing.Size(48, 13) Me.lblSd.TabIndex = 72 Me.lblSd.Text = "Sd_Pop:" ' + 'lblCI + ' + Me.lblCI.AutoSize = True + Me.lblCI.Location = New System.Drawing.Point(226, 148) + Me.lblCI.Name = "lblCI" + Me.lblCI.Size = New System.Drawing.Size(102, 13) + Me.lblCI.TabIndex = 74 + Me.lblCI.Text = "Confidence Interval:" + ' + 'lblQuantile + ' + Me.lblQuantile.AutoSize = True + Me.lblQuantile.Location = New System.Drawing.Point(253, 206) + Me.lblQuantile.Name = "lblQuantile" + Me.lblQuantile.Size = New System.Drawing.Size(49, 13) + Me.lblQuantile.TabIndex = 76 + Me.lblQuantile.Text = "Quantile:" + ' + 'ucrNudQuantile + ' + Me.ucrNudQuantile.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudQuantile.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudQuantile.Location = New System.Drawing.Point(350, 201) + Me.ucrNudQuantile.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudQuantile.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudQuantile.Name = "ucrNudQuantile" + Me.ucrNudQuantile.Size = New System.Drawing.Size(60, 21) + Me.ucrNudQuantile.TabIndex = 75 + Me.ucrNudQuantile.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'ucrInputComboConfidenceLevel ' Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True @@ -282,14 +314,14 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(350, 172) Me.ucrInputComboQuantilCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboQuantilCI.Name = "ucrInputComboQuantilCI" - Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(61, 21) Me.ucrInputComboQuantilCI.TabIndex = 67 ' 'ucrInputComboMedianCI ' Me.ucrInputComboMedianCI.AddQuotesIfUnrecognised = True Me.ucrInputComboMedianCI.IsReadOnly = False - Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(351, 172) + Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(350, 172) Me.ucrInputComboMedianCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboMedianCI.Name = "ucrInputComboMedianCI" Me.ucrInputComboMedianCI.Size = New System.Drawing.Size(60, 21) @@ -299,7 +331,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboVarianceCI.AddQuotesIfUnrecognised = True Me.ucrInputComboVarianceCI.IsReadOnly = False - Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(351, 172) + Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(350, 172) Me.ucrInputComboVarianceCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboVarianceCI.Name = "ucrInputComboVarianceCI" Me.ucrInputComboVarianceCI.Size = New System.Drawing.Size(60, 21) @@ -318,7 +350,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputCIMethods.AddQuotesIfUnrecognised = True Me.ucrInputCIMethods.IsReadOnly = False - Me.ucrInputCIMethods.Location = New System.Drawing.Point(351, 201) + Me.ucrInputCIMethods.Location = New System.Drawing.Point(350, 201) Me.ucrInputCIMethods.Name = "ucrInputCIMethods" Me.ucrInputCIMethods.Size = New System.Drawing.Size(60, 21) Me.ucrInputCIMethods.TabIndex = 61 @@ -327,7 +359,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMeanCIMethod.AddQuotesIfUnrecognised = True Me.ucrInputMeanCIMethod.IsReadOnly = False - Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(351, 172) + Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(350, 172) Me.ucrInputMeanCIMethod.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputMeanCIMethod.Name = "ucrInputMeanCIMethod" Me.ucrInputMeanCIMethod.Size = New System.Drawing.Size(60, 21) @@ -450,20 +482,13 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'lblCI - ' - Me.lblCI.AutoSize = True - Me.lblCI.Location = New System.Drawing.Point(244, 148) - Me.lblCI.Name = "lblCI" - Me.lblCI.Size = New System.Drawing.Size(102, 13) - Me.lblCI.TabIndex = 74 - Me.lblCI.Text = "Confidence Interval:" - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblQuantile) + Me.Controls.Add(Me.ucrNudQuantile) Me.Controls.Add(Me.lblCI) Me.Controls.Add(Me.ucrInputComboConfidenceLevel) Me.Controls.Add(Me.lblSd) @@ -552,4 +577,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblSd As Label Friend WithEvents ucrInputComboConfidenceLevel As ucrInputComboBox Friend WithEvents lblCI As Label + Friend WithEvents lblQuantile As Label + Friend WithEvents ucrNudQuantile As ucrNud End Class \ No newline at end of file From f7145a919bf3ec17b871db01b95512469671349f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sat, 18 Jul 2020 21:09:33 +0300 Subject: [PATCH 127/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 5 +++-- instat/dlgOneVarFitModel2.Designer.vb | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 1149e1daa8e..b79de42cf85 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -155,13 +155,12 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetParameterValue("0.5") ucrInputNullHypothesis.SetText("Null Hypothesis") ucrInputNullHypothesis.SetValidationTypeAsNumeric(0, 1) - ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) ucrInputTxtSd.SetText("Sd_Pop:") ucrInputTxtSd.SetParameterValue(1) ucrInputTxtSd.SetValidationTypeAsNumeric() - ucrInputTxtSd.AddQuotesIfUnrecognised = False + ucrInputComboConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(0, 1) @@ -192,6 +191,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"Snh", "Br", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) @@ -346,6 +346,7 @@ Public Class dlgOneVarFitModel clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") clsZTestFunction.AddParameter("mu", "0", iPosition:=1) + clsZTestFunction.AddParameter("sd_pop", "1", iPosition:=2) clsBartelFunction.SetPackageName("DescTools") clsBartelFunction.SetRCommand("BartelsRankTest") diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 99cbebd85fd..19891fcc20f 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -173,7 +173,7 @@ Partial Class dlgOneVarFitModel 'lblMeanCIMethod ' Me.lblMeanCIMethod.AutoSize = True - Me.lblMeanCIMethod.Location = New System.Drawing.Point(254, 175) + Me.lblMeanCIMethod.Location = New System.Drawing.Point(273, 175) Me.lblMeanCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMeanCIMethod.Name = "lblMeanCIMethod" Me.lblMeanCIMethod.Size = New System.Drawing.Size(46, 13) @@ -183,7 +183,7 @@ Partial Class dlgOneVarFitModel 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(231, 149) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(250, 148) Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) @@ -193,7 +193,7 @@ Partial Class dlgOneVarFitModel 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(236, 175) + Me.lblNullHypothesis.Location = New System.Drawing.Point(255, 175) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 @@ -202,7 +202,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(246, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(265, 206) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -211,7 +211,7 @@ Partial Class dlgOneVarFitModel 'lblMethods ' Me.lblMethods.AutoSize = True - Me.lblMethods.Location = New System.Drawing.Point(254, 206) + Me.lblMethods.Location = New System.Drawing.Point(265, 206) Me.lblMethods.Name = "lblMethods" Me.lblMethods.Size = New System.Drawing.Size(46, 13) Me.lblMethods.TabIndex = 64 @@ -221,7 +221,7 @@ Partial Class dlgOneVarFitModel 'lblMedianCIMethod ' Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(230, 175) + Me.lblMedianCIMethod.Location = New System.Drawing.Point(249, 175) Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMedianCIMethod.Name = "lblMedianCIMethod" Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) @@ -231,7 +231,7 @@ Partial Class dlgOneVarFitModel 'lblVarCI ' Me.lblVarCI.AutoSize = True - Me.lblVarCI.Location = New System.Drawing.Point(240, 175) + Me.lblVarCI.Location = New System.Drawing.Point(259, 175) Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblVarCI.Name = "lblVarCI" Me.lblVarCI.Size = New System.Drawing.Size(75, 13) @@ -241,7 +241,7 @@ Partial Class dlgOneVarFitModel 'lblQuantileCI ' Me.lblQuantileCI.AutoSize = True - Me.lblQuantileCI.Location = New System.Drawing.Point(244, 175) + Me.lblQuantileCI.Location = New System.Drawing.Point(263, 175) Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblQuantileCI.Name = "lblQuantileCI" Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) @@ -251,7 +251,7 @@ Partial Class dlgOneVarFitModel 'lblSd ' Me.lblSd.AutoSize = True - Me.lblSd.Location = New System.Drawing.Point(253, 206) + Me.lblSd.Location = New System.Drawing.Point(265, 206) Me.lblSd.Name = "lblSd" Me.lblSd.Size = New System.Drawing.Size(48, 13) Me.lblSd.TabIndex = 72 @@ -260,7 +260,7 @@ Partial Class dlgOneVarFitModel 'lblCI ' Me.lblCI.AutoSize = True - Me.lblCI.Location = New System.Drawing.Point(226, 148) + Me.lblCI.Location = New System.Drawing.Point(245, 149) Me.lblCI.Name = "lblCI" Me.lblCI.Size = New System.Drawing.Size(102, 13) Me.lblCI.TabIndex = 74 @@ -269,7 +269,7 @@ Partial Class dlgOneVarFitModel 'lblQuantile ' Me.lblQuantile.AutoSize = True - Me.lblQuantile.Location = New System.Drawing.Point(253, 206) + Me.lblQuantile.Location = New System.Drawing.Point(265, 206) Me.lblQuantile.Name = "lblQuantile" Me.lblQuantile.Size = New System.Drawing.Size(49, 13) Me.lblQuantile.TabIndex = 76 From 560abaac419480a94a6ee2dbe3768cd35b083cc0 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 20 Jul 2020 10:04:58 +0300 Subject: [PATCH 128/172] Minor edit to estimate functions --- instat/dlgOneVarFitModel.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b79de42cf85..b4c4e8c7cc6 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -698,17 +698,17 @@ Public Class dlgOneVarFitModel ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) Select Case ucrInputComboEstimate.GetValue - Case "mean" + Case "Mean" ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) - Case "median" + Case "Median" ucrBase.clsRsyntax.SetBaseRFunction(clsMedianCIFunction) - Case "normal" + Case "Normal" ucrBase.clsRsyntax.SetBaseRFunction(clsNormCIFunction) - Case "quantile" + Case "Quantile" ucrBase.clsRsyntax.SetBaseRFunction(clsQuantileCIFunction) - Case "sd" + Case "Sd" ucrBase.clsRsyntax.SetBaseRFunction(clsSdCIFunction) - Case "variance" + Case "Variance" ucrBase.clsRsyntax.SetBaseRFunction(clsVarCIFunction) End Select End If From 2e6b1ce1ae74aa905e5f22f5b2c279d03014924a Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 20 Jul 2020 11:23:31 +0300 Subject: [PATCH 129/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index b4c4e8c7cc6..43ee62815ef 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -152,14 +152,16 @@ Public Class dlgOneVarFitModel ucrNudQuantile.SetRDefault(0.5) ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) - ucrInputNullHypothesis.SetParameterValue("0.5") + ucrInputNullHypothesis.SetParameterValue(0.5) ucrInputNullHypothesis.SetText("Null Hypothesis") ucrInputNullHypothesis.SetValidationTypeAsNumeric(0, 1) + ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) ucrInputTxtSd.SetText("Sd_Pop:") ucrInputTxtSd.SetParameterValue(1) ucrInputTxtSd.SetValidationTypeAsNumeric() + ucrInputTxtSd.AddQuotesIfUnrecognised = False ucrInputComboConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) @@ -172,6 +174,7 @@ Public Class dlgOneVarFitModel dctConfidence.Add("0.999", "0.999") ucrInputComboConfidenceLevel.SetItems(dctConfidence) ucrInputComboConfidenceLevel.SetDropDownStyleAsEditable(bAdditionsAllowed:=True) + 'ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -328,8 +331,7 @@ Public Class dlgOneVarFitModel clsProportionFunction.SetPackageName("mosaic") clsProportionFunction.SetRCommand("prop.test") - clsProportionFunction.AddParameter("n", "", iPosition:=1) - clsProportionFunction.AddParameter("p", "0.5", iPosition:=2) + clsProportionFunction.AddParameter("p", "0.5", iPosition:=1) clsSignTestFunction.SetPackageName("DescTools") clsSignTestFunction.SetRCommand("SignTest") From 2ab0b6e8287466086f0e8939a33bb9034bcdf8d9 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 20 Jul 2020 14:28:53 +0300 Subject: [PATCH 130/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 31 +++++++++++---------------- instat/dlgOneVarFitModel2.Designer.vb | 28 ++++++++++++------------ 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 43ee62815ef..acc0e1f7db9 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -152,29 +152,23 @@ Public Class dlgOneVarFitModel ucrNudQuantile.SetRDefault(0.5) ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) - ucrInputNullHypothesis.SetParameterValue(0.5) - ucrInputNullHypothesis.SetText("Null Hypothesis") - ucrInputNullHypothesis.SetValidationTypeAsNumeric(0, 1) + ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=False, dcmMax:=1, bIncludeMax:=False) ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) - ucrInputTxtSd.SetText("Sd_Pop:") - ucrInputTxtSd.SetParameterValue(1) ucrInputTxtSd.SetValidationTypeAsNumeric() ucrInputTxtSd.AddQuotesIfUnrecognised = False ucrInputComboConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) - ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(0, 1) - dctConfidence.Add("0.500", "0.500") - dctConfidence.Add("0.900", "0.900") - dctConfidence.Add("0.950", "0.950") - dctConfidence.Add("0.980", "0.980") - dctConfidence.Add("0.990", "0.990") + dctConfidence.Add("0.500", "0.5") + dctConfidence.Add("0.900", "0.90") + dctConfidence.Add("0.950", "0.95") + dctConfidence.Add("0.980", "0.98") + dctConfidence.Add("0.990", "0.99") dctConfidence.Add("0.999", "0.999") ucrInputComboConfidenceLevel.SetItems(dctConfidence) - ucrInputComboConfidenceLevel.SetDropDownStyleAsEditable(bAdditionsAllowed:=True) - 'ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False + ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0, dcmMax:=1) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -182,7 +176,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"Mean"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"Median"}, bNewLinkedHideIfParameterMissing:=True) @@ -191,8 +185,8 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"Snh", "Br", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) @@ -326,7 +320,7 @@ Public Class dlgOneVarFitModel 'Test clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") - clsBionomialFunction.AddParameter("p", 0.5, iPosition:=1) + clsBionomialFunction.AddParameter("p", "0.5", iPosition:=1) clsBionomialFunction.AddParameter("ci.method", Chr(34) & "Clopper-Pearson" & Chr(34), iPosition:=3) clsProportionFunction.SetPackageName("mosaic") @@ -391,8 +385,7 @@ Public Class dlgOneVarFitModel 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") - clsMeanCIFunction.AddParameter("tream", "0", iPosition:=1) - clsMeanCIFunction.AddParameter("conf.level", "0.500", iPosition:=2) + clsMeanCIFunction.AddParameter("conf.level", "0.5", iPosition:=1) clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=3) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 19891fcc20f..6e83f1708eb 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -83,7 +83,7 @@ Partial Class dlgOneVarFitModel 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(257, 69) + Me.LblVariable.Location = New System.Drawing.Point(246, 69) Me.LblVariable.Name = "LblVariable" Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 @@ -173,7 +173,7 @@ Partial Class dlgOneVarFitModel 'lblMeanCIMethod ' Me.lblMeanCIMethod.AutoSize = True - Me.lblMeanCIMethod.Location = New System.Drawing.Point(273, 175) + Me.lblMeanCIMethod.Location = New System.Drawing.Point(246, 175) Me.lblMeanCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMeanCIMethod.Name = "lblMeanCIMethod" Me.lblMeanCIMethod.Size = New System.Drawing.Size(46, 13) @@ -183,7 +183,7 @@ Partial Class dlgOneVarFitModel 'lblConfidenceLevel ' Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(250, 148) + Me.lblConfidenceLevel.Location = New System.Drawing.Point(246, 148) Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblConfidenceLevel.Name = "lblConfidenceLevel" Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) @@ -193,7 +193,7 @@ Partial Class dlgOneVarFitModel 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(255, 175) + Me.lblNullHypothesis.Location = New System.Drawing.Point(246, 175) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 @@ -202,7 +202,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(265, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(246, 206) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -211,7 +211,7 @@ Partial Class dlgOneVarFitModel 'lblMethods ' Me.lblMethods.AutoSize = True - Me.lblMethods.Location = New System.Drawing.Point(265, 206) + Me.lblMethods.Location = New System.Drawing.Point(246, 206) Me.lblMethods.Name = "lblMethods" Me.lblMethods.Size = New System.Drawing.Size(46, 13) Me.lblMethods.TabIndex = 64 @@ -221,7 +221,7 @@ Partial Class dlgOneVarFitModel 'lblMedianCIMethod ' Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(249, 175) + Me.lblMedianCIMethod.Location = New System.Drawing.Point(246, 175) Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMedianCIMethod.Name = "lblMedianCIMethod" Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) @@ -231,7 +231,7 @@ Partial Class dlgOneVarFitModel 'lblVarCI ' Me.lblVarCI.AutoSize = True - Me.lblVarCI.Location = New System.Drawing.Point(259, 175) + Me.lblVarCI.Location = New System.Drawing.Point(246, 175) Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblVarCI.Name = "lblVarCI" Me.lblVarCI.Size = New System.Drawing.Size(75, 13) @@ -241,7 +241,7 @@ Partial Class dlgOneVarFitModel 'lblQuantileCI ' Me.lblQuantileCI.AutoSize = True - Me.lblQuantileCI.Location = New System.Drawing.Point(263, 175) + Me.lblQuantileCI.Location = New System.Drawing.Point(246, 175) Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblQuantileCI.Name = "lblQuantileCI" Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) @@ -251,7 +251,7 @@ Partial Class dlgOneVarFitModel 'lblSd ' Me.lblSd.AutoSize = True - Me.lblSd.Location = New System.Drawing.Point(265, 206) + Me.lblSd.Location = New System.Drawing.Point(246, 206) Me.lblSd.Name = "lblSd" Me.lblSd.Size = New System.Drawing.Size(48, 13) Me.lblSd.TabIndex = 72 @@ -260,7 +260,7 @@ Partial Class dlgOneVarFitModel 'lblCI ' Me.lblCI.AutoSize = True - Me.lblCI.Location = New System.Drawing.Point(245, 149) + Me.lblCI.Location = New System.Drawing.Point(246, 149) Me.lblCI.Name = "lblCI" Me.lblCI.Size = New System.Drawing.Size(102, 13) Me.lblCI.TabIndex = 74 @@ -269,7 +269,7 @@ Partial Class dlgOneVarFitModel 'lblQuantile ' Me.lblQuantile.AutoSize = True - Me.lblQuantile.Location = New System.Drawing.Point(265, 206) + Me.lblQuantile.Location = New System.Drawing.Point(246, 206) Me.lblQuantile.Name = "lblQuantile" Me.lblQuantile.Size = New System.Drawing.Size(49, 13) Me.lblQuantile.TabIndex = 76 @@ -412,7 +412,7 @@ Partial Class dlgOneVarFitModel 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(257, 116) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(246, 116) Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" Me.ucrChkOmitMissing.Size = New System.Drawing.Size(142, 20) @@ -454,7 +454,7 @@ Partial Class dlgOneVarFitModel 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(257, 86) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(246, 86) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing From ca43320468b4d3961c0ca22f369d1019b4e79e2a Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 20 Jul 2020 15:02:55 +0300 Subject: [PATCH 131/172] Minor edit --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index acc0e1f7db9..66b7eac776c 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -568,6 +568,7 @@ Public Class dlgOneVarFitModel Else ucrDistributionChoice.Enabled = True End If + TestOKEnabled() End Sub Private Sub StartParameterValues() From f80e40fabfa31196be95bb500d1e659c5d99f8ef Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 20 Jul 2020 18:13:13 +0300 Subject: [PATCH 132/172] Setting Test ok and Omit Missing values control --- instat/dlgOneVarFitModel.vb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 66b7eac776c..3c8a23a478f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -138,6 +138,10 @@ Public Class dlgOneVarFitModel ucrInputComboMethod.SetDropDownStyleAsNonEditable() ucrChkOmitMissing.SetText("Omit Missing Values") + ucrChkOmitMissing.SetParameter(New RParameter("na.rm", 3)) + ucrChkOmitMissing.SetText("Omit Missing Values") + ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkOmitMissing.SetRDefault("FALSE") ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) ucrNudConfidenceLevel.DecimalPlaces = 2 @@ -386,7 +390,7 @@ Public Class dlgOneVarFitModel clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") clsMeanCIFunction.AddParameter("conf.level", "0.5", iPosition:=1) - clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=3) + clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=2) clsMedianCIFunction.SetPackageName("DescTools") @@ -508,7 +512,6 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrChkOmitMissing.SetRCode(clsMeanCIFunction, bReset) - 'ucrNudConfLevel.SetRCode(clsMeanCIFunction, bReset) ucrNudConfidenceLevel.SetRCode(clsBionomialFunction, bReset) ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) @@ -631,6 +634,11 @@ Public Class dlgOneVarFitModel End Sub Private Sub ucrPnlGeneralExactCase_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlGeneralExactCase.ControlValueChanged + If rdoGeneralCase.Checked Then + ucrDistributionChoice.SetAllDistributions() + Else + ucrDistributionChoice.SetExactDistributions() + End If SetTestEstimateBaseFunction() SetSaveLabelTextAndPrefix() End Sub From bc9736797f227f57b4ea31e35395f96e3b93098d Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 20 Jul 2020 18:30:20 +0300 Subject: [PATCH 133/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 3c8a23a478f..13a123bc30f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -452,6 +452,9 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=2) + ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsSdCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=3) + ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsNormCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=4) + ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsQuantileCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=5) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=13) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=15) From b0e239b46ca7e0083cc80d72cd7f525389a65bdf Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 22 Jul 2020 16:44:45 +0300 Subject: [PATCH 134/172] Added more controls for different tests --- instat/dlgOneVarFitModel.vb | 39 +++++++++++--- instat/dlgOneVarFitModel2.Designer.vb | 75 +++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 7 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 13a123bc30f..7a649e010c3 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -23,6 +23,7 @@ Public Class dlgOneVarFitModel Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True Private bReset As Boolean = True + 'Private IsSelectable As Boolean = False Private bResetFittingOptions As Boolean = False Private bResetFitModDisplay As Boolean = False @@ -49,6 +50,7 @@ Public Class dlgOneVarFitModel Dim dctQuantileCI As New Dictionary(Of String, String) Dim dctConfidence As New Dictionary(Of String, String) Dim lstCommandButtons As New List(Of Control) + Dim ISelectable As Boolean = False ucrBase.iHelpTopicID = 296 ucrBase.clsRsyntax.iCallType = 2 @@ -93,6 +95,18 @@ Public Class dlgOneVarFitModel ucrInputMeanCIMethod.SetItems(dctmeanCI) ucrInputMeanCIMethod.SetDropDownStyleAsNonEditable() + ucrInputTxtHypothesis.SetParameter(New RParameter("mu", 1)) + ucrInputTxtHypothesis.SetValidationTypeAsNumeric() + ucrInputTxtHypothesis.AddQuotesIfUnrecognised = False + + ucrInputNulHypothesis.SetParameter(New RParameter("mu", 1)) + ucrInputNulHypothesis.SetValidationTypeAsNumeric() + ucrInputNulHypothesis.AddQuotesIfUnrecognised = False + + ucrInputTextM.SetParameter(New RParameter("m", 1)) + ucrInputTextM.SetValidationTypeAsNumeric() + ucrInputTextM.AddQuotesIfUnrecognised = False + ucrInputComboMedianCI.SetParameter(New RParameter("method", 2)) dctMedianCI.Add("Exact", Chr(34) & "exact" & Chr(34)) dctMedianCI.Add("Boot", Chr(34) & "boot" & Chr(34)) @@ -189,10 +203,13 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"Snh", "Br", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"Sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"T", "Z"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"Br", "Snh"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) @@ -206,6 +223,9 @@ Public Class dlgOneVarFitModel ucrInputTxtSd.SetLinkedDisplayControl(lblSd) ucrInputComboConfidenceLevel.SetLinkedDisplayControl(lblCI) ucrNudQuantile.SetLinkedDisplayControl(lblQuantile) + ucrInputTxtHypothesis.SetLinkedDisplayControl(lblNullHyp) + ucrInputNulHypothesis.SetLinkedDisplayControl(lblNulHypothesis) + ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -333,6 +353,7 @@ Public Class dlgOneVarFitModel clsSignTestFunction.SetPackageName("DescTools") clsSignTestFunction.SetRCommand("SignTest") + clsSignTestFunction.AddParameter("mu", "0", iPosition:=1) clsTtestFunction.SetPackageName("mosaic") clsTtestFunction.SetRCommand("t.test") @@ -345,7 +366,6 @@ Public Class dlgOneVarFitModel clsZTestFunction.SetPackageName("DescTools") clsZTestFunction.SetRCommand("ZTest") - clsZTestFunction.AddParameter("mu", "0", iPosition:=1) clsZTestFunction.AddParameter("sd_pop", "1", iPosition:=2) clsBartelFunction.SetPackageName("DescTools") @@ -466,7 +486,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=21) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=23) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=1) + ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) @@ -479,10 +499,10 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=5) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=2) - - + ucrInputTxtHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 2), iAdditionalPairNo:=1) + ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) + ucrInputTextM.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("m", 1), iAdditionalPairNo:=1) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) @@ -526,7 +546,12 @@ Public Class dlgOneVarFitModel ucrInputTxtSd.SetRCode(clsZTestFunction, bReset) ucrInputComboConfidenceLevel.SetRCode(clsMeanCIFunction, bReset) ucrNudQuantile.SetRCode(clsQuantileCIFunction, bReset) + ucrInputTxtHypothesis.SetRCode(clsSignTestFunction, bReset) + ucrInputNulHypothesis.SetRCode(clsTtestFunction, bReset) + ucrInputTextM.SetRCode(clsBrFunction) + ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) + End Sub Private Sub TestOKEnabled() diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 6e83f1708eb..9b946d886e3 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -57,6 +57,10 @@ Partial Class dlgOneVarFitModel Me.lblSd = New System.Windows.Forms.Label() Me.lblCI = New System.Windows.Forms.Label() Me.lblQuantile = New System.Windows.Forms.Label() + Me.lblNullHyp = New System.Windows.Forms.Label() + Me.lblNulHypothesis = New System.Windows.Forms.Label() + Me.ucrInputNulHypothesis = New instat.ucrInputTextBox() + Me.ucrInputTxtHypothesis = New instat.ucrInputTextBox() Me.ucrNudQuantile = New instat.ucrNud() Me.ucrInputComboConfidenceLevel = New instat.ucrInputComboBox() Me.ucrInputTxtSd = New instat.ucrInputTextBox() @@ -78,6 +82,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputTextM = New instat.ucrInputTextBox() + Me.lblMonteCarlo = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -275,6 +281,44 @@ Partial Class dlgOneVarFitModel Me.lblQuantile.TabIndex = 76 Me.lblQuantile.Text = "Quantile:" ' + 'lblNullHyp + ' + Me.lblNullHyp.AutoSize = True + Me.lblNullHyp.Location = New System.Drawing.Point(246, 175) + Me.lblNullHyp.Name = "lblNullHyp" + Me.lblNullHyp.Size = New System.Drawing.Size(83, 13) + Me.lblNullHyp.TabIndex = 78 + Me.lblNullHyp.Text = "Null Hypothesis:" + ' + 'lblNulHypothesis + ' + Me.lblNulHypothesis.AutoSize = True + Me.lblNulHypothesis.Location = New System.Drawing.Point(248, 175) + Me.lblNulHypothesis.Name = "lblNulHypothesis" + Me.lblNulHypothesis.Size = New System.Drawing.Size(83, 13) + Me.lblNulHypothesis.TabIndex = 80 + Me.lblNulHypothesis.Text = "Null Hypothesis:" + ' + 'ucrInputNulHypothesis + ' + Me.ucrInputNulHypothesis.AddQuotesIfUnrecognised = True + Me.ucrInputNulHypothesis.IsMultiline = False + Me.ucrInputNulHypothesis.IsReadOnly = False + Me.ucrInputNulHypothesis.Location = New System.Drawing.Point(350, 172) + Me.ucrInputNulHypothesis.Name = "ucrInputNulHypothesis" + Me.ucrInputNulHypothesis.Size = New System.Drawing.Size(61, 21) + Me.ucrInputNulHypothesis.TabIndex = 79 + ' + 'ucrInputTxtHypothesis + ' + Me.ucrInputTxtHypothesis.AddQuotesIfUnrecognised = True + Me.ucrInputTxtHypothesis.IsMultiline = False + Me.ucrInputTxtHypothesis.IsReadOnly = False + Me.ucrInputTxtHypothesis.Location = New System.Drawing.Point(350, 172) + Me.ucrInputTxtHypothesis.Name = "ucrInputTxtHypothesis" + Me.ucrInputTxtHypothesis.Size = New System.Drawing.Size(61, 21) + Me.ucrInputTxtHypothesis.TabIndex = 77 + ' 'ucrNudQuantile ' Me.ucrNudQuantile.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -482,11 +526,36 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrInputTextM + ' + Me.ucrInputTextM.AddQuotesIfUnrecognised = True + Me.ucrInputTextM.IsMultiline = False + Me.ucrInputTextM.IsReadOnly = False + Me.ucrInputTextM.Location = New System.Drawing.Point(350, 172) + Me.ucrInputTextM.Name = "ucrInputTextM" + Me.ucrInputTextM.Size = New System.Drawing.Size(61, 21) + Me.ucrInputTextM.TabIndex = 81 + ' + 'lblMonteCarlo + ' + Me.lblMonteCarlo.AutoSize = True + Me.lblMonteCarlo.Location = New System.Drawing.Point(248, 175) + Me.lblMonteCarlo.Name = "lblMonteCarlo" + Me.lblMonteCarlo.Size = New System.Drawing.Size(67, 13) + Me.lblMonteCarlo.TabIndex = 82 + Me.lblMonteCarlo.Text = "Monte-Carlo:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblMonteCarlo) + Me.Controls.Add(Me.ucrInputTextM) + Me.Controls.Add(Me.lblNulHypothesis) + Me.Controls.Add(Me.ucrInputNulHypothesis) + Me.Controls.Add(Me.lblNullHyp) + Me.Controls.Add(Me.ucrInputTxtHypothesis) Me.Controls.Add(Me.lblQuantile) Me.Controls.Add(Me.ucrNudQuantile) Me.Controls.Add(Me.lblCI) @@ -579,4 +648,10 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblCI As Label Friend WithEvents lblQuantile As Label Friend WithEvents ucrNudQuantile As ucrNud + Friend WithEvents lblNullHyp As Label + Friend WithEvents ucrInputTxtHypothesis As ucrInputTextBox + Friend WithEvents lblNulHypothesis As Label + Friend WithEvents ucrInputNulHypothesis As ucrInputTextBox + Friend WithEvents lblMonteCarlo As Label + Friend WithEvents ucrInputTextM As ucrInputTextBox End Class \ No newline at end of file From 6ba362abc971b2e605dddcc89c79df9a1d00f528 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 22 Jul 2020 17:05:13 +0300 Subject: [PATCH 135/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7a649e010c3..5fa7c03e771 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -202,11 +202,11 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"Snh", "Br", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"Runs"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"Sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"T", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"Br", "Snh"}, bNewLinkedHideIfParameterMissing:=True) From f0715e9a459dd1377b6d93b65f26f3c87442428c Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 23 Jul 2020 12:42:30 +0300 Subject: [PATCH 136/172] Fixing changes on the dialog --- instat/dlgOneVarFitModel.vb | 32 +++++++++++++-------------- instat/dlgOneVarFitModel2.Designer.vb | 31 ++++++++++++-------------- 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5fa7c03e771..64400ea8ccc 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -157,11 +157,11 @@ Public Class dlgOneVarFitModel ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitMissing.SetRDefault("FALSE") - ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) - ucrNudConfidenceLevel.DecimalPlaces = 2 - ucrNudConfidenceLevel.Increment = 0.05 - ucrNudConfidenceLevel.Maximum = 1 - ucrNudConfidenceLevel.SetRDefault(0.95) + 'ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) + 'ucrNudConfidenceLevel.DecimalPlaces = 2 + 'ucrNudConfidenceLevel.Increment = 0.05 + 'ucrNudConfidenceLevel.Maximum = 1 + 'ucrNudConfidenceLevel.SetRDefault(0.95) ucrNudQuantile.SetParameter(New RParameter("prob", 1)) ucrNudQuantile.DecimalPlaces = 2 @@ -193,7 +193,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrNudConfidenceLevel, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputTstConfidence, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"Mean"}, bNewLinkedHideIfParameterMissing:=True) @@ -202,7 +202,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrNudConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTstConfidence, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) @@ -212,7 +212,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"Br", "Snh"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) - ucrNudConfidenceLevel.SetLinkedDisplayControl(lblConfidenceLevel) + ucrInputTstConfidence.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) ucrInputMeanCIMethod.SetLinkedDisplayControl(lblMeanCIMethod) ucrInputComboMedianCI.SetLinkedDisplayControl(lblMedianCIMethod) @@ -486,13 +486,13 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=21) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=23) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) - ucrNudConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) + ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=2) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) @@ -535,7 +535,7 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrChkOmitMissing.SetRCode(clsMeanCIFunction, bReset) - ucrNudConfidenceLevel.SetRCode(clsBionomialFunction, bReset) + ucrInputTstConfidence.SetRCode(clsBionomialFunction, bReset) ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) ucrInputCIMethods.SetRCode(clsBionomialFunction, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 9b946d886e3..1a0238ea35c 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -71,7 +71,6 @@ Partial Class dlgOneVarFitModel Me.ucrInputCIMethods = New instat.ucrInputComboBox() Me.ucrInputMeanCIMethod = New instat.ucrInputComboBox() Me.ucrInputNullHypothesis = New instat.ucrInputTextBox() - Me.ucrNudConfidenceLevel = New instat.ucrNud() Me.ucrInputComboEstimate = New instat.ucrInputComboBox() Me.ucrInputComboTests = New instat.ucrInputComboBox() Me.ucrChkOmitMissing = New instat.ucrCheck() @@ -84,6 +83,7 @@ Partial Class dlgOneVarFitModel Me.ucrBase = New instat.ucrButtons() Me.ucrInputTextM = New instat.ucrInputTextBox() Me.lblMonteCarlo = New System.Windows.Forms.Label() + Me.ucrInputTstConfidence = New instat.ucrInputComboBox() Me.SuspendLayout() ' 'LblVariable @@ -335,7 +335,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True Me.ucrInputComboConfidenceLevel.IsReadOnly = False - Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(350, 145) + Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(351, 146) Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboConfidenceLevel.Name = "ucrInputComboConfidenceLevel" Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(60, 21) @@ -420,19 +420,6 @@ Partial Class dlgOneVarFitModel Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(58, 21) Me.ucrInputNullHypothesis.TabIndex = 60 ' - 'ucrNudConfidenceLevel - ' - Me.ucrNudConfidenceLevel.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Location = New System.Drawing.Point(351, 146) - Me.ucrNudConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) - Me.ucrNudConfidenceLevel.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConfidenceLevel.Name = "ucrNudConfidenceLevel" - Me.ucrNudConfidenceLevel.Size = New System.Drawing.Size(58, 20) - Me.ucrNudConfidenceLevel.TabIndex = 58 - Me.ucrNudConfidenceLevel.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrInputComboEstimate ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True @@ -545,11 +532,22 @@ Partial Class dlgOneVarFitModel Me.lblMonteCarlo.TabIndex = 82 Me.lblMonteCarlo.Text = "Monte-Carlo:" ' + 'ucrInputTstConfidence + ' + Me.ucrInputTstConfidence.AddQuotesIfUnrecognised = True + Me.ucrInputTstConfidence.IsReadOnly = False + Me.ucrInputTstConfidence.Location = New System.Drawing.Point(351, 146) + Me.ucrInputTstConfidence.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputTstConfidence.Name = "ucrInputTstConfidence" + Me.ucrInputTstConfidence.Size = New System.Drawing.Size(60, 21) + Me.ucrInputTstConfidence.TabIndex = 83 + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.ucrInputTstConfidence) Me.Controls.Add(Me.lblMonteCarlo) Me.Controls.Add(Me.ucrInputTextM) Me.Controls.Add(Me.lblNulHypothesis) @@ -575,7 +573,6 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.lblMeanCIMethod) Me.Controls.Add(Me.ucrInputMeanCIMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) - Me.Controls.Add(Me.ucrNudConfidenceLevel) Me.Controls.Add(Me.lblNullHypothesis) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.lblEstimate) @@ -629,7 +626,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblMeanCIMethod As Label Friend WithEvents ucrInputMeanCIMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label - Friend WithEvents ucrNudConfidenceLevel As ucrNud Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox Friend WithEvents lblNullHypothesis As Label Friend WithEvents lblCIMethods As Label @@ -654,4 +650,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputNulHypothesis As ucrInputTextBox Friend WithEvents lblMonteCarlo As Label Friend WithEvents ucrInputTextM As ucrInputTextBox + Friend WithEvents ucrInputTstConfidence As ucrInputComboBox End Class \ No newline at end of file From 99382721b18cb9567bbf29e5cc0996e9b2dd9179 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 23 Jul 2020 15:07:56 +0300 Subject: [PATCH 137/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 30 ++++++--------- instat/dlgOneVarFitModel2.Designer.vb | 55 ++++++++++----------------- 2 files changed, 32 insertions(+), 53 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 64400ea8ccc..93e376551ee 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -23,7 +23,6 @@ Public Class dlgOneVarFitModel Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True Private bReset As Boolean = True - 'Private IsSelectable As Boolean = False Private bResetFittingOptions As Boolean = False Private bResetFitModDisplay As Boolean = False @@ -157,12 +156,6 @@ Public Class dlgOneVarFitModel ucrChkOmitMissing.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitMissing.SetRDefault("FALSE") - 'ucrNudConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) - 'ucrNudConfidenceLevel.DecimalPlaces = 2 - 'ucrNudConfidenceLevel.Increment = 0.05 - 'ucrNudConfidenceLevel.Maximum = 1 - 'ucrNudConfidenceLevel.SetRDefault(0.95) - ucrNudQuantile.SetParameter(New RParameter("prob", 1)) ucrNudQuantile.DecimalPlaces = 2 ucrNudQuantile.Increment = 0.05 @@ -193,16 +186,16 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputTstConfidence, {rdoTest}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate, rdoTest}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"Mean"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"Median"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"Variance"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputTstConfidence, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + 'ucrInputComboTests.AddToLinkedControls(ucrInputTstConfidence, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) @@ -212,7 +205,6 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"Br", "Snh"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) - ucrInputTstConfidence.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) ucrInputMeanCIMethod.SetLinkedDisplayControl(lblMeanCIMethod) ucrInputComboMedianCI.SetLinkedDisplayControl(lblMedianCIMethod) @@ -486,19 +478,20 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=21) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=22) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=23) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) - ucrInputTstConfidence.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=2) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=5) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=8) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=9) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=10) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=12) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=13) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) ucrInputTxtHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 2), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) @@ -535,7 +528,6 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.SetRCode(clsNaExclude, bReset) ucrChkConvertVariate.SetRCode(clsROneVarFitModel, bReset) ucrChkOmitMissing.SetRCode(clsMeanCIFunction, bReset) - ucrInputTstConfidence.SetRCode(clsBionomialFunction, bReset) ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) ucrInputCIMethods.SetRCode(clsBionomialFunction, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 1a0238ea35c..3ab8d3f7961 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -59,6 +59,8 @@ Partial Class dlgOneVarFitModel Me.lblQuantile = New System.Windows.Forms.Label() Me.lblNullHyp = New System.Windows.Forms.Label() Me.lblNulHypothesis = New System.Windows.Forms.Label() + Me.lblMonteCarlo = New System.Windows.Forms.Label() + Me.ucrInputTextM = New instat.ucrInputTextBox() Me.ucrInputNulHypothesis = New instat.ucrInputTextBox() Me.ucrInputTxtHypothesis = New instat.ucrInputTextBox() Me.ucrNudQuantile = New instat.ucrNud() @@ -81,9 +83,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputTextM = New instat.ucrInputTextBox() - Me.lblMonteCarlo = New System.Windows.Forms.Label() - Me.ucrInputTstConfidence = New instat.ucrInputComboBox() Me.SuspendLayout() ' 'LblVariable @@ -299,6 +298,25 @@ Partial Class dlgOneVarFitModel Me.lblNulHypothesis.TabIndex = 80 Me.lblNulHypothesis.Text = "Null Hypothesis:" ' + 'lblMonteCarlo + ' + Me.lblMonteCarlo.AutoSize = True + Me.lblMonteCarlo.Location = New System.Drawing.Point(248, 175) + Me.lblMonteCarlo.Name = "lblMonteCarlo" + Me.lblMonteCarlo.Size = New System.Drawing.Size(67, 13) + Me.lblMonteCarlo.TabIndex = 82 + Me.lblMonteCarlo.Text = "Monte-Carlo:" + ' + 'ucrInputTextM + ' + Me.ucrInputTextM.AddQuotesIfUnrecognised = True + Me.ucrInputTextM.IsMultiline = False + Me.ucrInputTextM.IsReadOnly = False + Me.ucrInputTextM.Location = New System.Drawing.Point(350, 172) + Me.ucrInputTextM.Name = "ucrInputTextM" + Me.ucrInputTextM.Size = New System.Drawing.Size(61, 21) + Me.ucrInputTextM.TabIndex = 81 + ' 'ucrInputNulHypothesis ' Me.ucrInputNulHypothesis.AddQuotesIfUnrecognised = True @@ -513,41 +531,11 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputTextM - ' - Me.ucrInputTextM.AddQuotesIfUnrecognised = True - Me.ucrInputTextM.IsMultiline = False - Me.ucrInputTextM.IsReadOnly = False - Me.ucrInputTextM.Location = New System.Drawing.Point(350, 172) - Me.ucrInputTextM.Name = "ucrInputTextM" - Me.ucrInputTextM.Size = New System.Drawing.Size(61, 21) - Me.ucrInputTextM.TabIndex = 81 - ' - 'lblMonteCarlo - ' - Me.lblMonteCarlo.AutoSize = True - Me.lblMonteCarlo.Location = New System.Drawing.Point(248, 175) - Me.lblMonteCarlo.Name = "lblMonteCarlo" - Me.lblMonteCarlo.Size = New System.Drawing.Size(67, 13) - Me.lblMonteCarlo.TabIndex = 82 - Me.lblMonteCarlo.Text = "Monte-Carlo:" - ' - 'ucrInputTstConfidence - ' - Me.ucrInputTstConfidence.AddQuotesIfUnrecognised = True - Me.ucrInputTstConfidence.IsReadOnly = False - Me.ucrInputTstConfidence.Location = New System.Drawing.Point(351, 146) - Me.ucrInputTstConfidence.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputTstConfidence.Name = "ucrInputTstConfidence" - Me.ucrInputTstConfidence.Size = New System.Drawing.Size(60, 21) - Me.ucrInputTstConfidence.TabIndex = 83 - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) - Me.Controls.Add(Me.ucrInputTstConfidence) Me.Controls.Add(Me.lblMonteCarlo) Me.Controls.Add(Me.ucrInputTextM) Me.Controls.Add(Me.lblNulHypothesis) @@ -650,5 +638,4 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputNulHypothesis As ucrInputTextBox Friend WithEvents lblMonteCarlo As Label Friend WithEvents ucrInputTextM As ucrInputTextBox - Friend WithEvents ucrInputTstConfidence As ucrInputComboBox End Class \ No newline at end of file From 4cf6f80fc5525a82d09a5200db4aa011f3f78ea7 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 23 Jul 2020 15:20:22 +0300 Subject: [PATCH 138/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 93e376551ee..109093b2d4f 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -195,7 +195,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - 'ucrInputComboTests.AddToLinkedControls(ucrInputTstConfidence, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputComboConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) From 15e7fe979bc230a1f276d35964842aa8037e5b2d Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 23 Jul 2020 15:44:06 +0300 Subject: [PATCH 139/172] more changes to the dialog --- instat/dlgOneVarFitModel.vb | 66 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 109093b2d4f..edd00197f06 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -82,10 +82,10 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") - ucrInputComboTests.SetItems({"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Bartel", "Br", "Runs", "Sen", "Serial Corr", "Snh", "Ad", "Cvm", "Lillie", "Pearson", "Sf"}) + ucrInputComboTests.SetItems({"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "Bartel", "br", "runs", "Sen", "Serial Corr", "snh", "ad", "cvm", "lillie", "pearson", "sf"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() - ucrInputComboEstimate.SetItems({"Mean", "Median", "Normal", "Quantile", "Sd", "Variance"}) + ucrInputComboEstimate.SetItems({"mean", "median", "normal", "quantile", "sd", "variance"}) ucrInputComboEstimate.SetDropDownStyleAsNonEditable() ucrInputMeanCIMethod.SetParameter(New RParameter("method", 3)) @@ -189,20 +189,20 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate, rdoTest}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"Mean"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"Median"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"Variance"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"Binomial"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"mean"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"median"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"variance"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputComboConfidenceLevel, {"Binomial", "Proportion", "Sign", "T", "Wilcoxon", "Z", "Serial Corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"Binomial", "Proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputComboConfidenceLevel, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"Quantile"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"Runs"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"Sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"T", "Z"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"Br", "Snh"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"runs"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"t", "Z"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "nh"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) @@ -685,13 +685,13 @@ Public Class dlgOneVarFitModel ElseIf rdoTest.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) Select Case ucrInputComboTests.GetValue - Case "Binomial" + Case "binomial" ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) - Case "Proportion" + Case "proportion" ucrBase.clsRsyntax.SetBaseRFunction(clsProportionFunction) - Case "Sign" + Case "sign" ucrBase.clsRsyntax.SetBaseRFunction(clsSignTestFunction) - Case "T" + Case "t" ucrBase.clsRsyntax.SetBaseRFunction(clsTtestFunction) Case "Wilcoxon" ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) @@ -699,40 +699,40 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) - Case "Br" + Case "br" ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) - Case "Runs" + Case "runs" ucrBase.clsRsyntax.SetBaseRFunction(clsRunsFunction) - Case "Sen" + Case "sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) - Case "Serial Corr" + Case "serial corr" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) - Case "Snh" + Case "snh" ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) - Case "Ad" + Case "ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) - Case "Cvm" + Case "cvm" ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) - Case "Pearson" + Case "pearson" ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) - Case "Sf" + Case "sf" ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) Select Case ucrInputComboEstimate.GetValue - Case "Mean" + Case "mean" ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) - Case "Median" + Case "median" ucrBase.clsRsyntax.SetBaseRFunction(clsMedianCIFunction) - Case "Normal" + Case "normal" ucrBase.clsRsyntax.SetBaseRFunction(clsNormCIFunction) - Case "Quantile" + Case "quantile" ucrBase.clsRsyntax.SetBaseRFunction(clsQuantileCIFunction) - Case "Sd" + Case "sd" ucrBase.clsRsyntax.SetBaseRFunction(clsSdCIFunction) - Case "Variance" + Case "variance" ucrBase.clsRsyntax.SetBaseRFunction(clsVarCIFunction) End Select End If From b6cf976e522b2c0394087aced723515932f23c71 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 23 Jul 2020 17:05:05 +0300 Subject: [PATCH 140/172] More changes to the dialog --- instat/dlgOneVarFitModel.vb | 13 ++--- instat/dlgOneVarFitModel2.Designer.vb | 68 ++++++++++++++++----------- 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index edd00197f06..802d710e41a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -48,8 +48,8 @@ Public Class dlgOneVarFitModel Dim dctVarCI As New Dictionary(Of String, String) Dim dctQuantileCI As New Dictionary(Of String, String) Dim dctConfidence As New Dictionary(Of String, String) + Dim DctQMethod As New Dictionary(Of String, String) Dim lstCommandButtons As New List(Of Control) - Dim ISelectable As Boolean = False ucrBase.iHelpTopicID = 296 ucrBase.clsRsyntax.iCallType = 2 @@ -112,6 +112,8 @@ Public Class dlgOneVarFitModel ucrInputComboMedianCI.SetItems(dctMedianCI) ucrInputComboMedianCI.SetDropDownStyleAsNonEditable() + + ucrInputComboVarianceCI.SetParameter(New RParameter("method", 1)) dctVarCI.Add("Classic", Chr(34) & "classic" & Chr(34)) dctVarCI.Add("Bonett", Chr(34) & "bonett" & Chr(34)) @@ -163,16 +165,15 @@ Public Class dlgOneVarFitModel ucrNudQuantile.SetRDefault(0.5) ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) - ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=False, dcmMax:=1, bIncludeMax:=False) + ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, dcmMax:=1) ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) - ucrInputTxtSd.SetValidationTypeAsNumeric() + ucrInputTxtSd.SetValidationTypeAsNumeric(dcmMin:=0) ucrInputTxtSd.AddQuotesIfUnrecognised = False ucrInputComboConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) - dctConfidence.Add("0.500", "0.5") dctConfidence.Add("0.900", "0.90") dctConfidence.Add("0.950", "0.95") dctConfidence.Add("0.980", "0.98") @@ -401,7 +402,7 @@ Public Class dlgOneVarFitModel 'Estimate clsMeanCIFunction.SetPackageName("DescTools") clsMeanCIFunction.SetRCommand("MeanCI") - clsMeanCIFunction.AddParameter("conf.level", "0.5", iPosition:=1) + clsMeanCIFunction.AddParameter("conf.level", "0.95", iPosition:=1) clsMeanCIFunction.AddParameter("method", Chr(34) & "classic" & Chr(34), iPosition:=2) @@ -703,7 +704,7 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) Case "runs" ucrBase.clsRsyntax.SetBaseRFunction(clsRunsFunction) - Case "sen" + Case "Sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 3ab8d3f7961..6d15016b5d8 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -47,7 +47,6 @@ Partial Class dlgOneVarFitModel Me.lblTests = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() Me.lblMeanCIMethod = New System.Windows.Forms.Label() - Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.lblNullHypothesis = New System.Windows.Forms.Label() Me.lblCIMethods = New System.Windows.Forms.Label() Me.lblMethods = New System.Windows.Forms.Label() @@ -83,12 +82,14 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputComboQMethod = New instat.ucrInputComboBox() + Me.lblQMethod = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable ' Me.LblVariable.AutoSize = True - Me.LblVariable.Location = New System.Drawing.Point(246, 69) + Me.LblVariable.Location = New System.Drawing.Point(248, 69) Me.LblVariable.Name = "LblVariable" Me.LblVariable.Size = New System.Drawing.Size(48, 13) Me.LblVariable.TabIndex = 8 @@ -178,27 +179,17 @@ Partial Class dlgOneVarFitModel 'lblMeanCIMethod ' Me.lblMeanCIMethod.AutoSize = True - Me.lblMeanCIMethod.Location = New System.Drawing.Point(246, 175) + Me.lblMeanCIMethod.Location = New System.Drawing.Point(248, 175) Me.lblMeanCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMeanCIMethod.Name = "lblMeanCIMethod" Me.lblMeanCIMethod.Size = New System.Drawing.Size(46, 13) Me.lblMeanCIMethod.TabIndex = 54 Me.lblMeanCIMethod.Text = "Method:" ' - 'lblConfidenceLevel - ' - Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(246, 148) - Me.lblConfidenceLevel.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) - Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) - Me.lblConfidenceLevel.TabIndex = 56 - Me.lblConfidenceLevel.Text = "Confidence Level:" - ' 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(246, 175) + Me.lblNullHypothesis.Location = New System.Drawing.Point(248, 175) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 @@ -207,7 +198,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(246, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(248, 206) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -216,7 +207,7 @@ Partial Class dlgOneVarFitModel 'lblMethods ' Me.lblMethods.AutoSize = True - Me.lblMethods.Location = New System.Drawing.Point(246, 206) + Me.lblMethods.Location = New System.Drawing.Point(248, 206) Me.lblMethods.Name = "lblMethods" Me.lblMethods.Size = New System.Drawing.Size(46, 13) Me.lblMethods.TabIndex = 64 @@ -226,7 +217,7 @@ Partial Class dlgOneVarFitModel 'lblMedianCIMethod ' Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(246, 175) + Me.lblMedianCIMethod.Location = New System.Drawing.Point(248, 175) Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMedianCIMethod.Name = "lblMedianCIMethod" Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) @@ -236,7 +227,7 @@ Partial Class dlgOneVarFitModel 'lblVarCI ' Me.lblVarCI.AutoSize = True - Me.lblVarCI.Location = New System.Drawing.Point(246, 175) + Me.lblVarCI.Location = New System.Drawing.Point(248, 175) Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblVarCI.Name = "lblVarCI" Me.lblVarCI.Size = New System.Drawing.Size(75, 13) @@ -246,7 +237,7 @@ Partial Class dlgOneVarFitModel 'lblQuantileCI ' Me.lblQuantileCI.AutoSize = True - Me.lblQuantileCI.Location = New System.Drawing.Point(246, 175) + Me.lblQuantileCI.Location = New System.Drawing.Point(248, 175) Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblQuantileCI.Name = "lblQuantileCI" Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) @@ -256,7 +247,7 @@ Partial Class dlgOneVarFitModel 'lblSd ' Me.lblSd.AutoSize = True - Me.lblSd.Location = New System.Drawing.Point(246, 206) + Me.lblSd.Location = New System.Drawing.Point(248, 206) Me.lblSd.Name = "lblSd" Me.lblSd.Size = New System.Drawing.Size(48, 13) Me.lblSd.TabIndex = 72 @@ -265,7 +256,7 @@ Partial Class dlgOneVarFitModel 'lblCI ' Me.lblCI.AutoSize = True - Me.lblCI.Location = New System.Drawing.Point(246, 149) + Me.lblCI.Location = New System.Drawing.Point(238, 149) Me.lblCI.Name = "lblCI" Me.lblCI.Size = New System.Drawing.Size(102, 13) Me.lblCI.TabIndex = 74 @@ -274,7 +265,7 @@ Partial Class dlgOneVarFitModel 'lblQuantile ' Me.lblQuantile.AutoSize = True - Me.lblQuantile.Location = New System.Drawing.Point(246, 206) + Me.lblQuantile.Location = New System.Drawing.Point(248, 206) Me.lblQuantile.Name = "lblQuantile" Me.lblQuantile.Size = New System.Drawing.Size(49, 13) Me.lblQuantile.TabIndex = 76 @@ -283,7 +274,7 @@ Partial Class dlgOneVarFitModel 'lblNullHyp ' Me.lblNullHyp.AutoSize = True - Me.lblNullHyp.Location = New System.Drawing.Point(246, 175) + Me.lblNullHyp.Location = New System.Drawing.Point(248, 175) Me.lblNullHyp.Name = "lblNullHyp" Me.lblNullHyp.Size = New System.Drawing.Size(83, 13) Me.lblNullHyp.TabIndex = 78 @@ -461,7 +452,7 @@ Partial Class dlgOneVarFitModel 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(246, 116) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(248, 116) Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" Me.ucrChkOmitMissing.Size = New System.Drawing.Size(142, 20) @@ -470,7 +461,7 @@ Partial Class dlgOneVarFitModel 'ucrChkConvertVariate ' Me.ucrChkConvertVariate.Checked = False - Me.ucrChkConvertVariate.Location = New System.Drawing.Point(257, 116) + Me.ucrChkConvertVariate.Location = New System.Drawing.Point(248, 116) Me.ucrChkConvertVariate.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkConvertVariate.Name = "ucrChkConvertVariate" Me.ucrChkConvertVariate.Size = New System.Drawing.Size(156, 20) @@ -503,7 +494,7 @@ Partial Class dlgOneVarFitModel 'ucrReceiverVariable ' Me.ucrReceiverVariable.frmParent = Me - Me.ucrReceiverVariable.Location = New System.Drawing.Point(246, 86) + Me.ucrReceiverVariable.Location = New System.Drawing.Point(248, 86) Me.ucrReceiverVariable.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVariable.Name = "ucrReceiverVariable" Me.ucrReceiverVariable.Selector = Nothing @@ -531,11 +522,32 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrInputComboQMethod + ' + Me.ucrInputComboQMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboQMethod.IsReadOnly = False + Me.ucrInputComboQMethod.Location = New System.Drawing.Point(350, 231) + Me.ucrInputComboQMethod.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboQMethod.Name = "ucrInputComboQMethod" + Me.ucrInputComboQMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboQMethod.TabIndex = 83 + ' + 'lblQMethod + ' + Me.lblQMethod.AutoSize = True + Me.lblQMethod.Location = New System.Drawing.Point(248, 235) + Me.lblQMethod.Name = "lblQMethod" + Me.lblQMethod.Size = New System.Drawing.Size(60, 13) + Me.lblQMethod.TabIndex = 84 + Me.lblQMethod.Text = "Q. Method:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblQMethod) + Me.Controls.Add(Me.ucrInputComboQMethod) Me.Controls.Add(Me.lblMonteCarlo) Me.Controls.Add(Me.ucrInputTextM) Me.Controls.Add(Me.lblNulHypothesis) @@ -562,7 +574,6 @@ Partial Class dlgOneVarFitModel Me.Controls.Add(Me.ucrInputMeanCIMethod) Me.Controls.Add(Me.ucrInputNullHypothesis) Me.Controls.Add(Me.lblNullHypothesis) - Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.ucrInputComboEstimate) Me.Controls.Add(Me.lblTests) @@ -613,7 +624,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrChkOmitMissing As ucrCheck Friend WithEvents lblMeanCIMethod As Label Friend WithEvents ucrInputMeanCIMethod As ucrInputComboBox - Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrInputNullHypothesis As ucrInputTextBox Friend WithEvents lblNullHypothesis As Label Friend WithEvents lblCIMethods As Label @@ -638,4 +648,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputNulHypothesis As ucrInputTextBox Friend WithEvents lblMonteCarlo As Label Friend WithEvents ucrInputTextM As ucrInputTextBox + Friend WithEvents lblQMethod As Label + Friend WithEvents ucrInputComboQMethod As ucrInputComboBox End Class \ No newline at end of file From 4d6197aef7ad226d8570240a176f31d94d54362b Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 23 Jul 2020 17:27:48 +0300 Subject: [PATCH 141/172] More changes --- instat/dlgOneVarFitModel.vb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 802d710e41a..8b1e343bfbe 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -112,7 +112,12 @@ Public Class dlgOneVarFitModel ucrInputComboMedianCI.SetItems(dctMedianCI) ucrInputComboMedianCI.SetDropDownStyleAsNonEditable() - + ucrInputComboQMethod.SetParameter(New RParameter("method", 3)) + DctQMethod.Add("exact", Chr(34) & "exact" & Chr(34)) + DctQMethod.Add("asymptotic ", Chr(34) & "asymptotic " & Chr(34)) + DctQMethod.Add("boot", Chr(34) & "boot" & Chr(34)) + ucrInputComboQMethod.SetItems(DctQMethod) + ucrInputComboQMethod.SetDropDownStyleAsNonEditable() ucrInputComboVarianceCI.SetParameter(New RParameter("method", 1)) dctVarCI.Add("Classic", Chr(34) & "classic" & Chr(34)) @@ -204,6 +209,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"t", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "nh"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"rdoEstimate", "q"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) @@ -219,6 +225,7 @@ Public Class dlgOneVarFitModel ucrInputTxtHypothesis.SetLinkedDisplayControl(lblNullHyp) ucrInputNulHypothesis.SetLinkedDisplayControl(lblNulHypothesis) ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) + ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -540,6 +547,7 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.SetRCode(clsMeanCIFunction, bReset) ucrNudQuantile.SetRCode(clsQuantileCIFunction, bReset) ucrInputTxtHypothesis.SetRCode(clsSignTestFunction, bReset) + ucrInputComboQMethod.SetRCode(clsQuantileCIFunction, bReset) ucrInputNulHypothesis.SetRCode(clsTtestFunction, bReset) ucrInputTextM.SetRCode(clsBrFunction) From fad9b62f6ae49dd5bae95b08a8914087a23d4435 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 24 Jul 2020 10:08:22 +0300 Subject: [PATCH 142/172] Implementing sd population for Z test Implementing methods argument for quantileCI --- instat/dlgOneVarFitModel.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8b1e343bfbe..984c9bb69c4 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -174,7 +174,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) - ucrInputTxtSd.SetValidationTypeAsNumeric(dcmMin:=0) + ucrInputTxtSd.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=False) ucrInputTxtSd.AddQuotesIfUnrecognised = False @@ -209,7 +209,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"t", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "nh"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"rdoEstimate", "q"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"rdoEstimate", "quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) From f7817552d8aefecdf4e7d4ef8d826dc57c9a7b78 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 24 Jul 2020 12:06:10 +0300 Subject: [PATCH 143/172] Changing the estimate and tests options back to according to the suggestion --- instat/dlgOneVarFitModel.vb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 984c9bb69c4..274c20a033a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -170,7 +170,7 @@ Public Class dlgOneVarFitModel ucrNudQuantile.SetRDefault(0.5) ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) - ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, dcmMax:=1) + ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=False, dcmMax:=1, bIncludeMax:=False) ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) @@ -185,7 +185,7 @@ Public Class dlgOneVarFitModel dctConfidence.Add("0.990", "0.99") dctConfidence.Add("0.999", "0.999") ucrInputComboConfidenceLevel.SetItems(dctConfidence) - ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0, dcmMax:=1) + ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=True, dcmMax:=1, bIncludeMax:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -378,7 +378,6 @@ Public Class dlgOneVarFitModel clsRunsFunction.SetPackageName("DescTools") clsRunsFunction.SetRCommand("RunsTest") - clsRunsFunction.AddParameter("na.rm", "True", iPosition:=1) clsSenFunction.SetPackageName("trend") clsSenFunction.SetRCommand("sens.slope") @@ -389,7 +388,6 @@ Public Class dlgOneVarFitModel clsSnhFunction.SetPackageName("trend") clsSnhFunction.SetRCommand("snh.test") - clsSfFunction.AddParameter("m", "20000", iPosition:=2) clsAdFunction.SetPackageName("nortest") clsAdFunction.SetRCommand("ad.test") From de4a0619cb36b7c0f2641d3e66c60075a8b5f134 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 24 Jul 2020 13:37:07 +0300 Subject: [PATCH 144/172] Implementing confidence level control --- instat/dlgOneVarFitModel.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 274c20a033a..f35d676d628 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -170,7 +170,7 @@ Public Class dlgOneVarFitModel ucrNudQuantile.SetRDefault(0.5) ucrInputNullHypothesis.SetParameter(New RParameter("p", 1)) - ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=False, dcmMax:=1, bIncludeMax:=False) + ucrInputNullHypothesis.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=True, dcmMax:=1, bIncludeMax:=True) ucrInputNullHypothesis.AddQuotesIfUnrecognised = False ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) @@ -185,7 +185,8 @@ Public Class dlgOneVarFitModel dctConfidence.Add("0.990", "0.99") dctConfidence.Add("0.999", "0.999") ucrInputComboConfidenceLevel.SetItems(dctConfidence) - ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=True, dcmMax:=1, bIncludeMax:=True) + ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False + ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=False, dcmMax:=1.0, bIncludeMax:=False) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") @@ -453,6 +454,7 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) bResetFittingOptions = True bResetFitModDisplay = True + ucrChkOmitMissing.Checked = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) From 60d690d63658aed7b80cc058fcc3c54aef721ca6 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 24 Jul 2020 14:31:33 +0300 Subject: [PATCH 145/172] Changed the position of the check box --- instat/dlgOneVarFitModel2.Designer.vb | 98 +++++++++++++-------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 6d15016b5d8..ec471d43c03 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -59,6 +59,8 @@ Partial Class dlgOneVarFitModel Me.lblNullHyp = New System.Windows.Forms.Label() Me.lblNulHypothesis = New System.Windows.Forms.Label() Me.lblMonteCarlo = New System.Windows.Forms.Label() + Me.lblQMethod = New System.Windows.Forms.Label() + Me.ucrInputComboQMethod = New instat.ucrInputComboBox() Me.ucrInputTextM = New instat.ucrInputTextBox() Me.ucrInputNulHypothesis = New instat.ucrInputTextBox() Me.ucrInputTxtHypothesis = New instat.ucrInputTextBox() @@ -82,8 +84,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputComboQMethod = New instat.ucrInputComboBox() - Me.lblQMethod = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -179,7 +179,7 @@ Partial Class dlgOneVarFitModel 'lblMeanCIMethod ' Me.lblMeanCIMethod.AutoSize = True - Me.lblMeanCIMethod.Location = New System.Drawing.Point(248, 175) + Me.lblMeanCIMethod.Location = New System.Drawing.Point(248, 169) Me.lblMeanCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMeanCIMethod.Name = "lblMeanCIMethod" Me.lblMeanCIMethod.Size = New System.Drawing.Size(46, 13) @@ -189,7 +189,7 @@ Partial Class dlgOneVarFitModel 'lblNullHypothesis ' Me.lblNullHypothesis.AutoSize = True - Me.lblNullHypothesis.Location = New System.Drawing.Point(248, 175) + Me.lblNullHypothesis.Location = New System.Drawing.Point(248, 169) Me.lblNullHypothesis.Name = "lblNullHypothesis" Me.lblNullHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNullHypothesis.TabIndex = 59 @@ -198,7 +198,7 @@ Partial Class dlgOneVarFitModel 'lblCIMethods ' Me.lblCIMethods.AutoSize = True - Me.lblCIMethods.Location = New System.Drawing.Point(248, 206) + Me.lblCIMethods.Location = New System.Drawing.Point(248, 200) Me.lblCIMethods.Name = "lblCIMethods" Me.lblCIMethods.Size = New System.Drawing.Size(62, 13) Me.lblCIMethods.TabIndex = 62 @@ -207,7 +207,7 @@ Partial Class dlgOneVarFitModel 'lblMethods ' Me.lblMethods.AutoSize = True - Me.lblMethods.Location = New System.Drawing.Point(248, 206) + Me.lblMethods.Location = New System.Drawing.Point(248, 200) Me.lblMethods.Name = "lblMethods" Me.lblMethods.Size = New System.Drawing.Size(46, 13) Me.lblMethods.TabIndex = 64 @@ -217,7 +217,7 @@ Partial Class dlgOneVarFitModel 'lblMedianCIMethod ' Me.lblMedianCIMethod.AutoSize = True - Me.lblMedianCIMethod.Location = New System.Drawing.Point(248, 175) + Me.lblMedianCIMethod.Location = New System.Drawing.Point(248, 169) Me.lblMedianCIMethod.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblMedianCIMethod.Name = "lblMedianCIMethod" Me.lblMedianCIMethod.Size = New System.Drawing.Size(94, 13) @@ -227,7 +227,7 @@ Partial Class dlgOneVarFitModel 'lblVarCI ' Me.lblVarCI.AutoSize = True - Me.lblVarCI.Location = New System.Drawing.Point(248, 175) + Me.lblVarCI.Location = New System.Drawing.Point(248, 169) Me.lblVarCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblVarCI.Name = "lblVarCI" Me.lblVarCI.Size = New System.Drawing.Size(75, 13) @@ -237,7 +237,7 @@ Partial Class dlgOneVarFitModel 'lblQuantileCI ' Me.lblQuantileCI.AutoSize = True - Me.lblQuantileCI.Location = New System.Drawing.Point(248, 175) + Me.lblQuantileCI.Location = New System.Drawing.Point(248, 169) Me.lblQuantileCI.Margin = New System.Windows.Forms.Padding(2, 0, 2, 0) Me.lblQuantileCI.Name = "lblQuantileCI" Me.lblQuantileCI.Size = New System.Drawing.Size(67, 13) @@ -247,7 +247,7 @@ Partial Class dlgOneVarFitModel 'lblSd ' Me.lblSd.AutoSize = True - Me.lblSd.Location = New System.Drawing.Point(248, 206) + Me.lblSd.Location = New System.Drawing.Point(248, 200) Me.lblSd.Name = "lblSd" Me.lblSd.Size = New System.Drawing.Size(48, 13) Me.lblSd.TabIndex = 72 @@ -256,7 +256,7 @@ Partial Class dlgOneVarFitModel 'lblCI ' Me.lblCI.AutoSize = True - Me.lblCI.Location = New System.Drawing.Point(238, 149) + Me.lblCI.Location = New System.Drawing.Point(245, 143) Me.lblCI.Name = "lblCI" Me.lblCI.Size = New System.Drawing.Size(102, 13) Me.lblCI.TabIndex = 74 @@ -265,7 +265,7 @@ Partial Class dlgOneVarFitModel 'lblQuantile ' Me.lblQuantile.AutoSize = True - Me.lblQuantile.Location = New System.Drawing.Point(248, 206) + Me.lblQuantile.Location = New System.Drawing.Point(248, 200) Me.lblQuantile.Name = "lblQuantile" Me.lblQuantile.Size = New System.Drawing.Size(49, 13) Me.lblQuantile.TabIndex = 76 @@ -274,7 +274,7 @@ Partial Class dlgOneVarFitModel 'lblNullHyp ' Me.lblNullHyp.AutoSize = True - Me.lblNullHyp.Location = New System.Drawing.Point(248, 175) + Me.lblNullHyp.Location = New System.Drawing.Point(248, 169) Me.lblNullHyp.Name = "lblNullHyp" Me.lblNullHyp.Size = New System.Drawing.Size(83, 13) Me.lblNullHyp.TabIndex = 78 @@ -283,7 +283,7 @@ Partial Class dlgOneVarFitModel 'lblNulHypothesis ' Me.lblNulHypothesis.AutoSize = True - Me.lblNulHypothesis.Location = New System.Drawing.Point(248, 175) + Me.lblNulHypothesis.Location = New System.Drawing.Point(248, 169) Me.lblNulHypothesis.Name = "lblNulHypothesis" Me.lblNulHypothesis.Size = New System.Drawing.Size(83, 13) Me.lblNulHypothesis.TabIndex = 80 @@ -292,18 +292,37 @@ Partial Class dlgOneVarFitModel 'lblMonteCarlo ' Me.lblMonteCarlo.AutoSize = True - Me.lblMonteCarlo.Location = New System.Drawing.Point(248, 175) + Me.lblMonteCarlo.Location = New System.Drawing.Point(248, 169) Me.lblMonteCarlo.Name = "lblMonteCarlo" Me.lblMonteCarlo.Size = New System.Drawing.Size(67, 13) Me.lblMonteCarlo.TabIndex = 82 Me.lblMonteCarlo.Text = "Monte-Carlo:" ' + 'lblQMethod + ' + Me.lblQMethod.AutoSize = True + Me.lblQMethod.Location = New System.Drawing.Point(248, 229) + Me.lblQMethod.Name = "lblQMethod" + Me.lblQMethod.Size = New System.Drawing.Size(60, 13) + Me.lblQMethod.TabIndex = 84 + Me.lblQMethod.Text = "Q. Method:" + ' + 'ucrInputComboQMethod + ' + Me.ucrInputComboQMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboQMethod.IsReadOnly = False + Me.ucrInputComboQMethod.Location = New System.Drawing.Point(350, 225) + Me.ucrInputComboQMethod.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputComboQMethod.Name = "ucrInputComboQMethod" + Me.ucrInputComboQMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboQMethod.TabIndex = 83 + ' 'ucrInputTextM ' Me.ucrInputTextM.AddQuotesIfUnrecognised = True Me.ucrInputTextM.IsMultiline = False Me.ucrInputTextM.IsReadOnly = False - Me.ucrInputTextM.Location = New System.Drawing.Point(350, 172) + Me.ucrInputTextM.Location = New System.Drawing.Point(350, 166) Me.ucrInputTextM.Name = "ucrInputTextM" Me.ucrInputTextM.Size = New System.Drawing.Size(61, 21) Me.ucrInputTextM.TabIndex = 81 @@ -313,7 +332,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputNulHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputNulHypothesis.IsMultiline = False Me.ucrInputNulHypothesis.IsReadOnly = False - Me.ucrInputNulHypothesis.Location = New System.Drawing.Point(350, 172) + Me.ucrInputNulHypothesis.Location = New System.Drawing.Point(350, 166) Me.ucrInputNulHypothesis.Name = "ucrInputNulHypothesis" Me.ucrInputNulHypothesis.Size = New System.Drawing.Size(61, 21) Me.ucrInputNulHypothesis.TabIndex = 79 @@ -323,7 +342,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputTxtHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputTxtHypothesis.IsMultiline = False Me.ucrInputTxtHypothesis.IsReadOnly = False - Me.ucrInputTxtHypothesis.Location = New System.Drawing.Point(350, 172) + Me.ucrInputTxtHypothesis.Location = New System.Drawing.Point(350, 166) Me.ucrInputTxtHypothesis.Name = "ucrInputTxtHypothesis" Me.ucrInputTxtHypothesis.Size = New System.Drawing.Size(61, 21) Me.ucrInputTxtHypothesis.TabIndex = 77 @@ -332,7 +351,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrNudQuantile.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudQuantile.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudQuantile.Location = New System.Drawing.Point(350, 201) + Me.ucrNudQuantile.Location = New System.Drawing.Point(350, 195) Me.ucrNudQuantile.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudQuantile.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudQuantile.Name = "ucrNudQuantile" @@ -344,7 +363,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True Me.ucrInputComboConfidenceLevel.IsReadOnly = False - Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(351, 146) + Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(351, 140) Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboConfidenceLevel.Name = "ucrInputComboConfidenceLevel" Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(60, 21) @@ -355,7 +374,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputTxtSd.AddQuotesIfUnrecognised = True Me.ucrInputTxtSd.IsMultiline = False Me.ucrInputTxtSd.IsReadOnly = False - Me.ucrInputTxtSd.Location = New System.Drawing.Point(350, 201) + Me.ucrInputTxtSd.Location = New System.Drawing.Point(350, 195) Me.ucrInputTxtSd.Name = "ucrInputTxtSd" Me.ucrInputTxtSd.Size = New System.Drawing.Size(61, 21) Me.ucrInputTxtSd.TabIndex = 71 @@ -364,7 +383,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboQuantilCI.AddQuotesIfUnrecognised = True Me.ucrInputComboQuantilCI.IsReadOnly = False - Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(350, 172) + Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboQuantilCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboQuantilCI.Name = "ucrInputComboQuantilCI" Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(61, 21) @@ -374,7 +393,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboMedianCI.AddQuotesIfUnrecognised = True Me.ucrInputComboMedianCI.IsReadOnly = False - Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(350, 172) + Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboMedianCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboMedianCI.Name = "ucrInputComboMedianCI" Me.ucrInputComboMedianCI.Size = New System.Drawing.Size(60, 21) @@ -384,7 +403,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboVarianceCI.AddQuotesIfUnrecognised = True Me.ucrInputComboVarianceCI.IsReadOnly = False - Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(350, 172) + Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboVarianceCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboVarianceCI.Name = "ucrInputComboVarianceCI" Me.ucrInputComboVarianceCI.Size = New System.Drawing.Size(60, 21) @@ -394,7 +413,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True Me.ucrInputComboMethod.IsReadOnly = False - Me.ucrInputComboMethod.Location = New System.Drawing.Point(350, 201) + Me.ucrInputComboMethod.Location = New System.Drawing.Point(350, 195) Me.ucrInputComboMethod.Name = "ucrInputComboMethod" Me.ucrInputComboMethod.Size = New System.Drawing.Size(60, 21) Me.ucrInputComboMethod.TabIndex = 63 @@ -403,7 +422,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputCIMethods.AddQuotesIfUnrecognised = True Me.ucrInputCIMethods.IsReadOnly = False - Me.ucrInputCIMethods.Location = New System.Drawing.Point(350, 201) + Me.ucrInputCIMethods.Location = New System.Drawing.Point(350, 195) Me.ucrInputCIMethods.Name = "ucrInputCIMethods" Me.ucrInputCIMethods.Size = New System.Drawing.Size(60, 21) Me.ucrInputCIMethods.TabIndex = 61 @@ -412,7 +431,7 @@ Partial Class dlgOneVarFitModel ' Me.ucrInputMeanCIMethod.AddQuotesIfUnrecognised = True Me.ucrInputMeanCIMethod.IsReadOnly = False - Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(350, 172) + Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(350, 166) Me.ucrInputMeanCIMethod.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputMeanCIMethod.Name = "ucrInputMeanCIMethod" Me.ucrInputMeanCIMethod.Size = New System.Drawing.Size(60, 21) @@ -423,7 +442,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputNullHypothesis.AddQuotesIfUnrecognised = True Me.ucrInputNullHypothesis.IsMultiline = False Me.ucrInputNullHypothesis.IsReadOnly = False - Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(351, 172) + Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(351, 166) Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(58, 21) @@ -452,10 +471,10 @@ Partial Class dlgOneVarFitModel 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.Checked = False - Me.ucrChkOmitMissing.Location = New System.Drawing.Point(248, 116) + Me.ucrChkOmitMissing.Location = New System.Drawing.Point(10, 289) Me.ucrChkOmitMissing.Margin = New System.Windows.Forms.Padding(5) Me.ucrChkOmitMissing.Name = "ucrChkOmitMissing" - Me.ucrChkOmitMissing.Size = New System.Drawing.Size(142, 20) + Me.ucrChkOmitMissing.Size = New System.Drawing.Size(148, 20) Me.ucrChkOmitMissing.TabIndex = 52 ' 'ucrChkConvertVariate @@ -522,25 +541,6 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputComboQMethod - ' - Me.ucrInputComboQMethod.AddQuotesIfUnrecognised = True - Me.ucrInputComboQMethod.IsReadOnly = False - Me.ucrInputComboQMethod.Location = New System.Drawing.Point(350, 231) - Me.ucrInputComboQMethod.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputComboQMethod.Name = "ucrInputComboQMethod" - Me.ucrInputComboQMethod.Size = New System.Drawing.Size(60, 21) - Me.ucrInputComboQMethod.TabIndex = 83 - ' - 'lblQMethod - ' - Me.lblQMethod.AutoSize = True - Me.lblQMethod.Location = New System.Drawing.Point(248, 235) - Me.lblQMethod.Name = "lblQMethod" - Me.lblQMethod.Size = New System.Drawing.Size(60, 13) - Me.lblQMethod.TabIndex = 84 - Me.lblQMethod.Text = "Q. Method:" - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) From c17cf64b8ddf91b89e5af968ae4d703dfdbcf13d Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 27 Jul 2020 10:44:42 +0300 Subject: [PATCH 146/172] Proper linking of the controls --- instat/dlgOneVarFitModel.vb | 51 +++++++++++++++++---------- instat/dlgOneVarFitModel2.Designer.vb | 25 +++++++++++++ 2 files changed, 57 insertions(+), 19 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f35d676d628..4c2939917fd 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -48,7 +48,8 @@ Public Class dlgOneVarFitModel Dim dctVarCI As New Dictionary(Of String, String) Dim dctQuantileCI As New Dictionary(Of String, String) Dim dctConfidence As New Dictionary(Of String, String) - Dim DctQMethod As New Dictionary(Of String, String) + Dim dctQMethod As New Dictionary(Of String, String) + Dim dctConfidenceInterval As New Dictionary(Of String, String) Dim lstCommandButtons As New List(Of Control) ucrBase.iHelpTopicID = 296 @@ -82,7 +83,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") - ucrInputComboTests.SetItems({"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "Bartel", "br", "runs", "Sen", "Serial Corr", "snh", "ad", "cvm", "lillie", "pearson", "sf"}) + ucrInputComboTests.SetItems({"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "Bartel", "br", "runs", "Sen", "serial corr", "snh", "ad", "cvm", "lillie", "pearson", "sf"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() ucrInputComboEstimate.SetItems({"mean", "median", "normal", "quantile", "sd", "variance"}) @@ -186,31 +187,39 @@ Public Class dlgOneVarFitModel dctConfidence.Add("0.999", "0.999") ucrInputComboConfidenceLevel.SetItems(dctConfidence) ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False - ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=False, dcmMax:=1.0, bIncludeMax:=False) + ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) + + ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) + dctConfidenceInterval.Add("0.900", "0.90") + dctConfidenceInterval.Add("0.950", "0.95") + dctConfidenceInterval.Add("0.980", "0.98") + dctConfidenceInterval.Add("0.990", "0.99") + dctConfidenceInterval.Add("0.999", "0.999") + ucrInputConfidenceInterval.SetItems(dctConfidenceInterval) + ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False + ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputNullHypothesis, {rdoTest}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate, rdoTest}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"mean", "median", "normal", "quantile", "sd", "variance"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"mean"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"median"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"variance"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputComboConfidenceLevel, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputConfidenceInterval, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"runs"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"t", "Z"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "nh"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"rdoEstimate", "quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "snh"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) @@ -227,6 +236,7 @@ Public Class dlgOneVarFitModel ucrInputNulHypothesis.SetLinkedDisplayControl(lblNulHypothesis) ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) + ucrInputConfidenceInterval.SetLinkedDisplayControl(lblConfidenceLevel) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -245,6 +255,8 @@ Public Class dlgOneVarFitModel clsRLogLikFunction = New RFunction ucrDistribution = New ucrDistributions + ucrChkOmitMissing.Checked = True + clsRfitdist = New RFunction clsRConvertVector = New RFunction @@ -346,6 +358,7 @@ Public Class dlgOneVarFitModel clsBionomialFunction.SetPackageName("mosaic") clsBionomialFunction.SetRCommand("binom.test") clsBionomialFunction.AddParameter("p", "0.5", iPosition:=1) + clsBionomialFunction.AddParameter("conf.level", "0.95", iPosition:=2) clsBionomialFunction.AddParameter("ci.method", Chr(34) & "Clopper-Pearson" & Chr(34), iPosition:=3) clsProportionFunction.SetPackageName("mosaic") @@ -454,7 +467,6 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) bResetFittingOptions = True bResetFitModDisplay = True - ucrChkOmitMissing.Checked = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -475,6 +487,7 @@ Public Class dlgOneVarFitModel ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsSdCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=3) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsNormCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=4) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsQuantileCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=5) + ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsRunsFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=6) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=13) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=14) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=15) @@ -492,14 +505,13 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=5) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=8) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=9) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=10) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=12) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=13) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrInputTxtHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 2), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) @@ -539,6 +551,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) ucrInputCIMethods.SetRCode(clsBionomialFunction, bReset) + ucrInputConfidenceInterval.SetRCode(clsBionomialFunction, bReset) ucrInputComboMethod.SetRCode(clsBartelFunction, bReset) ucrInputComboMedianCI.SetRCode(clsMedianCIFunction, bReset) ucrInputComboVarianceCI.SetRCode(clsVarCIFunction, bReset) diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index ec471d43c03..0eea69750a4 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -84,6 +84,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() + Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -541,11 +543,32 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrInputConfidenceInterval + ' + Me.ucrInputConfidenceInterval.AddQuotesIfUnrecognised = True + Me.ucrInputConfidenceInterval.IsReadOnly = False + Me.ucrInputConfidenceInterval.Location = New System.Drawing.Point(351, 140) + Me.ucrInputConfidenceInterval.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputConfidenceInterval.Name = "ucrInputConfidenceInterval" + Me.ucrInputConfidenceInterval.Size = New System.Drawing.Size(60, 21) + Me.ucrInputConfidenceInterval.TabIndex = 85 + ' + 'lblConfidenceLevel + ' + Me.lblConfidenceLevel.AutoSize = True + Me.lblConfidenceLevel.Location = New System.Drawing.Point(248, 143) + Me.lblConfidenceLevel.Name = "lblConfidenceLevel" + Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) + Me.lblConfidenceLevel.TabIndex = 86 + Me.lblConfidenceLevel.Text = "Confidence Level:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblConfidenceLevel) + Me.Controls.Add(Me.ucrInputConfidenceInterval) Me.Controls.Add(Me.lblQMethod) Me.Controls.Add(Me.ucrInputComboQMethod) Me.Controls.Add(Me.lblMonteCarlo) @@ -650,4 +673,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputTextM As ucrInputTextBox Friend WithEvents lblQMethod As Label Friend WithEvents ucrInputComboQMethod As ucrInputComboBox + Friend WithEvents lblConfidenceLevel As Label + Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox End Class \ No newline at end of file From 07f6137c3783eb30f3faaa6bde83855f8f4a096e Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 14:12:50 +0300 Subject: [PATCH 147/172] Restricting various tets to variable type --- instat/dlgOneVarFitModel.vb | 121 +++++++++++++++----------- instat/dlgOneVarFitModel2.Designer.vb | 25 ++++++ 2 files changed, 95 insertions(+), 51 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4c2939917fd..54f7475ce6a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -199,6 +199,7 @@ Public Class dlgOneVarFitModel ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) + ucrInputSuccess.SetParameter(New RParameter("success", 6)) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") @@ -213,6 +214,7 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputConfidenceInterval, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputSuccess, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"runs"}, bNewLinkedHideIfParameterMissing:=True) @@ -237,6 +239,7 @@ Public Class dlgOneVarFitModel ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) ucrInputConfidenceInterval.SetLinkedDisplayControl(lblConfidenceLevel) + ucrInputSuccess.SetLinkedDisplayControl(lblSuccess) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -516,6 +519,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputTextM.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("m", 1), iAdditionalPairNo:=1) + ucrInputSuccess.AddAdditionalCodeParameterPair(clsProportionFunction, ucrInputSuccess.GetParameter(), iAdditionalPairNo:=1) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) @@ -563,6 +567,7 @@ Public Class dlgOneVarFitModel ucrInputComboQMethod.SetRCode(clsQuantileCIFunction, bReset) ucrInputNulHypothesis.SetRCode(clsTtestFunction, bReset) ucrInputTextM.SetRCode(clsBrFunction) + ucrInputSuccess.SetRCode(clsBionomialFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) @@ -582,40 +587,6 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub - Private Sub ResponseConvert() - If Not ucrReceiverVariable.IsEmpty Then - ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) - If ucrReceiverVariable.strCurrDataType = "numeric" Then - ucrChkConvertVariate.Checked = False - ucrChkConvertVariate.Visible = False - Else - ucrChkConvertVariate.Visible = True - End If - If ucrChkConvertVariate.Checked Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then - ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables - End If - End If - Else - ucrChkConvertVariate.Visible = False - End If - If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then - ucrDistributionChoice.Enabled = False - ucrDistributionChoice.ucrInputDistributions.SetName("") - Else - ucrDistributionChoice.Enabled = True - End If - TestOKEnabled() - End Sub - Private Sub StartParameterValues() If ucrDistributionChoice.clsCurrDistribution.strNameTag = "von_mises" Then clsROneVarFitModel.AddParameter("start", "list(mu = 0.1, kappa = 0.2)", iPosition:=1) @@ -638,17 +609,6 @@ Public Class dlgOneVarFitModel End Select End If End Sub - - Private Sub PlotResiduals() - clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then - clsRConvertInteger.SetRCommand("as.integer") - clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsRConvertVector.SetRCommand("as.vector") - clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - End Sub Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click sdgOneVarFitModDisplay.SetRCode(ucrBase.clsRsyntax, clsRNewOneVarFitModel:=clsROneVarFitModel, clsNewRLogLikFunction:=clsRLogLikFunction, clsNewRplotFunction:=clsRplotFunction, clsNewRplotPPComp:=clsRplotPPComp, clsNewRplotCdfcomp:=clsRplotCdfcomp, clsNewRplotQqComp:=clsRplotQqComp, clsNewRplotDenscomp:=clsRplotDenscomp, ucrNewDistribution:=ucrDistribution, bReset:=bResetFitModDisplay) @@ -689,15 +649,54 @@ Public Class dlgOneVarFitModel If rdoGeneralCase.Checked Then clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) - PlotResiduals() StartParameterValues() TestOKEnabled() End If End Sub - Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged - PlotResiduals() - ResponseConvert() + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrDistributionChoice.ControlValueChanged, ucrPnlGeneralExactCase.ControlValueChanged + If rdoGeneralCase.Checked Then + clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then + clsRConvertInteger.SetRCommand("as.integer") + clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + Else + clsRConvertVector.SetRCommand("as.vector") + clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + End If + If Not ucrReceiverVariable.IsEmpty Then + ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) + If ucrReceiverVariable.strCurrDataType = "numeric" Then + ucrChkConvertVariate.Checked = False + ucrChkConvertVariate.Visible = False + Else + ucrChkConvertVariate.Visible = True + End If + If ucrChkConvertVariate.Checked Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + Else + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + End If + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then + ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables + End If + End If + Else + ucrChkConvertVariate.Visible = False + End If + If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then + ucrDistributionChoice.Enabled = False + ucrDistributionChoice.ucrInputDistributions.SetName("") + Else + ucrDistributionChoice.Enabled = True + End If + Else + ucrChkConvertVariate.Visible = False + End If End Sub Private Sub SetTestEstimateBaseFunction() @@ -706,18 +705,31 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.AddToAfterCodes(clsRplotFunction, iPosition:=1) ElseIf rdoTest.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) + ucrReceiverVariable.AddIncludedMetadataProperty("class", {Chr(34) & "" & Chr(34)}) Select Case ucrInputComboTests.GetValue Case "binomial" + ucrReceiverVariable.SetDataType("factor") + ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) Case "proportion" + ucrReceiverVariable.SetDataType("factor") + ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsProportionFunction) Case "sign" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSignTestFunction) Case "t" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsTtestFunction) Case "Wilcoxon" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) Case "Z" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) @@ -728,21 +740,28 @@ Public Class dlgOneVarFitModel Case "Sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "snh" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "sf" ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) - End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) + ucrReceiverVariable.SetDataType("numeric") + ucrReceiverVariable.strSelectorHeading = "Numerics" Select Case ucrInputComboEstimate.GetValue Case "mean" ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) @@ -760,7 +779,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged, ucrReceiverVariable.ControlValueChanged SetTestEstimateBaseFunction() End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 0eea69750a4..1a4c22ff5cc 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -86,6 +86,8 @@ Partial Class dlgOneVarFitModel Me.ucrBase = New instat.ucrButtons() Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() Me.lblConfidenceLevel = New System.Windows.Forms.Label() + Me.ucrInputSuccess = New instat.ucrInputTextBox() + Me.lblSuccess = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -562,11 +564,32 @@ Partial Class dlgOneVarFitModel Me.lblConfidenceLevel.TabIndex = 86 Me.lblConfidenceLevel.Text = "Confidence Level:" ' + 'ucrInputSuccess + ' + Me.ucrInputSuccess.AddQuotesIfUnrecognised = True + Me.ucrInputSuccess.IsMultiline = False + Me.ucrInputSuccess.IsReadOnly = False + Me.ucrInputSuccess.Location = New System.Drawing.Point(348, 249) + Me.ucrInputSuccess.Name = "ucrInputSuccess" + Me.ucrInputSuccess.Size = New System.Drawing.Size(61, 21) + Me.ucrInputSuccess.TabIndex = 87 + ' + 'lblSuccess + ' + Me.lblSuccess.AutoSize = True + Me.lblSuccess.Location = New System.Drawing.Point(248, 252) + Me.lblSuccess.Name = "lblSuccess" + Me.lblSuccess.Size = New System.Drawing.Size(51, 13) + Me.lblSuccess.TabIndex = 88 + Me.lblSuccess.Text = "Success:" + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.lblSuccess) + Me.Controls.Add(Me.ucrInputSuccess) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.ucrInputConfidenceInterval) Me.Controls.Add(Me.lblQMethod) @@ -675,4 +698,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputComboQMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox + Friend WithEvents lblSuccess As Label + Friend WithEvents ucrInputSuccess As ucrInputTextBox End Class \ No newline at end of file From 689cb5b4023b9cce750e08d8ed66a56f02947889 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 17 Aug 2020 09:51:45 +0300 Subject: [PATCH 148/172] Proper linking of controls --- instat/dlgOneVarFitModel.vb | 60 +++++++++------------------ instat/dlgOneVarFitModel2.Designer.vb | 25 ----------- 2 files changed, 20 insertions(+), 65 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 54f7475ce6a..54387fd9fdb 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -189,20 +189,21 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) - ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) - dctConfidenceInterval.Add("0.900", "0.90") - dctConfidenceInterval.Add("0.950", "0.95") - dctConfidenceInterval.Add("0.980", "0.98") - dctConfidenceInterval.Add("0.990", "0.99") - dctConfidenceInterval.Add("0.999", "0.999") - ucrInputConfidenceInterval.SetItems(dctConfidenceInterval) - ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False - ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) + 'ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) + 'dctConfidenceInterval.Add("0.900", "0.90") + 'dctConfidenceInterval.Add("0.950", "0.95") + 'dctConfidenceInterval.Add("0.980", "0.98") + 'dctConfidenceInterval.Add("0.990", "0.99") + 'dctConfidenceInterval.Add("0.999", "0.999") + 'ucrInputConfidenceInterval.SetItems(dctConfidenceInterval) + 'ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False + 'ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) ucrInputSuccess.SetParameter(New RParameter("success", 6)) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") + ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate, rdoTest}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"mean", "median", "normal", "quantile", "sd", "variance"}, bNewLinkedHideIfParameterMissing:=True) @@ -212,7 +213,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputConfidenceInterval, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputComboConfidenceLevel, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputSuccess, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -238,7 +239,6 @@ Public Class dlgOneVarFitModel ucrInputNulHypothesis.SetLinkedDisplayControl(lblNulHypothesis) ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) - ucrInputConfidenceInterval.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputSuccess.SetLinkedDisplayControl(lblSuccess) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) @@ -508,13 +508,14 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=5) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) - ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=8) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=9) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=10) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=12) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=13) + ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) ucrInputTxtHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 2), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) @@ -555,7 +556,6 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) ucrInputCIMethods.SetRCode(clsBionomialFunction, bReset) - ucrInputConfidenceInterval.SetRCode(clsBionomialFunction, bReset) ucrInputComboMethod.SetRCode(clsBartelFunction, bReset) ucrInputComboMedianCI.SetRCode(clsMedianCIFunction, bReset) ucrInputComboVarianceCI.SetRCode(clsVarCIFunction, bReset) @@ -708,28 +708,16 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddIncludedMetadataProperty("class", {Chr(34) & "" & Chr(34)}) Select Case ucrInputComboTests.GetValue Case "binomial" - ucrReceiverVariable.SetDataType("factor") - ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) Case "proportion" - ucrReceiverVariable.SetDataType("factor") - ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsProportionFunction) Case "sign" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSignTestFunction) Case "t" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsTtestFunction) Case "Wilcoxon" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) Case "Z" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) @@ -740,28 +728,20 @@ Public Class dlgOneVarFitModel Case "Sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "snh" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "sf" ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) - ucrReceiverVariable.SetDataType("numeric") - ucrReceiverVariable.strSelectorHeading = "Numerics" Select Case ucrInputComboEstimate.GetValue Case "mean" ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) @@ -779,7 +759,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged, ucrReceiverVariable.ControlValueChanged + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetTestEstimateBaseFunction() End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 1a4c22ff5cc..810c273ee46 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -84,8 +84,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() - Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.ucrInputSuccess = New instat.ucrInputTextBox() Me.lblSuccess = New System.Windows.Forms.Label() Me.SuspendLayout() @@ -545,25 +543,6 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputConfidenceInterval - ' - Me.ucrInputConfidenceInterval.AddQuotesIfUnrecognised = True - Me.ucrInputConfidenceInterval.IsReadOnly = False - Me.ucrInputConfidenceInterval.Location = New System.Drawing.Point(351, 140) - Me.ucrInputConfidenceInterval.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputConfidenceInterval.Name = "ucrInputConfidenceInterval" - Me.ucrInputConfidenceInterval.Size = New System.Drawing.Size(60, 21) - Me.ucrInputConfidenceInterval.TabIndex = 85 - ' - 'lblConfidenceLevel - ' - Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(248, 143) - Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) - Me.lblConfidenceLevel.TabIndex = 86 - Me.lblConfidenceLevel.Text = "Confidence Level:" - ' 'ucrInputSuccess ' Me.ucrInputSuccess.AddQuotesIfUnrecognised = True @@ -590,8 +569,6 @@ Partial Class dlgOneVarFitModel Me.ClientSize = New System.Drawing.Size(428, 420) Me.Controls.Add(Me.lblSuccess) Me.Controls.Add(Me.ucrInputSuccess) - Me.Controls.Add(Me.lblConfidenceLevel) - Me.Controls.Add(Me.ucrInputConfidenceInterval) Me.Controls.Add(Me.lblQMethod) Me.Controls.Add(Me.ucrInputComboQMethod) Me.Controls.Add(Me.lblMonteCarlo) @@ -696,8 +673,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputTextM As ucrInputTextBox Friend WithEvents lblQMethod As Label Friend WithEvents ucrInputComboQMethod As ucrInputComboBox - Friend WithEvents lblConfidenceLevel As Label - Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox Friend WithEvents lblSuccess As Label Friend WithEvents ucrInputSuccess As ucrInputTextBox End Class \ No newline at end of file From 4dfc1d99b5c3e10cae47010ce3304ffa8b1dba74 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 17 Aug 2020 10:38:57 +0300 Subject: [PATCH 149/172] Revert "Proper linking of controls" This reverts commit 689cb5b4023b9cce750e08d8ed66a56f02947889. --- instat/dlgOneVarFitModel.vb | 60 ++++++++++++++++++--------- instat/dlgOneVarFitModel2.Designer.vb | 25 +++++++++++ 2 files changed, 65 insertions(+), 20 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 54387fd9fdb..54f7475ce6a 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -189,21 +189,20 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) - 'ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) - 'dctConfidenceInterval.Add("0.900", "0.90") - 'dctConfidenceInterval.Add("0.950", "0.95") - 'dctConfidenceInterval.Add("0.980", "0.98") - 'dctConfidenceInterval.Add("0.990", "0.99") - 'dctConfidenceInterval.Add("0.999", "0.999") - 'ucrInputConfidenceInterval.SetItems(dctConfidenceInterval) - 'ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False - 'ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) + ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) + dctConfidenceInterval.Add("0.900", "0.90") + dctConfidenceInterval.Add("0.950", "0.95") + dctConfidenceInterval.Add("0.980", "0.98") + dctConfidenceInterval.Add("0.990", "0.99") + dctConfidenceInterval.Add("0.999", "0.999") + ucrInputConfidenceInterval.SetItems(dctConfidenceInterval) + ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False + ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) ucrInputSuccess.SetParameter(New RParameter("success", 6)) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") - ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboConfidenceLevel, {rdoEstimate, rdoTest}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"mean", "median", "normal", "quantile", "sd", "variance"}, bNewLinkedHideIfParameterMissing:=True) @@ -213,7 +212,7 @@ Public Class dlgOneVarFitModel ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputComboConfidenceLevel, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputConfidenceInterval, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputSuccess, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -239,6 +238,7 @@ Public Class dlgOneVarFitModel ucrInputNulHypothesis.SetLinkedDisplayControl(lblNulHypothesis) ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) + ucrInputConfidenceInterval.SetLinkedDisplayControl(lblConfidenceLevel) ucrInputSuccess.SetLinkedDisplayControl(lblSuccess) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) @@ -508,14 +508,13 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=5) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=6) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=8) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=9) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=10) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=11) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=12) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=13) - ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=14) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=2) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("conf.level", 3), iAdditionalPairNo:=3) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=4) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=5) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) + ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrInputTxtHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 2), iAdditionalPairNo:=1) ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) @@ -556,6 +555,7 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.SetRCode(clsBionomialFunction, bReset) ucrInputMeanCIMethod.SetRCode(clsMeanCIFunction, bReset) ucrInputCIMethods.SetRCode(clsBionomialFunction, bReset) + ucrInputConfidenceInterval.SetRCode(clsBionomialFunction, bReset) ucrInputComboMethod.SetRCode(clsBartelFunction, bReset) ucrInputComboMedianCI.SetRCode(clsMedianCIFunction, bReset) ucrInputComboVarianceCI.SetRCode(clsVarCIFunction, bReset) @@ -708,16 +708,28 @@ Public Class dlgOneVarFitModel ucrReceiverVariable.AddIncludedMetadataProperty("class", {Chr(34) & "" & Chr(34)}) Select Case ucrInputComboTests.GetValue Case "binomial" + ucrReceiverVariable.SetDataType("factor") + ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) Case "proportion" + ucrReceiverVariable.SetDataType("factor") + ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsProportionFunction) Case "sign" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSignTestFunction) Case "t" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsTtestFunction) Case "Wilcoxon" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) Case "Z" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) @@ -728,20 +740,28 @@ Public Class dlgOneVarFitModel Case "Sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "snh" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" + ucrReceiverVariable.SetDataType("numeric", True) + ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "sf" ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) + ucrReceiverVariable.SetDataType("numeric") + ucrReceiverVariable.strSelectorHeading = "Numerics" Select Case ucrInputComboEstimate.GetValue Case "mean" ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) @@ -759,7 +779,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged, ucrReceiverVariable.ControlValueChanged SetTestEstimateBaseFunction() End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 810c273ee46..1a4c22ff5cc 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -84,6 +84,8 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() + Me.lblConfidenceLevel = New System.Windows.Forms.Label() Me.ucrInputSuccess = New instat.ucrInputTextBox() Me.lblSuccess = New System.Windows.Forms.Label() Me.SuspendLayout() @@ -543,6 +545,25 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrInputConfidenceInterval + ' + Me.ucrInputConfidenceInterval.AddQuotesIfUnrecognised = True + Me.ucrInputConfidenceInterval.IsReadOnly = False + Me.ucrInputConfidenceInterval.Location = New System.Drawing.Point(351, 140) + Me.ucrInputConfidenceInterval.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputConfidenceInterval.Name = "ucrInputConfidenceInterval" + Me.ucrInputConfidenceInterval.Size = New System.Drawing.Size(60, 21) + Me.ucrInputConfidenceInterval.TabIndex = 85 + ' + 'lblConfidenceLevel + ' + Me.lblConfidenceLevel.AutoSize = True + Me.lblConfidenceLevel.Location = New System.Drawing.Point(248, 143) + Me.lblConfidenceLevel.Name = "lblConfidenceLevel" + Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) + Me.lblConfidenceLevel.TabIndex = 86 + Me.lblConfidenceLevel.Text = "Confidence Level:" + ' 'ucrInputSuccess ' Me.ucrInputSuccess.AddQuotesIfUnrecognised = True @@ -569,6 +590,8 @@ Partial Class dlgOneVarFitModel Me.ClientSize = New System.Drawing.Size(428, 420) Me.Controls.Add(Me.lblSuccess) Me.Controls.Add(Me.ucrInputSuccess) + Me.Controls.Add(Me.lblConfidenceLevel) + Me.Controls.Add(Me.ucrInputConfidenceInterval) Me.Controls.Add(Me.lblQMethod) Me.Controls.Add(Me.ucrInputComboQMethod) Me.Controls.Add(Me.lblMonteCarlo) @@ -673,6 +696,8 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputTextM As ucrInputTextBox Friend WithEvents lblQMethod As Label Friend WithEvents ucrInputComboQMethod As ucrInputComboBox + Friend WithEvents lblConfidenceLevel As Label + Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox Friend WithEvents lblSuccess As Label Friend WithEvents ucrInputSuccess As ucrInputTextBox End Class \ No newline at end of file From 15ea43022e12d35a3660164d0c58c8b3622be28b Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 17 Aug 2020 10:43:00 +0300 Subject: [PATCH 150/172] Revert "Restricting various tets to variable type" This reverts commit 07f6137c3783eb30f3faaa6bde83855f8f4a096e. --- instat/dlgOneVarFitModel.vb | 121 +++++++++++--------------- instat/dlgOneVarFitModel2.Designer.vb | 25 ------ 2 files changed, 51 insertions(+), 95 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 54f7475ce6a..4c2939917fd 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -199,7 +199,6 @@ Public Class dlgOneVarFitModel ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) - ucrInputSuccess.SetParameter(New RParameter("success", 6)) ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") @@ -214,7 +213,6 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputConfidenceInterval, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrInputSuccess, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"runs"}, bNewLinkedHideIfParameterMissing:=True) @@ -239,7 +237,6 @@ Public Class dlgOneVarFitModel ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) ucrInputConfidenceInterval.SetLinkedDisplayControl(lblConfidenceLevel) - ucrInputSuccess.SetLinkedDisplayControl(lblSuccess) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -519,7 +516,6 @@ Public Class dlgOneVarFitModel ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputTextM.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("m", 1), iAdditionalPairNo:=1) - ucrInputSuccess.AddAdditionalCodeParameterPair(clsProportionFunction, ucrInputSuccess.GetParameter(), iAdditionalPairNo:=1) ' Additional Rcode for test functions ucrSaveModel.AddAdditionalRCode(clsBionomialFunction, iAdditionalPairNo:=1) @@ -567,7 +563,6 @@ Public Class dlgOneVarFitModel ucrInputComboQMethod.SetRCode(clsQuantileCIFunction, bReset) ucrInputNulHypothesis.SetRCode(clsTtestFunction, bReset) ucrInputTextM.SetRCode(clsBrFunction) - ucrInputSuccess.SetRCode(clsBionomialFunction, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) @@ -587,6 +582,40 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub + Private Sub ResponseConvert() + If Not ucrReceiverVariable.IsEmpty Then + ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) + If ucrReceiverVariable.strCurrDataType = "numeric" Then + ucrChkConvertVariate.Checked = False + ucrChkConvertVariate.Visible = False + Else + ucrChkConvertVariate.Visible = True + End If + If ucrChkConvertVariate.Checked Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + Else + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + End If + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then + ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables + End If + End If + Else + ucrChkConvertVariate.Visible = False + End If + If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then + ucrDistributionChoice.Enabled = False + ucrDistributionChoice.ucrInputDistributions.SetName("") + Else + ucrDistributionChoice.Enabled = True + End If + TestOKEnabled() + End Sub + Private Sub StartParameterValues() If ucrDistributionChoice.clsCurrDistribution.strNameTag = "von_mises" Then clsROneVarFitModel.AddParameter("start", "list(mu = 0.1, kappa = 0.2)", iPosition:=1) @@ -609,6 +638,17 @@ Public Class dlgOneVarFitModel End Select End If End Sub + + Private Sub PlotResiduals() + clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) + If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then + clsRConvertInteger.SetRCommand("as.integer") + clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + Else + clsRConvertVector.SetRCommand("as.vector") + clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + End If + End Sub Private Sub cmdDisplayOptions_Click(sender As Object, e As EventArgs) Handles cmdDisplayOptions.Click sdgOneVarFitModDisplay.SetRCode(ucrBase.clsRsyntax, clsRNewOneVarFitModel:=clsROneVarFitModel, clsNewRLogLikFunction:=clsRLogLikFunction, clsNewRplotFunction:=clsRplotFunction, clsNewRplotPPComp:=clsRplotPPComp, clsNewRplotCdfcomp:=clsRplotCdfcomp, clsNewRplotQqComp:=clsRplotQqComp, clsNewRplotDenscomp:=clsRplotDenscomp, ucrNewDistribution:=ucrDistribution, bReset:=bResetFitModDisplay) @@ -649,54 +689,15 @@ Public Class dlgOneVarFitModel If rdoGeneralCase.Checked Then clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) ucrSaveModel.SetPrefix(ucrDistributionChoice.clsCurrDistribution.strNameTag) + PlotResiduals() StartParameterValues() TestOKEnabled() End If End Sub - Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrDistributionChoice.ControlValueChanged, ucrPnlGeneralExactCase.ControlValueChanged - If rdoGeneralCase.Checked Then - clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then - clsRConvertInteger.SetRCommand("as.integer") - clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsRConvertVector.SetRCommand("as.vector") - clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If Not ucrReceiverVariable.IsEmpty Then - ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) - If ucrReceiverVariable.strCurrDataType = "numeric" Then - ucrChkConvertVariate.Checked = False - ucrChkConvertVariate.Visible = False - Else - ucrChkConvertVariate.Visible = True - End If - If ucrChkConvertVariate.Checked Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then - ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables - End If - End If - Else - ucrChkConvertVariate.Visible = False - End If - If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then - ucrDistributionChoice.Enabled = False - ucrDistributionChoice.ucrInputDistributions.SetName("") - Else - ucrDistributionChoice.Enabled = True - End If - Else - ucrChkConvertVariate.Visible = False - End If + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged + PlotResiduals() + ResponseConvert() End Sub Private Sub SetTestEstimateBaseFunction() @@ -705,31 +706,18 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.AddToAfterCodes(clsRplotFunction, iPosition:=1) ElseIf rdoTest.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) - ucrReceiverVariable.AddIncludedMetadataProperty("class", {Chr(34) & "" & Chr(34)}) Select Case ucrInputComboTests.GetValue Case "binomial" - ucrReceiverVariable.SetDataType("factor") - ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsBionomialFunction) Case "proportion" - ucrReceiverVariable.SetDataType("factor") - ucrReceiverVariable.strSelectorHeading = "Logical and Factors" ucrBase.clsRsyntax.SetBaseRFunction(clsProportionFunction) Case "sign" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSignTestFunction) Case "t" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsTtestFunction) Case "Wilcoxon" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsWilcoxonFunction) Case "Z" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) @@ -740,28 +728,21 @@ Public Class dlgOneVarFitModel Case "Sen" ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "snh" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" - ucrReceiverVariable.SetDataType("numeric", True) - ucrReceiverVariable.strSelectorHeading = "Numerics" ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "sf" ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) + End Select ElseIf rdoEstimate.Checked Then ucrBase.clsRsyntax.RemoveFromAfterCodes(clsRplotFunction) - ucrReceiverVariable.SetDataType("numeric") - ucrReceiverVariable.strSelectorHeading = "Numerics" Select Case ucrInputComboEstimate.GetValue Case "mean" ucrBase.clsRsyntax.SetBaseRFunction(clsMeanCIFunction) @@ -779,7 +760,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged, ucrReceiverVariable.ControlValueChanged + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetTestEstimateBaseFunction() End Sub diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 1a4c22ff5cc..0eea69750a4 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -86,8 +86,6 @@ Partial Class dlgOneVarFitModel Me.ucrBase = New instat.ucrButtons() Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() Me.lblConfidenceLevel = New System.Windows.Forms.Label() - Me.ucrInputSuccess = New instat.ucrInputTextBox() - Me.lblSuccess = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'LblVariable @@ -564,32 +562,11 @@ Partial Class dlgOneVarFitModel Me.lblConfidenceLevel.TabIndex = 86 Me.lblConfidenceLevel.Text = "Confidence Level:" ' - 'ucrInputSuccess - ' - Me.ucrInputSuccess.AddQuotesIfUnrecognised = True - Me.ucrInputSuccess.IsMultiline = False - Me.ucrInputSuccess.IsReadOnly = False - Me.ucrInputSuccess.Location = New System.Drawing.Point(348, 249) - Me.ucrInputSuccess.Name = "ucrInputSuccess" - Me.ucrInputSuccess.Size = New System.Drawing.Size(61, 21) - Me.ucrInputSuccess.TabIndex = 87 - ' - 'lblSuccess - ' - Me.lblSuccess.AutoSize = True - Me.lblSuccess.Location = New System.Drawing.Point(248, 252) - Me.lblSuccess.Name = "lblSuccess" - Me.lblSuccess.Size = New System.Drawing.Size(51, 13) - Me.lblSuccess.TabIndex = 88 - Me.lblSuccess.Text = "Success:" - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) - Me.Controls.Add(Me.lblSuccess) - Me.Controls.Add(Me.ucrInputSuccess) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.ucrInputConfidenceInterval) Me.Controls.Add(Me.lblQMethod) @@ -698,6 +675,4 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputComboQMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox - Friend WithEvents lblSuccess As Label - Friend WithEvents ucrInputSuccess As ucrInputTextBox End Class \ No newline at end of file From 81be88be1158b4a74bc3e9dc8d6f8166b6d03fb7 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 1 Sep 2020 17:16:05 +0300 Subject: [PATCH 151/172] Implementing sign Test --- instat/dlgOneVarFitModel.vb | 68 +++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 4c2939917fd..82d66a31d96 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -582,39 +582,6 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub - Private Sub ResponseConvert() - If Not ucrReceiverVariable.IsEmpty Then - ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) - If ucrReceiverVariable.strCurrDataType = "numeric" Then - ucrChkConvertVariate.Checked = False - ucrChkConvertVariate.Visible = False - Else - ucrChkConvertVariate.Visible = True - End If - If ucrChkConvertVariate.Checked Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) - Else - clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then - ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables - End If - End If - Else - ucrChkConvertVariate.Visible = False - End If - If ucrDistributionChoice.lstCurrentDistributions.Count = 0 OrElse ucrReceiverVariable.IsEmpty() Then - ucrDistributionChoice.Enabled = False - ucrDistributionChoice.ucrInputDistributions.SetName("") - Else - ucrDistributionChoice.Enabled = True - End If - TestOKEnabled() - End Sub Private Sub StartParameterValues() If ucrDistributionChoice.clsCurrDistribution.strNameTag = "von_mises" Then @@ -695,9 +662,37 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged - PlotResiduals() - ResponseConvert() + Private Sub EnableDisableConvertVariate() + If ucrReceiverVariable.strCurrDataType = "numeric" Then + ucrChkConvertVariate.Checked = False + ucrChkConvertVariate.Visible = False + Else + ucrChkConvertVariate.Visible = True + End If + End Sub + + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged + PlotResiduals() + EnableDisableConvertVariate() + If Not ucrReceiverVariable.IsEmpty Then + ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) + If ucrChkConvertVariate.Checked Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + 'TODO This is needed because fitdist checks is.vector on data which is FALSE when data has attributes + ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" OrElse ucrDistributionChoice.clsCurrDistribution.strNameTag = "Geometric" Then + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + ElseIf ucrDistributionChoice.clsCurrDistribution.strNameTag = "Extreme_Value" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Binomial" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Bernouli" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Students_t" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Chi_Square" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "F" Or ucrDistributionChoice.clsCurrDistribution.strNameTag = "Hypergeometric" Then + ' TODO llplot() no longer works with starting values. However, the mle's will not plot without starting values for these variables + Else + clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + End If + End If + End Sub + + Private Sub AddAsNumeric() + If ucrInputComboTests.GetText = "sign" AndAlso ucrChkConvertVariate.Checked Then + clsSignTestFunction.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If End Sub Private Sub SetTestEstimateBaseFunction() @@ -762,6 +757,7 @@ Public Class dlgOneVarFitModel Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetTestEstimateBaseFunction() + AddAsNumeric() End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged From 77cff0600dbc6260e177a4fe9313ddd6d6d80a0f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 2 Sep 2020 15:06:27 +0300 Subject: [PATCH 152/172] Modification of test functions --- instat/dlgOneVarFitModel.vb | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 82d66a31d96..be11cff698e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -305,6 +305,7 @@ Public Class dlgOneVarFitModel clsRConvertNumeric.SetRCommand("as.numeric") clsRConvertNumeric.AddParameter("x", clsRFunctionParameter:=clsNaExclude, iPosition:=0) + clsRConvertInteger.SetRCommand("as.integer") clsRConvertInteger.AddParameter("x", clsRFunctionParameter:=clsNaExclude, iPosition:=0) @@ -671,7 +672,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged, ucrInputComboTests.ControlValueChanged PlotResiduals() EnableDisableConvertVariate() If Not ucrReceiverVariable.IsEmpty Then @@ -686,14 +687,29 @@ Public Class dlgOneVarFitModel Else clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If + If ucrInputComboTests.GetText() = "sign" AndAlso ucrChkConvertVariate.Checked Then + clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsSignTestFunction.AddParameter("mu", "0", iPosition:=1) + End If + If ucrInputComboTests.GetText() = "t" AndAlso ucrChkConvertVariate.Checked Then + clsTtestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsTtestFunction.AddParameter("mu", "0", iPosition:=1) + End If + If ucrInputComboTests.GetText() = "wicoxon" AndAlso ucrChkConvertVariate.Checked Then + clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsWilcoxonFunction.AddParameter("mu", "0", iPosition:=1) + End If End If End Sub - Private Sub AddAsNumeric() - If ucrInputComboTests.GetText = "sign" AndAlso ucrChkConvertVariate.Checked Then - clsSignTestFunction.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - End Sub + 'Private Sub AddAsNumeric() + ' If ucrInputComboTests.GetText = "sign" Then + ' clsSignTestFunction.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + ' End If + 'End Sub Private Sub SetTestEstimateBaseFunction() If rdoGeneralCase.Checked Then @@ -757,7 +773,8 @@ Public Class dlgOneVarFitModel Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetTestEstimateBaseFunction() - AddAsNumeric() + ucrSaveModel.Reset() + 'AddAsNumeric() End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged From bb25e08b9829c5d0f5737121e96466a82911962d Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 2 Sep 2020 16:33:50 +0300 Subject: [PATCH 153/172] Modification to the tests functions --- instat/dlgOneVarFitModel.vb | 62 ++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index be11cff698e..0b5bcf1b408 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -697,11 +697,71 @@ Public Class dlgOneVarFitModel Else clsTtestFunction.AddParameter("mu", "0", iPosition:=1) End If - If ucrInputComboTests.GetText() = "wicoxon" AndAlso ucrChkConvertVariate.Checked Then + If ucrInputComboTests.GetText() = "Wicoxon" AndAlso ucrChkConvertVariate.Checked Then clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) Else clsWilcoxonFunction.AddParameter("mu", "0", iPosition:=1) End If + If ucrInputComboTests.GetText() = "Z" AndAlso ucrChkConvertVariate.Checked Then + clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsZTestFunction.AddParameter("sd_pop", "1", iPosition:=2) + End If + If ucrInputComboTests.GetText() = "Bartel" AndAlso ucrChkConvertVariate.Checked Then + clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsBartelFunction.AddParameter("method", Chr(34) & "normal" & Chr(34), iPosition:=1) + End If + If ucrInputComboTests.GetText() = "br" AndAlso ucrChkConvertVariate.Checked Then + clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsBrFunction.AddParameter("m", "20000", iPosition:=1) + End If + If ucrInputComboTests.GetText() = "runs" AndAlso ucrChkConvertVariate.Checked Then + clsRunsFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsRunsFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Sen" AndAlso ucrChkConvertVariate.Checked Then + clsSenFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsSenFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "serial corr" AndAlso ucrChkConvertVariate.Checked Then + clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsSerialCorrFunction.AddParameter("test", Chr(34) & "rank.von.Neumann" & Chr(34), iPosition:=1) + End If + If ucrInputComboTests.GetText() = "snh" AndAlso ucrChkConvertVariate.Checked Then + clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsSenFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "cvm" AndAlso ucrChkConvertVariate.Checked Then + clsCvmFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsCvmFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "lillie" AndAlso ucrChkConvertVariate.Checked Then + clsLillieFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsLillieFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "pearson" AndAlso ucrChkConvertVariate.Checked Then + clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsPearsonFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "sf" AndAlso ucrChkConvertVariate.Checked Then + clsSfFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsSfFunction.AddParameter("x", iPosition:=0) + End If + If ucrInputComboTests.GetText() = "ad" AndAlso ucrChkConvertVariate.Checked Then + clsAdFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Else + clsAdFunction.AddParameter("x", iPosition:=0) + End If End If End Sub From dff108eb832c7c1a4650aaf2279b596485717b59 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 4 Sep 2020 10:12:56 +0300 Subject: [PATCH 154/172] Added tooltip to the designer --- instat/dlgOneVarFitModel.resx | 6 ++++++ instat/dlgOneVarFitModel.vb | 9 +++++++++ instat/dlgOneVarFitModel2.Designer.vb | 17 +++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/instat/dlgOneVarFitModel.resx b/instat/dlgOneVarFitModel.resx index 29dcb1b3a35..8b800e5c309 100644 --- a/instat/dlgOneVarFitModel.resx +++ b/instat/dlgOneVarFitModel.resx @@ -117,4 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 29 + + + 17, 17 + \ No newline at end of file diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 0b5bcf1b408..5d6e9b8ac82 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -19,6 +19,15 @@ Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRunsFunction, clsSenFunction, clsSerialCorrFunction, clsSnhFunction, clsAdFunction, clsCvmFunction, clsLillieFunction, clsPearsonFunction, clsSfFunction As New RFunction + + Private Sub ToolTip2_Popup(sender As Object, e As PopupEventArgs) + + End Sub + + Private Sub ToolTip1_Popup(sender As Object, e As PopupEventArgs) Handles tttests.Popup + + End Sub + Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index 0eea69750a4..f2124887fb4 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -38,6 +38,7 @@ Partial Class dlgOneVarFitModel 'Do not modify it using the code editor. Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Me.LblVariable = New System.Windows.Forms.Label() Me.rdoTest = New System.Windows.Forms.RadioButton() Me.rdoGeneralCase = New System.Windows.Forms.RadioButton() @@ -86,6 +87,7 @@ Partial Class dlgOneVarFitModel Me.ucrBase = New instat.ucrButtons() Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() Me.lblConfidenceLevel = New System.Windows.Forms.Label() + Me.tttests = New System.Windows.Forms.ToolTip(Me.components) Me.SuspendLayout() ' 'LblVariable @@ -312,6 +314,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboQMethod ' Me.ucrInputComboQMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboQMethod.GetSetSelectedIndex = -1 Me.ucrInputComboQMethod.IsReadOnly = False Me.ucrInputComboQMethod.Location = New System.Drawing.Point(350, 225) Me.ucrInputComboQMethod.Margin = New System.Windows.Forms.Padding(5) @@ -364,6 +367,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboConfidenceLevel ' Me.ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = True + Me.ucrInputComboConfidenceLevel.GetSetSelectedIndex = -1 Me.ucrInputComboConfidenceLevel.IsReadOnly = False Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(351, 140) Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) @@ -384,6 +388,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboQuantilCI ' Me.ucrInputComboQuantilCI.AddQuotesIfUnrecognised = True + Me.ucrInputComboQuantilCI.GetSetSelectedIndex = -1 Me.ucrInputComboQuantilCI.IsReadOnly = False Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboQuantilCI.Margin = New System.Windows.Forms.Padding(5) @@ -394,6 +399,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboMedianCI ' Me.ucrInputComboMedianCI.AddQuotesIfUnrecognised = True + Me.ucrInputComboMedianCI.GetSetSelectedIndex = -1 Me.ucrInputComboMedianCI.IsReadOnly = False Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboMedianCI.Margin = New System.Windows.Forms.Padding(5) @@ -404,6 +410,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboVarianceCI ' Me.ucrInputComboVarianceCI.AddQuotesIfUnrecognised = True + Me.ucrInputComboVarianceCI.GetSetSelectedIndex = -1 Me.ucrInputComboVarianceCI.IsReadOnly = False Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboVarianceCI.Margin = New System.Windows.Forms.Padding(5) @@ -414,6 +421,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboMethod ' Me.ucrInputComboMethod.AddQuotesIfUnrecognised = True + Me.ucrInputComboMethod.GetSetSelectedIndex = -1 Me.ucrInputComboMethod.IsReadOnly = False Me.ucrInputComboMethod.Location = New System.Drawing.Point(350, 195) Me.ucrInputComboMethod.Name = "ucrInputComboMethod" @@ -423,6 +431,7 @@ Partial Class dlgOneVarFitModel 'ucrInputCIMethods ' Me.ucrInputCIMethods.AddQuotesIfUnrecognised = True + Me.ucrInputCIMethods.GetSetSelectedIndex = -1 Me.ucrInputCIMethods.IsReadOnly = False Me.ucrInputCIMethods.Location = New System.Drawing.Point(350, 195) Me.ucrInputCIMethods.Name = "ucrInputCIMethods" @@ -432,6 +441,7 @@ Partial Class dlgOneVarFitModel 'ucrInputMeanCIMethod ' Me.ucrInputMeanCIMethod.AddQuotesIfUnrecognised = True + Me.ucrInputMeanCIMethod.GetSetSelectedIndex = -1 Me.ucrInputMeanCIMethod.IsReadOnly = False Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(350, 166) Me.ucrInputMeanCIMethod.Margin = New System.Windows.Forms.Padding(5) @@ -453,6 +463,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboEstimate ' Me.ucrInputComboEstimate.AddQuotesIfUnrecognised = True + Me.ucrInputComboEstimate.GetSetSelectedIndex = -1 Me.ucrInputComboEstimate.IsReadOnly = False Me.ucrInputComboEstimate.Location = New System.Drawing.Point(66, 252) Me.ucrInputComboEstimate.Margin = New System.Windows.Forms.Padding(5) @@ -463,6 +474,7 @@ Partial Class dlgOneVarFitModel 'ucrInputComboTests ' Me.ucrInputComboTests.AddQuotesIfUnrecognised = True + Me.ucrInputComboTests.GetSetSelectedIndex = -1 Me.ucrInputComboTests.IsReadOnly = False Me.ucrInputComboTests.Location = New System.Drawing.Point(45, 252) Me.ucrInputComboTests.Margin = New System.Windows.Forms.Padding(5) @@ -546,6 +558,7 @@ Partial Class dlgOneVarFitModel 'ucrInputConfidenceInterval ' Me.ucrInputConfidenceInterval.AddQuotesIfUnrecognised = True + Me.ucrInputConfidenceInterval.GetSetSelectedIndex = -1 Me.ucrInputConfidenceInterval.IsReadOnly = False Me.ucrInputConfidenceInterval.Location = New System.Drawing.Point(351, 140) Me.ucrInputConfidenceInterval.Margin = New System.Windows.Forms.Padding(5) @@ -562,6 +575,9 @@ Partial Class dlgOneVarFitModel Me.lblConfidenceLevel.TabIndex = 86 Me.lblConfidenceLevel.Text = "Confidence Level:" ' + 'tttests + ' + ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -675,4 +691,5 @@ Partial Class dlgOneVarFitModel Friend WithEvents ucrInputComboQMethod As ucrInputComboBox Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox + Friend WithEvents tttests As ToolTip End Class \ No newline at end of file From 1ff63cfe98d592b566c3f7cd7b8a8edf3462dc69 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sat, 5 Sep 2020 12:39:03 +0300 Subject: [PATCH 155/172] Converting non numeric variables to numeric for each test --- instat/dlgOneVarFitModel.vb | 198 ++++++++++++++++++++---------------- 1 file changed, 112 insertions(+), 86 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5d6e9b8ac82..d8a7c1173ba 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -80,7 +80,8 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.SetText("Convert to Numeric") ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(True, "data", "as.numeric", True) - ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) + ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", "as.numeric", False) + 'ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) ucrDistribution = ucrDistributionChoice ucrDistributionChoice.SetGLMDistributions() @@ -197,6 +198,8 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.SetItems(dctConfidence) ucrInputComboConfidenceLevel.AddQuotesIfUnrecognised = False ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) + ucrInputComboConfidenceLevel.bAllowNonConditionValues = True + ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) dctConfidenceInterval.Add("0.900", "0.90") @@ -207,13 +210,14 @@ Public Class dlgOneVarFitModel ucrInputConfidenceInterval.SetItems(dctConfidenceInterval) ucrInputConfidenceInterval.AddQuotesIfUnrecognised = False ucrInputConfidenceInterval.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) + ucrInputConfidenceInterval.bAllowNonConditionValues = True ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboTests, {rdoTest}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Binomial") ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"mean", "median", "normal", "quantile", "sd", "variance"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"mean", "median", "normal", "quantile", "sd", "variance"}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"mean"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"median"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"variance"}, bNewLinkedHideIfParameterMissing:=True) @@ -384,7 +388,7 @@ Public Class dlgOneVarFitModel clsTtestFunction.AddParameter("mu", "0", iPosition:=1) clsWilcoxonFunction.SetPackageName("stats") - clsWilcoxonFunction.SetRCommand("wilcox.test") + clsWilcoxonFunction.SetRCommand("Wilcox.test") clsWilcoxonFunction.AddParameter("mu", "0", iPosition:=1) @@ -482,7 +486,7 @@ Public Class dlgOneVarFitModel Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("x", 0), iAdditionalPairNo:=2) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("x", 0), iAdditionalPairNo:=3) + 'ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("x", 0), iAdditionalPairNo:=3) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("x", 0), iAdditionalPairNo:=4) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("x", 0), iAdditionalPairNo:=5) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("x", 0), iAdditionalPairNo:=6) @@ -523,7 +527,6 @@ Public Class dlgOneVarFitModel ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=6) ucrInputConfidenceInterval.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=7) ucrInputTxtHypothesis.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("mu", 2), iAdditionalPairNo:=1) - ucrInputNullHypothesis.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputNulHypothesis.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("mu", 1), iAdditionalPairNo:=1) ucrInputTextM.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("m", 1), iAdditionalPairNo:=1) @@ -660,6 +663,7 @@ Public Class dlgOneVarFitModel End If SetTestEstimateBaseFunction() SetSaveLabelTextAndPrefix() + AddAsNumeric() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged @@ -681,7 +685,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged, ucrInputComboTests.ControlValueChanged + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged PlotResiduals() EnableDisableConvertVariate() If Not ucrReceiverVariable.IsEmpty Then @@ -696,90 +700,111 @@ Public Class dlgOneVarFitModel Else clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If - If ucrInputComboTests.GetText() = "sign" AndAlso ucrChkConvertVariate.Checked Then - clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsSignTestFunction.AddParameter("mu", "0", iPosition:=1) - End If - If ucrInputComboTests.GetText() = "t" AndAlso ucrChkConvertVariate.Checked Then - clsTtestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsTtestFunction.AddParameter("mu", "0", iPosition:=1) - End If - If ucrInputComboTests.GetText() = "Wicoxon" AndAlso ucrChkConvertVariate.Checked Then - clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsWilcoxonFunction.AddParameter("mu", "0", iPosition:=1) - End If - If ucrInputComboTests.GetText() = "Z" AndAlso ucrChkConvertVariate.Checked Then - clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsZTestFunction.AddParameter("sd_pop", "1", iPosition:=2) - End If - If ucrInputComboTests.GetText() = "Bartel" AndAlso ucrChkConvertVariate.Checked Then - clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsBartelFunction.AddParameter("method", Chr(34) & "normal" & Chr(34), iPosition:=1) - End If - If ucrInputComboTests.GetText() = "br" AndAlso ucrChkConvertVariate.Checked Then - clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsBrFunction.AddParameter("m", "20000", iPosition:=1) - End If - If ucrInputComboTests.GetText() = "runs" AndAlso ucrChkConvertVariate.Checked Then - clsRunsFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsRunsFunction.AddParameter("x", iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Sen" AndAlso ucrChkConvertVariate.Checked Then - clsSenFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsSenFunction.AddParameter("x", iPosition:=0) - End If - If ucrInputComboTests.GetText() = "serial corr" AndAlso ucrChkConvertVariate.Checked Then - clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsSerialCorrFunction.AddParameter("test", Chr(34) & "rank.von.Neumann" & Chr(34), iPosition:=1) - End If - If ucrInputComboTests.GetText() = "snh" AndAlso ucrChkConvertVariate.Checked Then - clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsSenFunction.AddParameter("x", iPosition:=0) - End If - If ucrInputComboTests.GetText() = "cvm" AndAlso ucrChkConvertVariate.Checked Then - clsCvmFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsCvmFunction.AddParameter("x", iPosition:=0) - End If - If ucrInputComboTests.GetText() = "lillie" AndAlso ucrChkConvertVariate.Checked Then - clsLillieFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsLillieFunction.AddParameter("x", iPosition:=0) - End If - If ucrInputComboTests.GetText() = "pearson" AndAlso ucrChkConvertVariate.Checked Then - clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsPearsonFunction.AddParameter("x", iPosition:=0) - End If - If ucrInputComboTests.GetText() = "sf" AndAlso ucrChkConvertVariate.Checked Then - clsSfFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + AddAsNumeric() + End If + End Sub + + Private Sub AddAsNumeric() + If rdoTest.Checked Then + If ucrChkConvertVariate.Checked Then + If ucrInputComboTests.GetText() = "sign" Then + clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "t" Then + clsTtestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Wicoxon" Then + clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Z" Then + clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Bartel" Then + clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Wilcoxon" Then + clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "br" Then + clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "runs" Then + clsRunsFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Sen" Then + clsSenFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "serial corr" Then + clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "snh" Then + clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "cvm" Then + clsCvmFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "lillie" Then + clsLillieFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "pearson" Then + clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "sf" Then + clsSfFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboTests.GetText() = "ad" Then + clsAdFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If Else - clsSfFunction.AddParameter("x", iPosition:=0) + If ucrInputComboTests.GetText() = "sign" Then + clsSignTestFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "t" Then + clsTtestFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Wicoxon" Then + clsWilcoxonFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Z" Then + clsZTestFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Bartel" Then + clsBartelFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "runs" Then + clsRunsFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "br" Then + clsBrFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "Sen" Then + clsSenFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "serial corr" Then + clsSerialCorrFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "snh" Then + clsSnhFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "cvm" Then + clsCvmFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "lillie" Then + clsLillieFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "pearson" Then + clsPearsonFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "sf" Then + clsSfFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If + If ucrInputComboTests.GetText() = "ad" Then + clsAdFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + End If End If - If ucrInputComboTests.GetText() = "ad" AndAlso ucrChkConvertVariate.Checked Then - clsAdFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - Else - clsAdFunction.AddParameter("x", iPosition:=0) End If - End If End Sub - 'Private Sub AddAsNumeric() - ' If ucrInputComboTests.GetText = "sign" Then - ' clsSignTestFunction.AddParameter("data", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - ' End If - 'End Sub - Private Sub SetTestEstimateBaseFunction() If rdoGeneralCase.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) @@ -841,9 +866,10 @@ Public Class dlgOneVarFitModel End Sub Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + SetTestEstimateBaseFunction() ucrSaveModel.Reset() - 'AddAsNumeric() + AddAsNumeric() End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged From eaa4bc91d32d83d2b6459a57404ca787f98886f1 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 7 Sep 2020 13:35:06 +0300 Subject: [PATCH 156/172] Linking estimates functions to the Convert to numeric check box --- instat/dlgOneVarFitModel.vb | 129 ++++++++++++++++++++++-------------- 1 file changed, 80 insertions(+), 49 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index d8a7c1173ba..cd167ab8e18 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -70,7 +70,7 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddRadioButton(rdoEstimate) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoGeneralCase, "fitdist") - ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialcorrelationTest", "snh.test", "ad.test", "cvm.test", "lillie.test", "pearson.test", "sf.test"}) + ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialCorrelationTest", "snh.test", "ad.test", "cvm.test", "lillie.test", "pearson.test", "sf.test"}) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "quantileCI", "sdCI", "VarCI"}) ucrReceiverVariable.SetParameter(New RParameter("object", 0)) @@ -81,7 +81,7 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.SetText("Convert to Numeric") ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(True, "data", "as.numeric", True) ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", "as.numeric", False) - 'ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) + ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) ucrDistribution = ucrDistributionChoice ucrDistributionChoice.SetGLMDistributions() @@ -124,10 +124,10 @@ Public Class dlgOneVarFitModel ucrInputComboMedianCI.SetDropDownStyleAsNonEditable() ucrInputComboQMethod.SetParameter(New RParameter("method", 3)) - DctQMethod.Add("exact", Chr(34) & "exact" & Chr(34)) - DctQMethod.Add("asymptotic ", Chr(34) & "asymptotic " & Chr(34)) - DctQMethod.Add("boot", Chr(34) & "boot" & Chr(34)) - ucrInputComboQMethod.SetItems(DctQMethod) + dctQMethod.Add("exact", Chr(34) & "exact" & Chr(34)) + dctQMethod.Add("asymptotic ", Chr(34) & "asymptotic " & Chr(34)) + dctQMethod.Add("boot", Chr(34) & "boot" & Chr(34)) + ucrInputComboQMethod.SetItems(dctQMethod) ucrInputComboQMethod.SetDropDownStyleAsNonEditable() ucrInputComboVarianceCI.SetParameter(New RParameter("method", 1)) @@ -228,7 +228,6 @@ Public Class dlgOneVarFitModel ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboTests.AddToLinkedControls(ucrChkOmitMissing, {"runs"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"t", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "snh"}, bNewLinkedHideIfParameterMissing:=True) @@ -388,7 +387,7 @@ Public Class dlgOneVarFitModel clsTtestFunction.AddParameter("mu", "0", iPosition:=1) clsWilcoxonFunction.SetPackageName("stats") - clsWilcoxonFunction.SetRCommand("Wilcox.test") + clsWilcoxonFunction.SetRCommand("wilcox.test") clsWilcoxonFunction.AddParameter("mu", "0", iPosition:=1) @@ -486,33 +485,18 @@ Public Class dlgOneVarFitModel Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("x", 0), iAdditionalPairNo:=2) - 'ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSignTestFunction, New RParameter("x", 0), iAdditionalPairNo:=3) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsTtestFunction, New RParameter("x", 0), iAdditionalPairNo:=4) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsWilcoxonFunction, New RParameter("x", 0), iAdditionalPairNo:=5) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsZTestFunction, New RParameter("x", 0), iAdditionalPairNo:=6) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("x", 0), iAdditionalPairNo:=7) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("x", 0), iAdditionalPairNo:=8) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("x", 0), iAdditionalPairNo:=9) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=10) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=11) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=12) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("x", 0), iAdditionalPairNo:=3) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("x", 0), iAdditionalPairNo:=4) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("x", 0), iAdditionalPairNo:=5) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=6) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=7) + ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=8) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=2) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsSdCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=3) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsNormCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=4) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsQuantileCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=5) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsRunsFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=6) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBartelFunction, New RParameter("x", 0), iAdditionalPairNo:=13) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBrFunction, New RParameter("x", 0), iAdditionalPairNo:=14) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsRunsFunction, New RParameter("x", 0), iAdditionalPairNo:=15) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSenFunction, New RParameter("x", 0), iAdditionalPairNo:=16) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSerialCorrFunction, New RParameter("x", 0), iAdditionalPairNo:=17) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSnhFunction, New RParameter("x", 0), iAdditionalPairNo:=18) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsAdFunction, New RParameter("x", 0), iAdditionalPairNo:=19) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsCvmFunction, New RParameter("x", 0), iAdditionalPairNo:=20) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsLillieFunction, New RParameter("x", 0), iAdditionalPairNo:=21) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsPearsonFunction, New RParameter("x", 0), iAdditionalPairNo:=22) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSfFunction, New RParameter("x", 0), iAdditionalPairNo:=23) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=1) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("conf.level", 1), iAdditionalPairNo:=2) ucrInputComboConfidenceLevel.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("conf.level", 2), iAdditionalPairNo:=3) @@ -664,6 +648,7 @@ Public Class dlgOneVarFitModel SetTestEstimateBaseFunction() SetSaveLabelTextAndPrefix() AddAsNumeric() + EstimatesAsNumeric() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged @@ -688,6 +673,8 @@ Public Class dlgOneVarFitModel Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged PlotResiduals() EnableDisableConvertVariate() + AddAsNumeric() + EstimatesAsNumeric() If Not ucrReceiverVariable.IsEmpty Then ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) If ucrChkConvertVariate.Checked Then @@ -700,7 +687,6 @@ Public Class dlgOneVarFitModel Else clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If - AddAsNumeric() End If End Sub @@ -713,9 +699,6 @@ Public Class dlgOneVarFitModel If ucrInputComboTests.GetText() = "t" Then clsTtestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If - If ucrInputComboTests.GetText() = "Wicoxon" Then - clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If If ucrInputComboTests.GetText() = "Z" Then clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If @@ -757,50 +740,95 @@ Public Class dlgOneVarFitModel End If Else If ucrInputComboTests.GetText() = "sign" Then - clsSignTestFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "t" Then - clsTtestFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsTtestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If - If ucrInputComboTests.GetText() = "Wicoxon" Then - clsWilcoxonFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + If ucrInputComboTests.GetText() = "Wilcoxon" Then + clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Z" Then - clsZTestFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsZTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Bartel" Then - clsBartelFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsBartelFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "runs" Then - clsRunsFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsRunsFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "br" Then - clsBrFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Sen" Then - clsSenFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "serial corr" Then - clsSerialCorrFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "snh" Then - clsSnhFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsSnhFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "cvm" Then - clsCvmFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsCvmFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "lillie" Then - clsLillieFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsLillieFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "pearson" Then - clsPearsonFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "sf" Then - clsSfFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsSfFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "ad" Then - clsAdFunction.AddParameter("x", ucrReceiverVariable.GetVariableNames(), iPosition:=0) + clsAdFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + End If + End If + End If + End Sub + + Private Sub EstimatesAsNumeric() + If rdoEstimate.Checked Then + If ucrChkConvertVariate.Checked Then + If ucrInputComboEstimate.GetText() = "mean" Then + clsMeanCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "median" Then + clsMedianCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "normal" Then + clsNormCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "quantile" Then + clsQuantileCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "sd" Then + clsSdCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "variance" Then + clsVarCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End If + Else + If ucrInputComboEstimate.GetText() = "mean" Then + clsMeanCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "median" Then + clsMedianCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "normal" Then + clsNormCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If + If ucrInputComboEstimate.GetText() = "quantile" Then + clsQuantileCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "sd" Then + clsSdCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + End If + If ucrInputComboEstimate.GetText() = "variance" Then + clsVarCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + + End If End If End If End Sub @@ -839,6 +867,8 @@ Public Class dlgOneVarFitModel Case "ad" ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" + ucrBase.clsRsyntax.SetBaseRFunction(clsCvmFunction) + Case "lillie" ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) @@ -870,6 +900,7 @@ Public Class dlgOneVarFitModel SetTestEstimateBaseFunction() ucrSaveModel.Reset() AddAsNumeric() + EstimatesAsNumeric() End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged From aa5ea0cbb2b17441954625ce32688f0b2fadc496 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 7 Sep 2020 14:48:38 +0300 Subject: [PATCH 157/172] setting tooltips for the tests --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index cd167ab8e18..10176c14c52 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -703,12 +703,14 @@ Public Class dlgOneVarFitModel clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "Bartel" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "Wilcoxon" Then clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "br" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "runs" Then From 6f5b145770f86938ea62bdd1cd40ea90b9837db8 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 7 Sep 2020 14:53:00 +0300 Subject: [PATCH 158/172] Setting tooltips for the tests --- instat/dlgOneVarFitModel.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 10176c14c52..6297afd8d7c 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -723,6 +723,7 @@ Public Class dlgOneVarFitModel clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "snh" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "cvm" Then @@ -763,6 +764,7 @@ Public Class dlgOneVarFitModel clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Sen" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "serial corr" Then From a3be9241d6748278246e3541d503c709fde84758 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 7 Sep 2020 15:51:44 +0300 Subject: [PATCH 159/172] Setting tooltips --- instat/dlgOneVarFitModel.vb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 6297afd8d7c..003a5509172 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -485,12 +485,6 @@ Public Class dlgOneVarFitModel Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsBionomialFunction, New RParameter("x", 0), iAdditionalPairNo:=1) ucrReceiverVariable.AddAdditionalCodeParameterPair(clsProportionFunction, New RParameter("x", 0), iAdditionalPairNo:=2) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMeanCIFunction, New RParameter("x", 0), iAdditionalPairNo:=3) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsMedianCIFunction, New RParameter("x", 0), iAdditionalPairNo:=4) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsNormCIFunction, New RParameter("x", 0), iAdditionalPairNo:=5) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsQuantileCIFunction, New RParameter("x", 0), iAdditionalPairNo:=6) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsSdCIFunction, New RParameter("x", 0), iAdditionalPairNo:=7) - ucrReceiverVariable.AddAdditionalCodeParameterPair(clsVarCIFunction, New RParameter("x", 0), iAdditionalPairNo:=8) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsMedianCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=1) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsVarCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=2) ucrChkOmitMissing.AddAdditionalCodeParameterPair(clsSdCIFunction, ucrChkOmitMissing.GetParameter(), iAdditionalPairNo:=3) @@ -703,14 +697,12 @@ Public Class dlgOneVarFitModel clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "Bartel" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "Wilcoxon" Then clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "br" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "runs" Then @@ -723,7 +715,6 @@ Public Class dlgOneVarFitModel clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "snh" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) End If If ucrInputComboTests.GetText() = "cvm" Then @@ -764,7 +755,6 @@ Public Class dlgOneVarFitModel clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Sen" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "serial corr" Then @@ -857,26 +847,35 @@ Public Class dlgOneVarFitModel Case "Z" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) Case "br" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) Case "runs" ucrBase.clsRsyntax.SetBaseRFunction(clsRunsFunction) Case "Sen" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "snh" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "ad" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Anderson-Darling test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Cramer-von Mises test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsCvmFunction) Case "lillie" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Lilliefors (Kolmogorov-Smirnov) test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Pearson chi-square test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "sf" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Shapiro-Francia test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) End Select From afb693cfbffb86047e5290ccea33895d480d27ad Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 8 Sep 2020 16:17:54 +0300 Subject: [PATCH 160/172] Added aseparator --- instat/dlgOneVarFitModel.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 003a5509172..7d83b971309 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -93,7 +93,7 @@ Public Class dlgOneVarFitModel ucrSaveModel.SetIsComboBox() ucrSaveModel.SetAssignToIfUncheckedValue("last_model") - ucrInputComboTests.SetItems({"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "Bartel", "br", "runs", "Sen", "serial corr", "snh", "ad", "cvm", "lillie", "pearson", "sf"}) + ucrInputComboTests.SetItems({"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "---------------------", "Bartel", "br", "runs", "Sen", "serial corr", "snh", "---------------------", "ad", "cvm", "lillie", "pearson", "sf"}) ucrInputComboTests.SetDropDownStyleAsNonEditable() ucrInputComboEstimate.SetItems({"mean", "median", "normal", "quantile", "sd", "variance"}) @@ -904,6 +904,9 @@ Public Class dlgOneVarFitModel ucrSaveModel.Reset() AddAsNumeric() EstimatesAsNumeric() + If ucrInputComboTests.GetText = "---------------------" Then + ucrInputComboTests.cboInput.SelectedIndex = 0 + End If End Sub Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged From f06b61c9ffb887e758c6c1591eebbe94ea33ac8f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 9 Sep 2020 11:06:53 +0300 Subject: [PATCH 161/172] Serial correlation test implementation --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 7d83b971309..e49cb1576e3 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -758,7 +758,7 @@ Public Class dlgOneVarFitModel clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "serial corr" Then - clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If If ucrInputComboTests.GetText() = "snh" Then clsSnhFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) From 4a5f23992352114f469ffc40653c1c2d4f20ade7 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 9 Sep 2020 12:58:19 +0300 Subject: [PATCH 162/172] Setting tool tips for the tests --- instat/dlgOneVarFitModel.vb | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index e49cb1576e3..d9b52e898b4 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -746,36 +746,45 @@ Public Class dlgOneVarFitModel clsZTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Bartel" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") clsBartelFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "runs" Then clsRunsFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "br" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "Sen" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "serial corr" Then clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If If ucrInputComboTests.GetText() = "snh" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") clsSnhFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "cvm" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Cramer-von Mises test for normality") clsCvmFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "lillie" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Lilliefors (Kolmogorov-Smirnov) test for normality") clsLillieFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "pearson" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Pearson chi-square test for normality") clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "sf" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Shapiro-Francia test for normality") clsSfFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If If ucrInputComboTests.GetText() = "ad" Then + tttests.SetToolTip(ucrInputComboTests.cboInput, "Anderson-Darling test for normality") clsAdFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) End If End If @@ -847,35 +856,26 @@ Public Class dlgOneVarFitModel Case "Z" ucrBase.clsRsyntax.SetBaseRFunction(clsZTestFunction) Case "Bartel" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") ucrBase.clsRsyntax.SetBaseRFunction(clsBartelFunction) Case "br" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") ucrBase.clsRsyntax.SetBaseRFunction(clsBrFunction) Case "runs" ucrBase.clsRsyntax.SetBaseRFunction(clsRunsFunction) Case "Sen" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") ucrBase.clsRsyntax.SetBaseRFunction(clsSenFunction) Case "serial corr" ucrBase.clsRsyntax.SetBaseRFunction(clsSerialCorrFunction) Case "snh" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") ucrBase.clsRsyntax.SetBaseRFunction(clsSnhFunction) Case "ad" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Anderson-Darling test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsAdFunction) Case "cvm" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Cramer-von Mises test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsCvmFunction) Case "lillie" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Lilliefors (Kolmogorov-Smirnov) test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsLillieFunction) Case "pearson" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Pearson chi-square test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsPearsonFunction) Case "sf" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Shapiro-Francia test for normality") ucrBase.clsRsyntax.SetBaseRFunction(clsSfFunction) End Select @@ -898,8 +898,14 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + Private Sub tooltip() + If ucrInputComboTests.GetText() = "binomial" Then + tttests.RemoveAll() + End If + End Sub + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged + tooltip() SetTestEstimateBaseFunction() ucrSaveModel.Reset() AddAsNumeric() From 24df0640db1a2ceaa2fc7f9efaf9473d2e06c07e Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 10 Sep 2020 11:50:39 +0300 Subject: [PATCH 163/172] Added default state for the sd_Pop control --- instat/dlgOneVarFitModel.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index d9b52e898b4..6d083f3297e 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -186,6 +186,7 @@ Public Class dlgOneVarFitModel ucrInputTxtSd.SetParameter(New RParameter("sd_pop", 2)) ucrInputTxtSd.SetValidationTypeAsNumeric(dcmMin:=0, bIncludeMin:=False) + ucrInputTxtSd.SetDefaultState(1) ucrInputTxtSd.AddQuotesIfUnrecognised = False From 0563001cf8e889d83f4b635b2ab4767ed27c533e Mon Sep 17 00:00:00 2001 From: ivanluv Date: Thu, 1 Oct 2020 11:28:45 +0300 Subject: [PATCH 164/172] MInor code changes --- instat/dlgOneVarFitModel.vb | 256 ++++++++++++++---------------------- 1 file changed, 102 insertions(+), 154 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 6d083f3297e..5ea450f4587 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -19,15 +19,6 @@ Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRunsFunction, clsSenFunction, clsSerialCorrFunction, clsSnhFunction, clsAdFunction, clsCvmFunction, clsLillieFunction, clsPearsonFunction, clsSfFunction As New RFunction - - Private Sub ToolTip2_Popup(sender As Object, e As PopupEventArgs) - - End Sub - - Private Sub ToolTip1_Popup(sender As Object, e As PopupEventArgs) Handles tttests.Popup - - End Sub - Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True @@ -81,7 +72,6 @@ Public Class dlgOneVarFitModel ucrChkConvertVariate.SetText("Convert to Numeric") ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(True, "data", "as.numeric", True) ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", "as.numeric", False) - ucrChkConvertVariate.AddParameterValueFunctionNamesCondition(False, "data", frmMain.clsRLink.strInstatDataObject & "$get_columns_from_data", True) ucrDistribution = ucrDistributionChoice ucrDistributionChoice.SetGLMDistributions() @@ -268,8 +258,6 @@ Public Class dlgOneVarFitModel clsRLogLikFunction = New RFunction ucrDistribution = New ucrDistributions - ucrChkOmitMissing.Checked = True - clsRfitdist = New RFunction clsRConvertVector = New RFunction @@ -688,106 +676,81 @@ Public Class dlgOneVarFitModel Private Sub AddAsNumeric() If rdoTest.Checked Then If ucrChkConvertVariate.Checked Then - If ucrInputComboTests.GetText() = "sign" Then - clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "t" Then - clsTtestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Z" Then - clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Bartel" Then - clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Wilcoxon" Then - clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "br" Then - clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "runs" Then - clsRunsFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Sen" Then - clsSenFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "serial corr" Then - clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "snh" Then - clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "cvm" Then - clsCvmFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "lillie" Then - clsLillieFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "pearson" Then - clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "sf" Then - clsSfFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "ad" Then - clsAdFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If + Select Case ucrInputComboTests.GetText() + Case "sign" + clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "t" + clsTtestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "Z" + clsZTestFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "Bartel" + clsBartelFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "Wilcoxon" + clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "br" + clsBrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "runs" + clsRunsFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "Sen" + clsSenFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "serial corr" + clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "snh" + clsSnhFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "cvm" + clsCvmFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "lillie" + clsLillieFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "pearson" + clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "sf" + clsSfFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "ad" + clsAdFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End Select Else - If ucrInputComboTests.GetText() = "sign" Then - clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "t" Then - clsTtestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Wilcoxon" Then - clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Z" Then - clsZTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Bartel" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") - clsBartelFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "runs" Then - clsRunsFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "br" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") - clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "Sen" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") - clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "serial corr" Then - clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "snh" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") - clsSnhFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "cvm" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Cramer-von Mises test for normality") - clsCvmFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "lillie" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Lilliefors (Kolmogorov-Smirnov) test for normality") - clsLillieFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "pearson" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Pearson chi-square test for normality") - clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "sf" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Shapiro-Francia test for normality") - clsSfFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboTests.GetText() = "ad" Then - tttests.SetToolTip(ucrInputComboTests.cboInput, "Anderson-Darling test for normality") - clsAdFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If + Select Case ucrInputComboTests.GetText() + Case "sign" + clsSignTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "t" + clsTtestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "Wilcoxon" + clsWilcoxonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "Z" + clsZTestFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "Bartel" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Bartels Rank Test of Randomness") + clsBartelFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "runs" + clsRunsFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "br" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") + clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "Sen" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") + clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "serial corr" + clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + + Case "snh" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Standard Normal Homogeinity Test (SNHT) for Change-Point Detection") + clsSnhFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "cvm" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Cramer-von Mises test for normality") + clsCvmFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "lillie" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Lilliefors (Kolmogorov-Smirnov) test for normality") + clsLillieFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "pearson" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Pearson chi-square test for normality") + clsPearsonFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "sf" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Shapiro-Francia test for normality") + clsSfFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "ad" + tttests.SetToolTip(ucrInputComboTests.cboInput, "Anderson-Darling test for normality") + clsAdFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + End Select End If End If End Sub @@ -795,46 +758,37 @@ Public Class dlgOneVarFitModel Private Sub EstimatesAsNumeric() If rdoEstimate.Checked Then If ucrChkConvertVariate.Checked Then - If ucrInputComboEstimate.GetText() = "mean" Then - clsMeanCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "median" Then - clsMedianCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "normal" Then - clsNormCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "quantile" Then - clsQuantileCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "sd" Then - clsSdCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "variance" Then - clsVarCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) - End If + Select Case ucrInputComboEstimate.GetText() + Case "mean" + clsMeanCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "median" + clsMedianCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "normal" + clsNormCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "quantile" + clsQuantileCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "sd" + clsSdCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + Case "variance" + clsVarCIFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertNumeric, iPosition:=0) + End Select Else - If ucrInputComboEstimate.GetText() = "mean" Then - clsMeanCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "median" Then - clsMedianCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "normal" Then - clsNormCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "quantile" Then + Select Case ucrInputComboEstimate.GetText() + Case "mean" + clsMeanCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "median" + clsMedianCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "normal" + clsNormCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "quantile" clsQuantileCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "sd" Then - clsSdCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - End If - If ucrInputComboEstimate.GetText() = "variance" Then + Case "sd" + clsSdCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) + Case "variance" clsVarCIFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) - - End If - End If + End Select End If + End If End Sub Private Sub SetTestEstimateBaseFunction() @@ -899,14 +853,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub tooltip() - If ucrInputComboTests.GetText() = "binomial" Then - tttests.RemoveAll() - End If - End Sub - Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged - tooltip() SetTestEstimateBaseFunction() ucrSaveModel.Reset() AddAsNumeric() @@ -919,4 +866,5 @@ Public Class dlgOneVarFitModel Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged TestOKEnabled() End Sub + End Class From edecd0650f2ea22e562b8e3228d1716386fa8b12 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Thu, 22 Oct 2020 17:20:42 +0300 Subject: [PATCH 165/172] Adding the success parameter for the binomial and propotion tests --- instat/dlgOneVarFitModel.resx | 6 +- instat/dlgOneVarFitModel.vb | 49 ++++++++++++-- instat/dlgOneVarFitModel2.Designer.vb | 98 +++++++++++++++++---------- 3 files changed, 109 insertions(+), 44 deletions(-) diff --git a/instat/dlgOneVarFitModel.resx b/instat/dlgOneVarFitModel.resx index 8b800e5c309..fea34cc3eeb 100644 --- a/instat/dlgOneVarFitModel.resx +++ b/instat/dlgOneVarFitModel.resx @@ -117,10 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 29 - 17, 17 + + 29 + \ No newline at end of file diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 5ea450f4587..a500ec75af8 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -14,12 +14,15 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . +Imports instat Imports instat.Translations +Imports RDotNet Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRunsFunction, clsSenFunction, clsSerialCorrFunction, clsSnhFunction, clsAdFunction, clsCvmFunction, clsLillieFunction, clsPearsonFunction, clsSfFunction As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction + Private clsGetFactorLevel As New RFunction Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True Private bReset As Boolean = True @@ -64,6 +67,9 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoTest, {"binom.test", "prop.test", "SignTest", "t.test", "wilcox.test", "ZTest", "BartelsRankTest", "br.test", "RunsTest", "sens.slope", "serialCorrelationTest", "snh.test", "ad.test", "cvm.test", "lillie.test", "pearson.test", "sf.test"}) ucrPnlGeneralExactCase.AddFunctionNamesCondition(rdoEstimate, {"MeanCI", "MedianCI ", "normCI", "quantileCI", "sdCI", "VarCI"}) + ucrSelectorOneVarFitMod.SetParameter(New RParameter("data_name", 0)) + ucrSelectorOneVarFitMod.SetParameterIsString() + ucrReceiverVariable.SetParameter(New RParameter("object", 0)) ucrReceiverVariable.Selector = ucrSelectorOneVarFitMod ucrReceiverVariable.SetParameterIsRFunction() @@ -179,7 +185,6 @@ Public Class dlgOneVarFitModel ucrInputTxtSd.SetDefaultState(1) ucrInputTxtSd.AddQuotesIfUnrecognised = False - ucrInputComboConfidenceLevel.SetParameter(New RParameter("conf.level", 2)) dctConfidence.Add("0.900", "0.90") dctConfidence.Add("0.950", "0.95") @@ -191,7 +196,6 @@ Public Class dlgOneVarFitModel ucrInputComboConfidenceLevel.SetValidationTypeAsNumeric(dcmMin:=0.0, bIncludeMin:=True, dcmMax:=1.0, bIncludeMax:=True) ucrInputComboConfidenceLevel.bAllowNonConditionValues = True - ucrInputConfidenceInterval.SetParameter(New RParameter("conf.level", 2)) dctConfidenceInterval.Add("0.900", "0.90") dctConfidenceInterval.Add("0.950", "0.95") @@ -208,21 +212,24 @@ Public Class dlgOneVarFitModel ucrPnlGeneralExactCase.AddToLinkedControls(ucrInputComboEstimate, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Mean") ucrPnlGeneralExactCase.AddToLinkedControls(ucrDistributionChoice, {rdoGeneralCase}, bNewLinkedHideIfParameterMissing:=True) ucrPnlGeneralExactCase.AddToLinkedControls(ucrChkOmitMissing, {rdoEstimate}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboConfidenceLevel, {"mean", "median", "normal", "quantile", "sd", "variance"}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputMeanCIMethod, {"mean"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboMedianCI, {"median"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboVarianceCI, {"variance"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQuantilCI, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.AddToLinkedControls(ucrInputCIMethods, {"binomial"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputComboMethod, {"Bartel"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputConfidenceInterval, {"binomial", "proportion", "sign", "t", "Wilcoxon", "Z", "serial corr", "Sen"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNullHypothesis, {"binomial", "proportion"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtSd, {"Z"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrNudQuantile, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTxtHypothesis, {"sign", "Wilcoxon"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputNulHypothesis, {"t", "Z"}, bNewLinkedHideIfParameterMissing:=True) ucrInputComboTests.AddToLinkedControls(ucrInputTextM, {"br", "snh"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputComboEstimate.AddToLinkedControls(ucrInputComboQMethod, {"quantile"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputComboTests.SetLinkedDisplayControl(lblTests) ucrInputComboEstimate.SetLinkedDisplayControl(lblEstimate) ucrInputNullHypothesis.SetLinkedDisplayControl(lblNullHypothesis) @@ -240,6 +247,7 @@ Public Class dlgOneVarFitModel ucrInputTextM.SetLinkedDisplayControl(lblMonteCarlo) ucrInputComboQMethod.SetLinkedDisplayControl(lblQMethod) ucrInputConfidenceInterval.SetLinkedDisplayControl(lblConfidenceLevel) + ucrInputSuccess.SetLinkedDisplayControl(lblSuccess) lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) @@ -289,11 +297,15 @@ Public Class dlgOneVarFitModel clsSdCIFunction = New RFunction clsVarCIFunction = New RFunction + clsGetFactorLevel = New RFunction + ucrSelectorOneVarFitMod.Reset() ucrSaveModel.Reset() ucrChkConvertVariate.Visible = False 'hide convert to numeric checkbox by default + clsGetFactorLevel.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_factor_levels") + 'General Case clsROneVarFitModel.SetPackageName("fitdistrplus") clsROneVarFitModel.SetRCommand("fitdist") @@ -543,6 +555,7 @@ Public Class dlgOneVarFitModel ucrInputComboQMethod.SetRCode(clsQuantileCIFunction, bReset) ucrInputNulHypothesis.SetRCode(clsTtestFunction, bReset) ucrInputTextM.SetRCode(clsBrFunction) + ucrSelectorOneVarFitMod.SetRCode(clsGetFactorLevel, bReset) ucrSaveModel.SetRCode(clsROneVarFitModel, bReset) @@ -632,6 +645,7 @@ Public Class dlgOneVarFitModel SetSaveLabelTextAndPrefix() AddAsNumeric() EstimatesAsNumeric() + AddFactorLevels() End Sub Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged @@ -658,6 +672,7 @@ Public Class dlgOneVarFitModel EnableDisableConvertVariate() AddAsNumeric() EstimatesAsNumeric() + AddFactorLevels() If Not ucrReceiverVariable.IsEmpty Then ucrDistributionChoice.RecieverDatatype(ucrSelectorOneVarFitMod.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverVariable.GetVariableNames(bWithQuotes:=False)) If ucrChkConvertVariate.Checked Then @@ -853,11 +868,31 @@ Public Class dlgOneVarFitModel End If End Sub + Private Sub AddFactorLevels() + Dim chrCurrentFactorLevels As CharacterVector + Dim lstFactor As List(Of String) = New List(Of String)() + If Not ucrReceiverVariable.IsEmpty AndAlso rdoTest.Checked AndAlso (ucrReceiverVariable.strCurrDataType.ToLower = "logical" Or ucrReceiverVariable.strCurrDataType.ToLower = "factor") AndAlso (ucrInputComboTests.GetText() = "binomial" Or ucrInputComboTests.GetText() = "proportion") Then + clsGetFactorLevel.AddParameter("col_name", ucrReceiverVariable.GetVariableNames(), iPosition:=1) + chrCurrentFactorLevels = frmMain.clsRLink.RunInternalScriptGetValue(clsGetFactorLevel.ToScript()).AsCharacter + For Each factor In chrCurrentFactorLevels + lstFactor.Add(Chr(34) & factor & Chr(34)) + Next + ucrInputSuccess.SetItems(lstFactor.ToArray) + ucrInputSuccess.SetText(lstFactor(0)) + ucrInputSuccess.Visible = True + Else + ucrInputSuccess.Visible = False + clsBionomialFunction.RemoveParameterByName("success") + clsProportionFunction.RemoveParameterByName("success") + End If + End Sub + Private Sub ucrInputTests_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputComboTests.ControlValueChanged, ucrInputComboEstimate.ControlValueChanged SetTestEstimateBaseFunction() ucrSaveModel.Reset() AddAsNumeric() EstimatesAsNumeric() + AddFactorLevels() If ucrInputComboTests.GetText = "---------------------" Then ucrInputComboTests.cboInput.SelectedIndex = 0 End If @@ -867,4 +902,10 @@ Public Class dlgOneVarFitModel TestOKEnabled() End Sub + Private Sub ucrInputSuccess_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSuccess.ControlValueChanged + If ucrInputSuccess.Visible Then + clsBionomialFunction.AddParameter("success", ucrInputSuccess.GetText(), iPosition:=4) + clsProportionFunction.AddParameter("success", ucrInputSuccess.GetText(), iPosition:=4) + End If + End Sub End Class diff --git a/instat/dlgOneVarFitModel2.Designer.vb b/instat/dlgOneVarFitModel2.Designer.vb index f2124887fb4..53028c5f625 100644 --- a/instat/dlgOneVarFitModel2.Designer.vb +++ b/instat/dlgOneVarFitModel2.Designer.vb @@ -61,6 +61,11 @@ Partial Class dlgOneVarFitModel Me.lblNulHypothesis = New System.Windows.Forms.Label() Me.lblMonteCarlo = New System.Windows.Forms.Label() Me.lblQMethod = New System.Windows.Forms.Label() + Me.lblConfidenceLevel = New System.Windows.Forms.Label() + Me.tttests = New System.Windows.Forms.ToolTip(Me.components) + Me.lblSuccess = New System.Windows.Forms.Label() + Me.ucrInputSuccess = New instat.ucrInputComboBox() + Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() Me.ucrInputComboQMethod = New instat.ucrInputComboBox() Me.ucrInputTextM = New instat.ucrInputTextBox() Me.ucrInputNulHypothesis = New instat.ucrInputTextBox() @@ -85,9 +90,6 @@ Partial Class dlgOneVarFitModel Me.ucrReceiverVariable = New instat.ucrReceiverSingle() Me.ucrSelectorOneVarFitMod = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputConfidenceInterval = New instat.ucrInputComboBox() - Me.lblConfidenceLevel = New System.Windows.Forms.Label() - Me.tttests = New System.Windows.Forms.ToolTip(Me.components) Me.SuspendLayout() ' 'LblVariable @@ -311,6 +313,47 @@ Partial Class dlgOneVarFitModel Me.lblQMethod.TabIndex = 84 Me.lblQMethod.Text = "Q. Method:" ' + 'lblConfidenceLevel + ' + Me.lblConfidenceLevel.AutoSize = True + Me.lblConfidenceLevel.Location = New System.Drawing.Point(248, 143) + Me.lblConfidenceLevel.Name = "lblConfidenceLevel" + Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) + Me.lblConfidenceLevel.TabIndex = 86 + Me.lblConfidenceLevel.Text = "Confidence Level:" + ' + 'lblSuccess + ' + Me.lblSuccess.AutoSize = True + Me.lblSuccess.Location = New System.Drawing.Point(251, 227) + Me.lblSuccess.Name = "lblSuccess" + Me.lblSuccess.Size = New System.Drawing.Size(51, 13) + Me.lblSuccess.TabIndex = 87 + Me.lblSuccess.Text = "Success:" + ' + 'ucrInputSuccess + ' + Me.ucrInputSuccess.AddQuotesIfUnrecognised = True + Me.ucrInputSuccess.GetSetSelectedIndex = -1 + Me.ucrInputSuccess.IsReadOnly = False + Me.ucrInputSuccess.Location = New System.Drawing.Point(350, 225) + Me.ucrInputSuccess.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputSuccess.Name = "ucrInputSuccess" + Me.ucrInputSuccess.Size = New System.Drawing.Size(71, 21) + Me.ucrInputSuccess.TabIndex = 88 + Me.ucrInputSuccess.Visible = False + ' + 'ucrInputConfidenceInterval + ' + Me.ucrInputConfidenceInterval.AddQuotesIfUnrecognised = True + Me.ucrInputConfidenceInterval.GetSetSelectedIndex = -1 + Me.ucrInputConfidenceInterval.IsReadOnly = False + Me.ucrInputConfidenceInterval.Location = New System.Drawing.Point(349, 140) + Me.ucrInputConfidenceInterval.Margin = New System.Windows.Forms.Padding(5) + Me.ucrInputConfidenceInterval.Name = "ucrInputConfidenceInterval" + Me.ucrInputConfidenceInterval.Size = New System.Drawing.Size(71, 21) + Me.ucrInputConfidenceInterval.TabIndex = 85 + ' 'ucrInputComboQMethod ' Me.ucrInputComboQMethod.AddQuotesIfUnrecognised = True @@ -319,7 +362,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboQMethod.Location = New System.Drawing.Point(350, 225) Me.ucrInputComboQMethod.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboQMethod.Name = "ucrInputComboQMethod" - Me.ucrInputComboQMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboQMethod.Size = New System.Drawing.Size(71, 21) Me.ucrInputComboQMethod.TabIndex = 83 ' 'ucrInputTextM @@ -329,7 +372,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputTextM.IsReadOnly = False Me.ucrInputTextM.Location = New System.Drawing.Point(350, 166) Me.ucrInputTextM.Name = "ucrInputTextM" - Me.ucrInputTextM.Size = New System.Drawing.Size(61, 21) + Me.ucrInputTextM.Size = New System.Drawing.Size(71, 21) Me.ucrInputTextM.TabIndex = 81 ' 'ucrInputNulHypothesis @@ -360,7 +403,7 @@ Partial Class dlgOneVarFitModel Me.ucrNudQuantile.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudQuantile.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudQuantile.Name = "ucrNudQuantile" - Me.ucrNudQuantile.Size = New System.Drawing.Size(60, 21) + Me.ucrNudQuantile.Size = New System.Drawing.Size(71, 21) Me.ucrNudQuantile.TabIndex = 75 Me.ucrNudQuantile.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -372,7 +415,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboConfidenceLevel.Location = New System.Drawing.Point(351, 140) Me.ucrInputComboConfidenceLevel.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboConfidenceLevel.Name = "ucrInputComboConfidenceLevel" - Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboConfidenceLevel.Size = New System.Drawing.Size(71, 21) Me.ucrInputComboConfidenceLevel.TabIndex = 73 ' 'ucrInputTxtSd @@ -393,7 +436,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboQuantilCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboQuantilCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboQuantilCI.Name = "ucrInputComboQuantilCI" - Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(61, 21) + Me.ucrInputComboQuantilCI.Size = New System.Drawing.Size(71, 21) Me.ucrInputComboQuantilCI.TabIndex = 67 ' 'ucrInputComboMedianCI @@ -404,7 +447,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboMedianCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboMedianCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboMedianCI.Name = "ucrInputComboMedianCI" - Me.ucrInputComboMedianCI.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboMedianCI.Size = New System.Drawing.Size(71, 21) Me.ucrInputComboMedianCI.TabIndex = 66 ' 'ucrInputComboVarianceCI @@ -415,7 +458,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboVarianceCI.Location = New System.Drawing.Point(350, 166) Me.ucrInputComboVarianceCI.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputComboVarianceCI.Name = "ucrInputComboVarianceCI" - Me.ucrInputComboVarianceCI.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboVarianceCI.Size = New System.Drawing.Size(71, 21) Me.ucrInputComboVarianceCI.TabIndex = 65 ' 'ucrInputComboMethod @@ -425,7 +468,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputComboMethod.IsReadOnly = False Me.ucrInputComboMethod.Location = New System.Drawing.Point(350, 195) Me.ucrInputComboMethod.Name = "ucrInputComboMethod" - Me.ucrInputComboMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputComboMethod.Size = New System.Drawing.Size(71, 21) Me.ucrInputComboMethod.TabIndex = 63 ' 'ucrInputCIMethods @@ -435,7 +478,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputCIMethods.IsReadOnly = False Me.ucrInputCIMethods.Location = New System.Drawing.Point(350, 195) Me.ucrInputCIMethods.Name = "ucrInputCIMethods" - Me.ucrInputCIMethods.Size = New System.Drawing.Size(60, 21) + Me.ucrInputCIMethods.Size = New System.Drawing.Size(71, 21) Me.ucrInputCIMethods.TabIndex = 61 ' 'ucrInputMeanCIMethod @@ -446,7 +489,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputMeanCIMethod.Location = New System.Drawing.Point(350, 166) Me.ucrInputMeanCIMethod.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputMeanCIMethod.Name = "ucrInputMeanCIMethod" - Me.ucrInputMeanCIMethod.Size = New System.Drawing.Size(60, 21) + Me.ucrInputMeanCIMethod.Size = New System.Drawing.Size(71, 21) Me.ucrInputMeanCIMethod.TabIndex = 53 ' 'ucrInputNullHypothesis @@ -457,7 +500,7 @@ Partial Class dlgOneVarFitModel Me.ucrInputNullHypothesis.Location = New System.Drawing.Point(351, 166) Me.ucrInputNullHypothesis.Margin = New System.Windows.Forms.Padding(5) Me.ucrInputNullHypothesis.Name = "ucrInputNullHypothesis" - Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(58, 21) + Me.ucrInputNullHypothesis.Size = New System.Drawing.Size(71, 21) Me.ucrInputNullHypothesis.TabIndex = 60 ' 'ucrInputComboEstimate @@ -555,34 +598,13 @@ Partial Class dlgOneVarFitModel Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' - 'ucrInputConfidenceInterval - ' - Me.ucrInputConfidenceInterval.AddQuotesIfUnrecognised = True - Me.ucrInputConfidenceInterval.GetSetSelectedIndex = -1 - Me.ucrInputConfidenceInterval.IsReadOnly = False - Me.ucrInputConfidenceInterval.Location = New System.Drawing.Point(351, 140) - Me.ucrInputConfidenceInterval.Margin = New System.Windows.Forms.Padding(5) - Me.ucrInputConfidenceInterval.Name = "ucrInputConfidenceInterval" - Me.ucrInputConfidenceInterval.Size = New System.Drawing.Size(60, 21) - Me.ucrInputConfidenceInterval.TabIndex = 85 - ' - 'lblConfidenceLevel - ' - Me.lblConfidenceLevel.AutoSize = True - Me.lblConfidenceLevel.Location = New System.Drawing.Point(248, 143) - Me.lblConfidenceLevel.Name = "lblConfidenceLevel" - Me.lblConfidenceLevel.Size = New System.Drawing.Size(93, 13) - Me.lblConfidenceLevel.TabIndex = 86 - Me.lblConfidenceLevel.Text = "Confidence Level:" - ' - 'tttests - ' - ' 'dlgOneVarFitModel ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(428, 420) + Me.Controls.Add(Me.ucrInputSuccess) + Me.Controls.Add(Me.lblSuccess) Me.Controls.Add(Me.lblConfidenceLevel) Me.Controls.Add(Me.ucrInputConfidenceInterval) Me.Controls.Add(Me.lblQMethod) @@ -692,4 +714,6 @@ Partial Class dlgOneVarFitModel Friend WithEvents lblConfidenceLevel As Label Friend WithEvents ucrInputConfidenceInterval As ucrInputComboBox Friend WithEvents tttests As ToolTip + Friend WithEvents ucrInputSuccess As ucrInputComboBox + Friend WithEvents lblSuccess As Label End Class \ No newline at end of file From a0409e4e01f43236f415fa7e51748151ca268f7e Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 26 Oct 2020 12:28:34 +0300 Subject: [PATCH 166/172] Adding comments to functions --- instat/dlgOneVarFitModel.vb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index a500ec75af8..14eaa76b820 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -688,6 +688,10 @@ Public Class dlgOneVarFitModel End If End Sub + ''' + '''Converts the selected factor column for Test,in the variable receiver,to numeric + ''' + Private Sub AddAsNumeric() If rdoTest.Checked Then If ucrChkConvertVariate.Checked Then @@ -770,6 +774,10 @@ Public Class dlgOneVarFitModel End If End Sub + ''' + '''Converts the selected factor column for estimates,in the variable receiver,to numeric + ''' + Private Sub EstimatesAsNumeric() If rdoEstimate.Checked Then If ucrChkConvertVariate.Checked Then @@ -806,6 +814,9 @@ Public Class dlgOneVarFitModel End If End Sub + ''' + '''Sets the base RFunction depending on the selected Estimate function or the Test function + ''' Private Sub SetTestEstimateBaseFunction() If rdoGeneralCase.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) @@ -868,6 +879,10 @@ Public Class dlgOneVarFitModel End If End Sub + ''' + '''Lists the factor levels of the selected factor or logical column into the success combobox + ''' + Private Sub AddFactorLevels() Dim chrCurrentFactorLevels As CharacterVector Dim lstFactor As List(Of String) = New List(Of String)() From e0354f4af43b84956963ff772e7fd302db9c333c Mon Sep 17 00:00:00 2001 From: ivanluv Date: Tue, 17 Nov 2020 11:41:19 +0300 Subject: [PATCH 167/172] Remembering the level used for success --- instat/dlgOneVarFitModel.vb | 41 ++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 14eaa76b820..f60f4bb881c 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -28,9 +28,11 @@ Public Class dlgOneVarFitModel Private bReset As Boolean = True Private bResetFittingOptions As Boolean = False Private bResetFitModDisplay As Boolean = False + Private bRCodeSet As Boolean = True Private Sub dlgOneVarFitModel_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) + bRCodeSet = False If bFirstload Then InitialiseDialog() bFirstload = False @@ -39,6 +41,7 @@ Public Class dlgOneVarFitModel SetDefaults() End If SetRCodeForControls(bReset) + bRCodeSet = True bReset = False TestOKEnabled() End Sub @@ -569,9 +572,11 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + bRCodeSet = False SetDefaults() - SetRCodeForControls(True) + SetRCodeForControls(True) + bRCodeSet = True TestOKEnabled() End Sub @@ -884,21 +889,23 @@ Public Class dlgOneVarFitModel ''' Private Sub AddFactorLevels() - Dim chrCurrentFactorLevels As CharacterVector - Dim lstFactor As List(Of String) = New List(Of String)() - If Not ucrReceiverVariable.IsEmpty AndAlso rdoTest.Checked AndAlso (ucrReceiverVariable.strCurrDataType.ToLower = "logical" Or ucrReceiverVariable.strCurrDataType.ToLower = "factor") AndAlso (ucrInputComboTests.GetText() = "binomial" Or ucrInputComboTests.GetText() = "proportion") Then - clsGetFactorLevel.AddParameter("col_name", ucrReceiverVariable.GetVariableNames(), iPosition:=1) - chrCurrentFactorLevels = frmMain.clsRLink.RunInternalScriptGetValue(clsGetFactorLevel.ToScript()).AsCharacter - For Each factor In chrCurrentFactorLevels - lstFactor.Add(Chr(34) & factor & Chr(34)) - Next - ucrInputSuccess.SetItems(lstFactor.ToArray) - ucrInputSuccess.SetText(lstFactor(0)) - ucrInputSuccess.Visible = True - Else - ucrInputSuccess.Visible = False - clsBionomialFunction.RemoveParameterByName("success") - clsProportionFunction.RemoveParameterByName("success") + If bRCodeSet Then + Dim chrCurrentFactorLevels As CharacterVector + Dim lstFactor As List(Of String) = New List(Of String)() + If Not ucrReceiverVariable.IsEmpty AndAlso rdoTest.Checked AndAlso (ucrReceiverVariable.strCurrDataType.ToLower = "logical" Or ucrReceiverVariable.strCurrDataType.ToLower = "factor") AndAlso (ucrInputComboTests.GetText() = "binomial" Or ucrInputComboTests.GetText() = "proportion") Then + clsGetFactorLevel.AddParameter("col_name", ucrReceiverVariable.GetVariableNames(), iPosition:=1) + chrCurrentFactorLevels = frmMain.clsRLink.RunInternalScriptGetValue(clsGetFactorLevel.ToScript()).AsCharacter + For Each factor In chrCurrentFactorLevels + lstFactor.Add(Chr(34) & factor & Chr(34)) + Next + ucrInputSuccess.SetItems(lstFactor.ToArray) + ucrInputSuccess.SetText(lstFactor(0)) + ucrInputSuccess.Visible = True + Else + ucrInputSuccess.Visible = False + clsBionomialFunction.RemoveParameterByName("success") + clsProportionFunction.RemoveParameterByName("success") + End If End If End Sub From 122f05112db973988014fb4747d5b520acbb69ca Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 23 Nov 2020 10:30:35 +0300 Subject: [PATCH 168/172] Disabling Ok button when sd field is empty. --- instat/dlgOneVarFitModel.vb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index f60f4bb881c..735e5cd88b9 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -566,9 +566,13 @@ Public Class dlgOneVarFitModel Private Sub TestOKEnabled() If ucrSaveModel.IsComplete() AndAlso Not ucrReceiverVariable.IsEmpty AndAlso ucrDistributionChoice.ucrInputDistributions.cboInput.SelectedItem <> "" Then - ucrBase.OKEnabled(True) + If ucrInputTxtSd.GetText = "" AndAlso rdoTest.Checked AndAlso ucrInputComboTests.GetText = "Z" Then + ucrBase.OKEnabled(False) + Else + ucrBase.OKEnabled(True) + End If Else - ucrBase.OKEnabled(False) + ucrBase.OKEnabled(False) End If End Sub @@ -920,7 +924,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged + Private Sub AllControl_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveModel.ControlContentsChanged, ucrReceiverVariable.ControlContentsChanged, ucrInputTxtSd.ControlContentsChanged TestOKEnabled() End Sub From 97b1b2eecafbf7aec927d7cd04768ffe08cd7433 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 4 Jan 2021 09:53:42 +0300 Subject: [PATCH 169/172] correct reset of the success text box --- instat/dlgOneVarFitModel.vb | 2 -- 1 file changed, 2 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 735e5cd88b9..8d84dba8395 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -577,10 +577,8 @@ Public Class dlgOneVarFitModel End Sub Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - bRCodeSet = False SetDefaults() SetRCodeForControls(True) - bRCodeSet = True TestOKEnabled() End Sub From 79c6d86965811ce8eb9e61d4376f0906c2c9fb0e Mon Sep 17 00:00:00 2001 From: Ivanluv <45068931+Ivanluv@users.noreply.github.com> Date: Fri, 8 Jan 2021 10:27:50 +0300 Subject: [PATCH 170/172] Update instat/dlgOneVarFitModel.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgOneVarFitModel.vb | 78 ++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8d84dba8395..8fc0ec08750 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -15,15 +15,15 @@ ' along with this program. If not, see . Imports instat -Imports instat.Translations -Imports RDotNet -Public Class dlgOneVarFitModel +Imports instat.Translations +Imports RDotNet +Public Class dlgOneVarFitModel Private clsROneVarFitModel, clsRLogLikFunction, clsRfitdist, clsRConvertVector, clsRConvertInteger, clsRConvertNumeric, clsNaExclude As New RFunction Private clsRplotFunction, clsRplotPPComp, clsRplotCdfcomp, clsRplotQqComp, clsRplotDenscomp As New RFunction Private clsBionomialFunction, clsProportionFunction, clsSignTestFunction, clsTtestFunction, clsWilcoxonFunction, clsZTestFunction, clsBartelFunction, clsBrFunction, clsRunsFunction, clsSenFunction, clsSerialCorrFunction, clsSnhFunction, clsAdFunction, clsCvmFunction, clsLillieFunction, clsPearsonFunction, clsSfFunction As New RFunction Private clsMeanCIFunction, clsMedianCIFunction, clsNormCIFunction, clsQuantileCIFunction, clsSdCIFunction, clsVarCIFunction As New RFunction Private clsGetFactorLevel As New RFunction - Private WithEvents ucrDistribution As ucrDistributions + Private WithEvents ucrDistribution As ucrDistributions Private bFirstload As Boolean = True Private bReset As Boolean = True Private bResetFittingOptions As Boolean = False @@ -43,9 +43,9 @@ Public Class dlgOneVarFitModel SetRCodeForControls(bReset) bRCodeSet = True bReset = False - TestOKEnabled() - End Sub - + TestOKEnabled() + End Sub + Private Sub InitialiseDialog() Dim dctCIMethods As New Dictionary(Of String, String) Dim dctMethods As New Dictionary(Of String, String) @@ -254,18 +254,18 @@ Public Class dlgOneVarFitModel lstCommandButtons.AddRange({cmdDisplayOptions, cmdFittingOptions}) ucrDistributionChoice.SetLinkedDisplayControl(lstCommandButtons) - End Sub - + End Sub + Private Sub SetDefaults() clsROneVarFitModel = New RFunction clsRConvertInteger = New RFunction - clsRConvertNumeric = New RFunction - - clsRplotFunction = New RFunction - clsRplotPPComp = New RFunction - clsRplotCdfcomp = New RFunction - clsRplotQqComp = New RFunction - clsRplotDenscomp = New RFunction + clsRConvertNumeric = New RFunction + + clsRplotFunction = New RFunction + clsRplotPPComp = New RFunction + clsRplotCdfcomp = New RFunction + clsRplotQqComp = New RFunction + clsRplotDenscomp = New RFunction clsRLogLikFunction = New RFunction ucrDistribution = New ucrDistributions @@ -310,7 +310,7 @@ Public Class dlgOneVarFitModel clsGetFactorLevel.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_column_factor_levels") 'General Case - clsROneVarFitModel.SetPackageName("fitdistrplus") + clsROneVarFitModel.SetPackageName("fitdistrplus") clsROneVarFitModel.SetRCommand("fitdist") clsROneVarFitModel.AddParameter("method", Chr(34) & "mle" & Chr(34), iPosition:=1) clsROneVarFitModel.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) @@ -366,7 +366,7 @@ Public Class dlgOneVarFitModel clsRplotDenscomp.AddParameter("plotstyle", Chr(34) & "ggplot" & Chr(34), iPosition:=0) clsRplotDenscomp.AddParameter("ft", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=1) - clsRLogLikFunction.SetPackageName("fitdistrplus") + clsRLogLikFunction.SetPackageName("fitdistrplus") clsRLogLikFunction.SetRCommand("llplot") clsRLogLikFunction.iCallType = 3 clsRLogLikFunction.AddParameter("mlefit", clsRFunctionParameter:=clsROneVarFitModel, iPosition:=0) @@ -482,7 +482,7 @@ Public Class dlgOneVarFitModel ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsROneVarFitModel) - bResetFittingOptions = True + bResetFittingOptions = True bResetFitModDisplay = True End Sub @@ -564,7 +564,7 @@ Public Class dlgOneVarFitModel End Sub - Private Sub TestOKEnabled() + Private Sub TestOKEnabled() If ucrSaveModel.IsComplete() AndAlso Not ucrReceiverVariable.IsEmpty AndAlso ucrDistributionChoice.ucrInputDistributions.cboInput.SelectedItem <> "" Then If ucrInputTxtSd.GetText = "" AndAlso rdoTest.Checked AndAlso ucrInputComboTests.GetText = "Z" Then ucrBase.OKEnabled(False) @@ -572,17 +572,17 @@ Public Class dlgOneVarFitModel ucrBase.OKEnabled(True) End If Else - ucrBase.OKEnabled(False) + ucrBase.OKEnabled(False) End If - End Sub - + End Sub + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset - SetDefaults() + SetDefaults() SetRCodeForControls(True) - TestOKEnabled() - End Sub - - + TestOKEnabled() + End Sub + + Private Sub StartParameterValues() If ucrDistributionChoice.clsCurrDistribution.strNameTag = "von_mises" Then clsROneVarFitModel.AddParameter("start", "list(mu = 0.1, kappa = 0.2)", iPosition:=1) @@ -604,16 +604,16 @@ Public Class dlgOneVarFitModel clsROneVarFitModel.RemoveParameterByName("start") End Select End If - End Sub - + End Sub + Private Sub PlotResiduals() - clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) + clsRfitdist.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) If ucrDistributionChoice.clsCurrDistribution.strNameTag = "Poisson" Then - clsRConvertInteger.SetRCommand("as.integer") - clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) + clsRConvertInteger.SetRCommand("as.integer") + clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertInteger, iPosition:=0) Else clsRConvertVector.SetRCommand("as.vector") - clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) + clsRfitdist.AddParameter("data", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) End If End Sub @@ -626,7 +626,7 @@ Public Class dlgOneVarFitModel Private Sub cmdFittingOptions_Click(sender As Object, e As EventArgs) Handles cmdFittingOptions.Click sdgOneVarFitModel.SetRCode(ucrBase.clsRsyntax, clsROneVarFitModel, clsNewRLogLikFunction:=clsRLogLikFunction, ucrNewDistribution:=ucrDistribution, bReset:=bResetFittingOptions) bResetFittingOptions = False - sdgOneVarFitModel.ShowDialog() + sdgOneVarFitModel.ShowDialog() End Sub Private Sub SetSaveLabelTextAndPrefix() @@ -653,8 +653,8 @@ Public Class dlgOneVarFitModel AddAsNumeric() EstimatesAsNumeric() AddFactorLevels() - End Sub - + End Sub + Private Sub ucrDistributions_cboDistributionsIndexChanged() Handles ucrDistributionChoice.DistributionsIndexChanged If rdoGeneralCase.Checked Then clsROneVarFitModel.AddParameter("distr", Chr(34) & ucrDistributionChoice.clsCurrDistribution.strRName & Chr(34)) @@ -674,7 +674,7 @@ Public Class dlgOneVarFitModel End If End Sub - Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged + Private Sub ucrReceiverVariable_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVariable.ControlValueChanged, ucrChkConvertVariate.ControlValueChanged PlotResiduals() EnableDisableConvertVariate() AddAsNumeric() @@ -932,4 +932,4 @@ Public Class dlgOneVarFitModel clsProportionFunction.AddParameter("success", ucrInputSuccess.GetText(), iPosition:=4) End If End Sub -End Class +End Class From a3740f9c4227f2ecc7573efcc392a0fb50a536a4 Mon Sep 17 00:00:00 2001 From: Ivanluv <45068931+Ivanluv@users.noreply.github.com> Date: Fri, 8 Jan 2021 10:29:42 +0300 Subject: [PATCH 171/172] Update instat/dlgOneVarFitModel.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgOneVarFitModel.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8fc0ec08750..8c5eb9aa9c8 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -753,7 +753,7 @@ Public Class dlgOneVarFitModel tttests.SetToolTip(ucrInputComboTests.cboInput, "Buishand Range Test for Change-Point Detection") clsBrFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) Case "Sen" - tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen 's slope for linear rate of change") + tttests.SetToolTip(ucrInputComboTests.cboInput, "Sen's slope for linear rate of change") clsSenFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverVariable.GetParameter().clsArgumentCodeStructure, iPosition:=0) Case "serial corr" clsSerialCorrFunction.AddParameter("x", clsRFunctionParameter:=clsRConvertVector, iPosition:=0) From f661362a11af3d2951ebf2811d90e2d1bc89b987 Mon Sep 17 00:00:00 2001 From: Ivanluv <45068931+Ivanluv@users.noreply.github.com> Date: Fri, 8 Jan 2021 10:34:51 +0300 Subject: [PATCH 172/172] Update instat/dlgOneVarFitModel.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgOneVarFitModel.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgOneVarFitModel.vb b/instat/dlgOneVarFitModel.vb index 8c5eb9aa9c8..c3f50a119a6 100644 --- a/instat/dlgOneVarFitModel.vb +++ b/instat/dlgOneVarFitModel.vb @@ -889,7 +889,6 @@ Public Class dlgOneVarFitModel ''' '''Lists the factor levels of the selected factor or logical column into the success combobox ''' - Private Sub AddFactorLevels() If bRCodeSet Then Dim chrCurrentFactorLevels As CharacterVector