Lab09_Fall2011 - EXST 7003 Lab 09 Fall 2011 EXST 7003 Lab...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
EXST 7003 Lab 09 Fall 2011 EXST 7003, Lab 09: Decision Processing and One-Way ANOVA in SAS Week of: November 7 st to November 11 th DUE: November 15 th (section 1) or November 18 th (section 2 or 3) The Program When you want to compare the means of more than two populations, the two sample t-test is no longer an efficient procedure. While you could do multiple t-tests for each possible pair of populations, this would inflate your error rate, as well as being a tedious method. The analysis of variance (ANOVA) is an appropriate solution to this problem. There are many ways to approach the analysis of variance in SAS. We will focus only two of them: PROC ANOVA, PROC GLM and PROC MIXED. These procedures are quite similar and are used extensively in other courses in statistics. dm 'log;clear;output;clear' ; OPTIONS nodate nocenter pageno= 1 ls = 78 ps = 55 ; Title1 'EXST 7003 Lab 08' ; Title2 'Your name' ; DATA one; infile 'C:\Users\shuyu\Desktop\shoedata.txt' M = ',' ; DL LENGTH region $ 25 product $ 15 subsidiary $ 15 ; INPUT region $ product $ subsidiary $ stores sales inventory returns; IF region = 'United States' ; IF subsidiary = 'Chicago' THEN subnum = 1 ; IF subsidiary = 'Los Angeles' THEN subnum = 2 ; IF subsidiary = 'Minneapolis' THEN subnum = 3 ; IF subsidiary = 'New York' THEN subnum = 4 ; IF subsidiary = 'Seattle' THEN subnum = 5 ; IF subsidiary = 'Baton Rouge' THEN subnum = 6 ; DROP inventory returns; RUN ; PROC PRINT data =one; Title3 'Printout of Pacific areas sales data' ; RUN ; PROC ANOVA data =one; class subnum; model sales=subnum; means subnum/ lsd clm ; run ; PROC GLM data =one; Title3 'Proc GLM ANOVA analysis of U.S. sales data' ; Class subnum; Model sales = subnum/ ss3 ; Means subnum / HOVTEST =Levene Tukey CLDIFF ; Output out =glmout p=pred r=resid; 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EXST 7003 Lab 09 Fall 2011 RUN ; PROC UNIVARIATE data =glmout NORMAL PLOT ; Title3 'Univariate analysis of resids' ; VAR resid; RUN ; PROC BOXPLOT data =one; TITLE3 ‘Box Plot of Sales - by Subsidiary’; PLOT sales*subnum / CBOXES = dagr CBOXFILL = ywh; RUN ; The data The data set to be utilized for this week’s consists of sales, inventory, and returns data for a large, multi-national department store (e.g. Macy’s). The data set has been stored as an individual file, separate and external to the SAS program, much like the file that was utilized in Lab 5. This file was originally stored as a Microsoft Excel spreadsheet file, but was converted into a comma separated values (CSV) file which will be read in by the SAS software package using a suitable statement structure. For this lab, we are interested in testing to see if varied stores in the United State have different Sales data; hence we use the sub-setting IF statement to omit records from other regions and countries. Decision Processing
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/28/2011 for the course EXST 7003 taught by Professor Moser,e during the Fall '08 term at LSU.

Page1 / 6

Lab09_Fall2011 - EXST 7003 Lab 09 Fall 2011 EXST 7003 Lab...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online