262
Example 16
Model Z also has to be rejected when compared to Model Y (χ
2
= 84.280 – 31.816 =
52.464, df = 13 – 12 = 1). Within rounding error, this is the same difference in
chi-square values and degrees of freedom as in Example 9, when Model C was
compared to Model B.
Modeling in VB.NET
Model A
The following program fits Model A. It is saved as Ex16-a.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.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.Mean("pre_verbal", "pre_diff")
Sem.FitModel()
Finally
Sem.Dispose()
End Try
End Sub