Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bivariate ANOVA dialog #313

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 156 additions & 14 deletions instat/dlgBivariateANOVA.Designer.vb

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

67 changes: 65 additions & 2 deletions instat/dlgBivariateANOVA.vb
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
Public Class dlgBivariateANOVA

' Instat-R
' Copyright (C) 2015
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License k
' along with this program. If not, see <http://www.gnu.org/licenses/>.

Imports instat.Translations
Public Class dlgBivariateANOVA
Private Sub dlgBivariateANOVA_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ucrBase.clsRsyntax.SetFunction("manova")
ucrBase.clsRsyntax.iCallType = 2
ucrReceiver1stResponseVariable.Selector = ucrAddRemove
ucrReceiver1stResponseVariable.SetMeAsReceiver()
autoTranslate(Me)
ucrReceiver2ndResponseVariable.Selector = ucrAddRemove
ucrReceiverTreatmentFactor.Selector = ucrAddRemove
ucrReceiverBlockingFactor.Selector = ucrAddRemove
End Sub

Private Sub ucrReceiver1stResponseVariable_Leave(sender As Object, e As EventArgs) Handles ucrReceiver1stResponseVariable.Leave
FillFormula()

End Sub

Private Sub ucrReceiver2ndResponseVariable_Leave(sender As Object, e As EventArgs) Handles ucrReceiver2ndResponseVariable.Leave
FillFormula()
End Sub

Private Sub ucrReceiverTreatmentFactor_Leave(sender As Object, e As EventArgs) Handles ucrReceiverTreatmentFactor.Leave
FillFormula()

End Sub

Private Sub ucrReceiverBlockingFactor_Load(sender As Object, e As EventArgs) Handles ucrReceiverBlockingFactor.Leave
FillFormula()
End Sub
Private Sub FillFormula()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be on load or on leave?

Dim str1stResponseVariable As String
Dim str2ndResponseVariable As String
Dim strTreatmentFactor As String
Dim strBlockingFactor As String
str1stResponseVariable = ucrReceiver1stResponseVariable.GetVariables()
str2ndResponseVariable = ucrReceiver2ndResponseVariable.GetVariables()
strTreatmentFactor = ucrReceiverBlockingFactor.GetVariables()
strBlockingFactor = ucrReceiverBlockingFactor.GetVariables()
If ((Not IsNothing(str1stResponseVariable)) Or (Not IsNothing(str2ndResponseVariable)) Or (Not IsNothing(strTreatmentFactor)) Or (Not IsNothing(strBlockingFactor))) Then
'ucrBase.clsRsyntax.AddParameter("formula", cbind(str1stResponseVariable,str2ndResponseVariable) & "~" & strTreatmentFactor & "*" & strBlockingFactor)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this or or and?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i corrected the event

ucrBase.OKEnabled(True)
Else
ucrBase.OKEnabled(False)



End If
End Sub
End Class