The following program fits the model of Example 8. Then it displays a list of the model parameters.
Imports System.Diagnostics
Module MainModule
' ParameterInfo Method Example
Dim Sem As New AmosEngineLib.AmosEngine
Sub Main()
Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\Grnt_fem.sav")
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")
Dim i As Integer
For i = 1 To Sem.NumberOfParameters
Debug.WriteLine(i & " " & ParameterPicture(i))
Next
Sem.Dispose()
End Sub
Function ParameterPicture(ByVal ParameterNumber As Integer) As String
Dim GroupNumber As Integer
Dim ParameterType As Integer
Dim LeftVariable As Integer
Dim RightVariable As Integer
Dim S As String
Dim vname1 As String
Dim vname2 As String
Sem.ParameterInfo(ParameterNumber, _
GroupNumber, ParameterType, _
LeftVariable, RightVariable)
vname1 = Sem.Variablename(LeftVariable)
vname2 = Sem.Variablename(RightVariable)
Select Case ParameterType
Case 1
S = vname1 & "<--" & vname2
Case 2
S = vname1 & " mean"
Case 3
S = vname1 & " intercept"
Case 4
S = vname1 & "<->" & vname2
Case 5
S = vname1 & " variance"
End Select
If Sem.NumberOfGroups > 1 Then
S = "Group " & GroupNumber & " " & S
End If
S = "[" & S & "]"
ParameterPicture = S
End Function
End Module