172
Example 10
The BeginGroup method is used twice in this two-group analysis. The first BeginGroup
line specifies the Attg_yng dataset. The three lines that follow supply a name and a
model for that group. The second
BeginGroup line specifies the Attg_old dataset, and
the following three lines supply a name and a model for that group. The model for each
group simply says that recall1 and cued1 are two variables with unconstrained
variances and an unspecified covariance. The
GroupName method is optional, but it is
useful in multiple-group analyses because it helps Amos to label the output in a
meaningful way.
Model B
The following program for Model B is saved in Ex10-b.vb:
The parameter names var_rec, var_cue, and cov_rc (in parentheses) are used to require
that some parameters have the same value for old people as for young people. Using
the name var_rec twice requires recall1 to have the same variance in both populations.
Similarly, using the name var_cue twice requires cued1 to have the same variance in
both populations. Using the name cov_rc twice requires that recall1 and cued1 have
the same covariance in both populations.
Sub Main()
Dim Sem As New AmosEngine
Try
Dim dataFile As String = Sem.AmosDir & "Examples\UserGuide.xls"
Sem.Standardized()
Sem.TextOutput()
Sem.BeginGroup(dataFile, "Attg_yng")
Sem.GroupName("young subjects")
Sem.AStructure("recall1 (var_rec)")
Sem.AStructure("cued1 (var_cue)")
Sem.AStructure("recall1 <> cued1 (cov_rc)")
Sem.BeginGroup(dataFile, "Attg_old")
Sem.GroupName("old subjects")
Sem.AStructure("recall1 (var_rec)")
Sem.AStructure("cued1 (var_cue)")
Sem.AStructure("recall1 <> cued1 (cov_rc)")
Sem.FitModel()
Finally
Sem.Dispose()
End Try
End Sub