IBM SPSS Amos 21 Laptop User Manual


 
173
Simultaneous Analysis of Several Groups
Multiple Model Input
Here is a program (Ex10-all.vb) for fitting both Models A and B.
1
The Sem.Model statements should appear immediately after the AStructure
specifications for the last group. It does not matter which
Model statement goes first.
1 In Example 6 (Ex06-all.vb), multiple model constraints were written in a single string, within which individual
constraints were separated by semicolons. In the present example, each constraint is in its own string, and the
individual strings are separated by commas. Either syntax is acceptable.
Sub Main()
Dim Sem As New AmosEngine
Try
Sem.Standardized()
Sem.TextOutput()
Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Attg_yng")
Sem.GroupName("young subjects")
Sem.AStructure("recall1 (yng_rec)")
Sem.AStructure("cued1 (yng_cue)")
Sem.AStructure("recall1 <> cued1 (yng_rc)")
Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Attg_old")
Sem.GroupName("old subjects")
Sem.AStructure("recall1 (old_rec)")
Sem.AStructure("cued1 (old_cue)")
Sem.AStructure("recall1 <> cued1 (old_rc)")
Sem.Model("Model A")
Sem.Model("Model B", "yng_rec=old_rec", "yng_cue=old_cue", _
"yng_rc=old_rc")
Sem.FitAllModels()
Finally
Sem.Dispose()
End Try
End Sub