A SAS/IML Companion for Linear Models
Statistics and Computing
except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
... etary rights. Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com) Preface This companion is designed for researchers who wish to perform linear models analysis using the definitional formulas. It can serve as a supplemental text for students in a college-level theoretical or applied linear models course using The SAS System (SAS) for computations. This book can also serve as the principal text for a special topics course in a graduate program in statistics with linear models theory and applications courses as prerequisites. It may also serve as a useful reference for statistical analysts who wish to use the SAS/IML product to work out the formulas for new experimental methods of data analysis. A linear models course can be taught from different approaches. Some of these approaches are more theoretical and focus on computation and derivation of the linear algebra formulations. Such a course might consist of theorem, proof, theorem, proof, theorem, proof, theorem, lemma, proof, etc. Some theoretical approaches focus on geometric interpretations of the linear model using projections. Yet other approaches are more applied and focus on the computer-aided applied analysis using high-level computational procedures such as PROC GLM, MIXED, REG, etc. in SAS, with little time spent with the analytic formulas. This companion illustrates the theoretical linear algebra approach to teaching linear model analysis. This companion does not teach linear models concepts, but demonstrates how SAS/IML can be used to evaluate numerical linear model problems. It is assumed that the reader does not have any experience using SAS/IML, but is familiar with DATA steps and basic PROC steps in the SAS system. All the SAS examples given in this companion are self-contained, and may be executed as written, without additional programming. In most cases, there are other SAS procedures that are more appropriate to use in the analysis of linear models than the IML procedure. In many cases, the analysis will be performed in both IML and another, more appropriate SAS procedure. This is done for the following reason: The IML approach is directed at leaning and applying the linear models formulas. The more "canned" procedures like REG and GLM do not allow students to see the connection between formulas and the procedures. However, because REG and GLM are more efficient and numerically accurate than SAS/IML in many applications of the linear model, they will also be briefly demonstrated. The canned procedures (such as REG and GLM) are considered the standard for analysis and are provided to demonstrate that the results obtained using the IML procedures are the same as v vi Preface those using the canned procedures. This allows students to go from written analytic formula in say mixed models analysis to IML implementation of that same analytic formula to high level analysis using PROC MIXED. Adding the step of PROC IML implementation provides the missing link in the learning process. The topics selected for this companion are the topics the author found to be useful in the academic learning of the analysis of linear models. There are many additional topics useful in the study of linear models that were not included. However, this should give the reader a complete treatise for a course on the subject. Exercises have been included to aid the learner. Some exercises were developed by withholding IML implementation steps for the reader to work through. Other exercises are developed for perhaps repetitive application of concepts introduced in the discussion. The examples presented take advantage of the most recent advances in SAS/IML and are current as of SAS version 9.2. However, most of the examples will work in earlier versions of SAS.