292
Example 18
Modeling in VB.NET
Model A
The following program fits Model A. It estimates means, variances, and covariances of
both vocabulary tests in both groups of subjects, without constraints. The program is
saved as Ex18-a.vb.
The
Crdiff method displays the critical ratios for parameter differences that were
discussed earlier.
For later reference, note the value of the Function of log likelihood for Model A.
Sub Main()
Dim Sem As New AmosEngine
Try
Sem.TextOutput()
Sem.Crdiff()
Sem.ModelMeansAndIntercepts()
Sem.BeginGroup(Sem.AmosDir & "Examples\atty_mis.sav")
Sem.GroupName("young_subjects")
Sem.Mean("vocab", "m1_yng")
Sem.Mean("v_short")
Sem.BeginGroup(Sem.AmosDir & "Examples\atto_mis.sav")
Sem.GroupName("old_subjects")
Sem.Mean("vocab", "m1_old")
Sem.Mean("v_short")
Sem.FitModel()
Finally
Sem.Dispose()
End Try
End Sub
Function of log likelihood = 429.963
Number of parameters = 10