267
Sörbom’s Alternative to Analysis of Covariance
Fitting Multiple Models
The following program fits all five models, A through E. The program is saved as
Ex16-a2e.vb.
Sub Main()
Dim Sem As New AmosEngine
Try
Dim dataFile As String = Sem.AmosDir & "Examples\UserGuide.xls"
Sem.TextOutput()
Sem.Mods(4)
Sem.Standardized()
Sem.Smc()
Sem.ModelMeansAndIntercepts()
Sem.BeginGroup(dataFile, "Olss_cnt")
Sem.GroupName("control")
Sem.AStructure("pre_syn = (a_syn1) + (1) pre_verbal + (1) eps1")
Sem.AStructure( _
"pre_opp = (a_opp1) + (opp_v1) pre_verbal + (1) eps2")
Sem.AStructure("post_syn = (a_syn2) + (1) post_verbal + (1) eps3")
Sem.AStructure( _
"post_opp = (a_opp2) + (opp_v2) post_verbal + (1) eps4")
Sem.AStructure("post_verbal = (0) + (c_beta) pre_verbal + (1) zeta")
Sem.AStructure("eps2 <---> eps4 (c_e2e4)")
Sem.BeginGroup(dataFile, "Olss_exp")
Sem.GroupName("experimental")
Sem.AStructure("pre_syn = (a_syn1) + (1) pre_verbal + (1) eps1")
Sem.AStructure( _
"pre_opp = (a_opp1) + (opp_v1) pre_verbal + (1) eps2")
Sem.AStructure("post_syn = (a_syn2) + (1) post_verbal + (1) eps3")
Sem.AStructure( _
"post_opp = (a_opp2) + (opp_v2) post_verbal + (1) eps4")
Sem.AStructure("post_verbal = (effect) + (e_beta) pre_verbal + (1) zeta")
Sem.AStructure("eps2 <---> eps4 (e_e2e4)")
Sem.Mean("pre_verbal", "pre_diff")
Sem.Model("Model A", "c_e2e4 = 0", "e_e2e4 = 0")
Sem.Model("Model B", "c_e2e4 = 0")
Sem.Model("Model C")
Sem.Model("Model D", "c_beta = e_beta")
Sem.Model("Model E", "c_beta = e_beta", "effect = 0")
Sem.FitAllModels()
Finally
Sem.Dispose()
End Try
End Sub