This example demonstrates the FitAllModels method.
Imports System.Diagnostics
Module MainModule
' FitAllModels Method Example
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
Sem.TextOutput()
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Grnt_fem")
Sem.AStructure("visperc = (1) spatial + (1) err_v")
Sem.AStructure("cubes = spatial + (1) err_c")
Sem.AStructure("lozenges = spatial + (1) err_l")
Sem.AStructure("paragraph = (1) verbal + (1) err_p")
Sem.AStructure("sentence = verbal + (1) err_s")
Sem.AStructure("wordmean = verbal + (1) err_w")
Sem.FitAllModels()
Debug.WriteLine("Chi Square = " & Sem.Cmin)
Debug.WriteLine("Degrees of Freedom = " & Sem.df)
Debug.WriteLine("p = " & Sem.p)
Debug.WriteLine("Number of parameters = " & Sem.npar)
Debug.WriteLine("Noncentrality parameter = " & Sem.Ncp & " (" & _
Sem.NcpLo & ", " & Sem.NcpHi & ")")
Debug.WriteLine("Rmsea = " & Sem.Rmsea & " (" & Sem.RmseaLo & ", " & Sem.RmseaHi & ")")
Debug.WriteLine("Test of close fit, p = " & Sem.Pclose)
Sem.Dispose()
End Sub
End Module