The following program performs a permutation test of Jöreskog and Sörbom's (1989, p. 205) Model D for the data of Wheaton et al. (1977).
Module MainModule
' PermuteDetail Method Example
Sub Main()
Dim Sem As New AmosEngineLib.AmosEngine
Sem.TextOutput()
Sem.Iterations(100)
Sem.Permute(0) 'All permutations
Sem.PermuteDetail()
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Wheaton")
Sem.Path("anomia67", "67_alienation", 1)
Sem.Path("anomia67", "eps1", 1)
Sem.Path("powles67", "67_alienation")
Sem.Path("powles67", "eps2", 1)
Sem.Path("anomia71", "71_alienation", 1)
Sem.Path("anomia71", "eps3", 1)
Sem.Path("powles71", "71_alienation")
Sem.Path("powles71", "eps4", 1)
Sem.Path("67_alienation", "ses")
Sem.Path("67_alienation", "zeta1", 1)
Sem.Path("71_alienation", "67_alienation")
Sem.Path("71_alienation", "ses")
Sem.Path("71_alienation", "zeta2", 1)
Sem.Path("education", "ses", 1)
Sem.Path("education", "delta1", 1)
Sem.Path("SEI", "ses")
Sem.Path("SEI", "delta2", 1)
Sem.Var("eps1", "var1")
Sem.Var("eps2", "var2")
Sem.Var("eps3", "var3")
Sem.Var("eps4", "var4")
Sem.Cov("eps1", "eps3", "cov1")
Sem.Cov("eps2", "eps4", "cov2")
Sem.Dispose()
End Sub
End Module