This example demonstrates the NumberOfGroups method.
Imports System.Diagnostics
Imports AmosEngineLib.AmosEngine.TMatrixID
Module MainModule
' NumberOfGroups Method Example
Sub Main()
Dim CNumbers() As Long, RNumbers() As Long, X() As Double
Dim Sem As New AmosEngineLib.AmosEngine
Sem.NeedEstimates(TotalEffects)
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Fels_fem")
Sem.GroupName("girls")
Sem.AStructure("academic = (g1) GPA + (g2) attract + (1) e1")
Sem.AStructure("attract = (g3) height + (g4) weight + (g5) rating + (g6) academic + (1) e2")
Sem.AStructure("e2 <--> e1")
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Fels_mal")
Sem.GroupName("boys")
Sem.AStructure("academic = (b1) GPA + (b2) attract + (1) e1")
Sem.AStructure("attract = (b3) height + (b4) weight + (b5) rating + (b6) academic + (1) e2")
Sem.AStructure("e2 <--> e1")
Debug.WriteLine("Number of groups = " & Sem.NumberOfGroups)
Sem.Dispose()
End Sub
End Module