206
Example 12
Modeling in VB.NET
Model A
The following program (Ex12-a.vb) fits Model A for boys and girls:
The same model is specified for boys as for girls. However, the boys’ parameter values
can be different from the corresponding girls’ parameters.
Sub Main()
Dim Sem As New AmosEngine
Try
Sem.TextOutput()
Sem.Standardized()
Sem.Smc()
Sem.BeginGroup(Sem.AmosDir & "Examples\Grnt_fem.sav")
Sem.GroupName("Girls")
Sem.AStructure("visperc = (1) spatial + (1) err_v")
Sem.AStructure("cubes = spatial + (1) err_c")
Sem.AStructure("lozenges = spatial + (1) err_l")
Sem.AStructure("paragrap = (1) verbal + (1) err_p")
Sem.AStructure("sentence = verbal + (1) err_s")
Sem.AStructure("wordmean = verbal + (1) err_w")
Sem.BeginGroup(Sem.AmosDir & "Examples\Grnt_mal.sav")
Sem.GroupName("Boys")
Sem.AStructure("visperc = (1) spatial + (1) err_v")
Sem.AStructure("cubes = spatial + (1) err_c")
Sem.AStructure("lozenges = spatial + (1) err_l")
Sem.AStructure("paragrap = (1) verbal + (1) err_p")
Sem.AStructure("sentence = verbal + (1) err_s")
Sem.AStructure("wordmean = verbal + (1) err_w")
Sem.FitModel()
Finally
Sem.Dispose()
End Try
End Sub