Psych 285: Computational Statistics
and Statistical Visualization

Professor Forrest Young

Object Oriented Programming:
ViSta Statistical Objects

Write NORM-MODEL-PROTO, a prototype ViSta model object to normalize the active numeric variables of a multivariate data matrix (i.e., makes the mean of each column MEAN and the standard deviation STDEV). The object's constructor-function should the standard ViSta system arguments, with keyword arguments MEAN (default 0.0) and STDEV (default 1.0). The constructor-function should return the object identification information of the instantiated object.

The object should have six slots and slot accessor methods for the desired mean and standard deviation, for the raw data and normalized data, and for the observed means and standard-deviations.

In addition to the slot-accessor methods, there should be object-specific methods which compute values for each slot. The code should also include an object-specific method which prints either the original or normalized X.

The code should include the ViSta system methods :ANALYSIS and :REPORT. The :ANALYSIS method should compute and store the matrix of normalized data, the means and the standard-deviations of the raw variables. The :REPORT method should print the original matrix, its summary statistics and the normalized matrix.

Test your code by creating instances of the object using various ViSta data objects. Compare your results to ViSta's TRANSFORM menu's NORMALIZE DATA item.

Send your code, and your test of the code, to me by e-mail before class on the due date.

To get in touch: