Please enable JavaScript to view this site.

IBM® SPSS® Amos™ 28

The following program fits the model from Example 8 to the Grant data, and then displays in the debug window some characteristics of the variables in the dataset.

Imports System.Diagnostics
Module MainModule
    ' InputVariableIsNumeric Method Example
    Sub Main()
        Dim i As Integer
        Dim Sem As New AmosEngineLib.AmosEngine
 
        Sem.BeginGroup(AmosEngine.AmosDir & "Examples\English\UserGuide.xls", "Grant")
        Sem.AStructure("visperc = (1) spatial + (1) err_v")
        Sem.AStructure("cubes = spatial + (1) err_c")
        Sem.AStructure("lozenges = spatial + (1) err_l")
        Sem.AStructure("paragraph = (1) verbal + (1) err_p")
        Sem.AStructure("sentence = verbal + (1) err_s")
        Sem.AStructure("wordmean = verbal + (1) err_w")
 
        Debug.WriteLine("Number of variables: " & Sem.DataFileNVariables)
        For i = 1 To Sem.DataFileNVariables
            Debug.WriteLine("")
            Debug.WriteLine("Variable number " & i)
            Debug.WriteLine("Name: " & Sem.InputVariableName(i))
            Debug.WriteLine("Label: " & Sem.InputVariableLabel(i))
 
            If Sem.InputVariableIsNumeric(i) Then
                Debug.WriteLine("Numeric")
            Else
                Debug.WriteLine("Non-numeric")
            End If
 
            If Sem.InputVariableHasMissingValues(i) Then
                Debug.WriteLine("Has missing values")
            Else
                Debug.WriteLine("Doesn't have missing values")
            End If
        Next
 
        Sem.Dispose()
    End Sub
End Module

© 2021 Amos Development Corporation