SAS introduction, part 2

Last time you familiarised yourself with SAS.

A small tip for entering a covariance matrix. The following shows how to enter the covariance matrix of example 2.2 in the textbook directly and then analyse it:

data covmatr (type=cov);
input x y;
_type_='cov'; length _name_$ 8.;
if _n_=1 then _name_='x';
if _n_=2 then _name_='y';
cards;
311 182
182 279
;
proc print;
proc princomp data=covmatr cov;

Today we continue with the multivariate normal distribution. We consider the dataset of height-weight data for 25000 children and youngsters called sasuser.heiwei. You downloaded it in the exercise last time.

You can get help and inspiration to the exercises from the two sample programs found under "Data files and exercises -- > Exercise 2" on Campusnet.

  1. Select a set of suitable subsets of increasing sizes of the full dataset and determine the empirical variance-covariance matrix (empirical dispersion matrix), the correlation coefficient, the prediction ellipsoid, and the bivariate histogram for each of those. Sample program he-we-corr-hist.sas

  2. Repeat the analysis for the full dataset!

  3. Do the results stabilize for increasing numbers of observations?

  4. Find the conditional mean of weight for given height based on the empirical dispersion matrix!

  5. Find some mean values of the weight for different heights and compare those to the result obtained in 4. Sampleprogram hw-cond.sas

  6.