Psych 285: Computational Statistics
and Statistical Visualization
Professor Forrest Young
Tierney's Object System
Write NORM-PROTO, a prototype object that normalizes a matrix X (i.e., makes the mean of each column MEAN and the standard deviation STDEV). The object's constructor-function should be called NORM. It should take a matrix X as its only required argument, 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 two slots for the mean and standard deviation specified by the user, and 4 slots for the raw data, normalized data, means and standard-deviations. The object should store the desired mean and standard deviation, the matrices of original and normalized variables, and should store lists or vectors of the means and standard-deviations of the original variables.
In addition to the six slot-accessor methods, there should be object-specific methods which compute values for each slot.
Test out your code by creating instances of the object using the tutorial data. Send the instances appropriate messages to show that it works right. Compare 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:email: firstname.lastname@example.org WWW: http://forrest.psych.unc.edu