The following program shows how to display various fit measures when only one model is defined (i.e., when the Model method has been used only once or not at all).
Imports System.Diagnostics
Module MainModule
' Ncp, NcpLo and NcpHi Methods Example 1
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
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")
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