Multivariate Analysis

Computer Assignments



Multivariate: Assignment 1
Matrix Algebra I

Using the matrix X found in FILE1 write a matrix
program to do the following:

	1.	Print X
	2.	Create a vector of variable totals
	3.	Create a vector of variable means
	4.	Compute the raw SSCP matrix
	5.	Compute the deviation score matrix
	6.	Compute the deviation SSCP matrix
	7.	Compute the covariance matrix
	8.	Compute the standard score matrix
	9.	Compute the correlation matrix

	Note: be sure to label your output and include comments and your program.

Answers to Assignment 1


Multivariate: Assignment 2
Multiple Regression

Using the matrices X and Y found in FILE2 do the following:

	1*	Compute the vector of raw regression weights
	2 	Compute the standard error of the regression weights
	3 	Compute t-tests for each regression weight
	4* 	Compute the vector of predicted scores
	5* 	Compute the vector of residual scores
	6* 	Compute the squared multiple correlation
	7* 	Compute the F-ratio for the model
	8 	Compute the standard error of estimate
	9 	Compute the vector of standardized regression weights

	Note: be sure to label your output and include comments.

Answers to Assignment 2

Multivariate: Assignment 3
Hotelling's T2

Using the matrices X1 and X2 found in FILE3 do the following:

	1.	Compute the pooled within SSCP matrix
	2.	Compute the mean value vectors for each group
	3.	Compute the difference in the mean value vectors
	4.	Compute the Mahalanobis D2 statistic
	5. 	Compute the Hotelling T2 statistic
	6. 	Compute the F statistic
	7. 	Give the degrees of freedom
	8.	State whether the multivariate analysis is significant

	Note: be sure to label your output and include comments.

Answers to Assignment 3


ED210D: Assignment 4
One-way MANOVA

Using the matrices X1, X2, and X3 found in FILE4 do the following:

	1	Compute a mean value vector for each group
	2	Compute the total SSCP matrix
	3	Compute the pooled within SSCP matrix
	4	Compute the between SSCP matrix
	5	Compute the Wilk's L statistic
	6 	Compute the F statistic approximation
	7	Give the degrees of freedom
	8	Compute w2m (the multivariate strength of association)
	9	State whether the multivariate analysis is significant and interpret the results

	Note: be sure to label your output and include comments.

Answers to Assignment 4


Multivariate: Assignment 5
Matrix Algebra II

Using the matrix X found in FILE1 
 do the following:

	1.	Compute the deviation SSCP matrix, S
	2.	Compute the covariance matrix, C
	3.	Compute the correlation matrix, R
	4.	Compute the determinants of S, C and R
	5.	Compute the eigenvalues of S, C and R
	6.	Compute the eigenvectors of S, C and R

	Note: be sure to label your output and include comments.
	
Answers to Assignment 5



Multivariate: Assignment 6
Linear Discriminant Function Analysis

Using the matrices X1, X2, and X3 found in FILE4 do the following 
(retain only the first two discriminant dimensions):

	1.	Compute a mean value vector for each group.
	2.	Compute the pooled within SSCP matrix, W.
	3.	Compute the between group SSCP matrix, B.
	4.	Compute the eigenvalues and eigenvectors for W-1B.
	5.	Compute the canonical correlations.
	6.	Compute the standardized discriminant function weights.
	7.	Compute the Wilk's Lambda statistics.
	8.	Compute the chi-square statistic approximations.
	9.	Compute the degrees of freedom
	10.	State whether the multivariate analysis is significant.
	11.	Compute the discriminant structure matrix.

	Note: be sure to label your output and include comments.



Multivariate: Assignment 7
Canonical Correlation Analysis

Using the matrix XY (the first 3 columns of XY are the Y variables 
while the last 5 columns are the X variables) found in FILE5 do the 
following:

	1.	Compute the squared canonical correlation.
	2.	Compute the canonical correlation.
	3.	Compute the eignevalues of A and B.
	4.	Compute the eigenvectors of A and B.
	5.	Compute the F statistic approximations.
	6.	Compute the degrees of freedom.
	7.	Determine which canonical dimensions are significant.

	Note: be sure to label your output and include comments.




Multivariate: Assignment 8
Factorial MANOVA

Using the SAS IML procedure analyze the following data:

		B1		B2
		Y1	Y2	Y1	Y2
	__________________________________
	A1	10	21	 9	14
		12	22	 8	15
		 9	19	11	16
		10	21	 9	17
		14	23	 9	17
	__________________________________
	A2	11	23	11	15
		14	27	12	18
		13	24	10	16
		15	26	9	17
		14	24	9	18
	__________________________________
	A3	8	17	9	22
		7	15	8	18
		10	18	10	17
		8	17	9	19
		7	19	8	19
	__________________________________

	Note: be sure to label your output and include comments.


Multivariate: Assignment 9
General Linear Model

Using the SAS IML procedure analyze the data from Assignment 8 using the 
General Linear Model approach.  For the purposes of this assignment, do not 
use the reparamenterization estimation procedue. Instead, use the standard 
method of orthogonal coding of the design matrix.  Compute tests of 
significance as far as Wilks' Lambda.

	Note: be sure to label your output and include comments.



Multivariate: Assignment 10
Principal Components & Factor Analysis

Using the correlation matrix R found in FILE6 do the following:

	1.*	Compute the eigenvalues and eigenvectors of R.
	2.*	Compute the component loading matrix.
	3.	Compute the squared multiple correlations for each variable.
	4.	Compute the reduced correlation matrix R1.
	5.	Compute the eigenvalues and eigenvectors for R1.
	6.	Compute the factor loading matrix.

  The variables in order are:  total populatiom, median school years,
total employment, misc. professional services, and median house value.

	Note:  Only retain the first two eigenvalues and eigenvectors.

	Note: be sure to label your output and include comments.
	
Answers to Assignment 10


Multivariate Course Page

Phil Ender, 12jul07, 4oct05