Please enable JavaScript to view this site.

IBM® SPSS® Amos™ 28

The following program specifies a multivariate normal population with covariance matrix and mean given by

7164.

Then it generates a sample of 20 cases from that population.

Imports System.Diagnostics
Module MainModule
    Sub Main()
        Dim arand As New AMOSRANDOMLib6.AmosRanGen
        Dim Covariances(2) As Double
        Dim Means(1) As Double
        Covariances(0) = 3
        Covariances(1) = 1
        Covariances(2) = 2
        Means(0) = 4
        Means(1) = 5
        Call arand.SpecifyPopulation(Covariances, Means)
 
        Dim x(1) As Double
        Dim i As Long
        For i = 1 To 20
            Call arand.RandomVector(x(0), 2)
            Debug.WriteLine(x(0) & x(1))
        Next
    End Sub
End Module

© 2021 Amos Development Corporation