219
Estimating and Testing Hypotheses about Means
Fitting Multiple Models
Both models A and B can be fitted by the following program. It is saved as Ex13-all.vb.
Sub Main()
Dim Sem As New AmosEngine
Try
Sem.TextOutput()
Sem.ModelMeansAndIntercepts()
Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Attg_yng")
Sem.GroupName("young subjects")
Sem.AStructure("recall1 (var_rec)")
Sem.AStructure("cued1 (var_cue)")
Sem.AStructure("recall1 <> cued1 (cov_rc)")
Sem.Mean("recall1", "yng_rec")
Sem.Mean("cued1", "yng_cue")
Sem.BeginGroup(Sem.AmosDir & "Examples\UserGuide.xls", "Attg_old")
Sem.GroupName("old subjects")
Sem.AStructure("recall1 (var_rec)")
Sem.AStructure("cued1 (var_cue)")
Sem.AStructure("recall1 <> cued1 (cov_rc)")
Sem.Mean("recall1", "old_rec")
Sem.Mean("cued1", "old_cue")
Sem.Model("Model_A", "")
Sem.Model("Model_B", "yng_rec = old_rec", "yng_cue = old_cue")
Sem.FitAllModels()
Finally
Sem.Dispose()
End Try
End Sub