IBM SPSS Amos 21 Laptop User Manual


 
264
Example 16
Model C
The following program fits Model C. The program is saved as Ex16-c.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) + () pre_verbal + (1) zeta")
Sem.AStructure("eps2 <---> eps4")
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) + () pre_verbal + (1) zeta")
Sem.AStructure("eps2 <---> eps4")
Sem.Mean("pre_verbal", "pre_diff")
Sem.FitModel()
Finally
Sem.Dispose()
End Try
End Sub