Lab07_Fall2011

# Lab07_Fall2011 - EXST 7003 Lab 07 Fall 2011 EXST 7003, Lab...

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

EXST 7003 Lab 07 Fall 2011 EXST 7003, Lab 7: Data Merging and Two-Sample Hypothesis Testing in SAS Week of: October 24 – October 28 DUE: November 1 st (section 1) or November 4 th (section 2 or 3) The Program The program which will be utilized in this lab, which each student will individually write, refer to, and answer questions about, is provided below. This program is discussed herein, and will be presented during lab. The ttest procedure performs t-tests for one sample, two samples and paired observations. The single-sample t-test compares the mean of the sample to a given number (which you supply). The independent samples t-test compares the difference in the means from the two groups to a given value (usually 0). In other words, it tests whether the difference in the means is 0. dm 'log;clear;output;clear' ; OPTIONS nodate nocenter pageno= 1 ls = 120 ps = 55 ; Title1 'EXST 7003 Lab 7' ; Title2 'Your name' ; ods rtf file = 'C:\Users\shuyu\Desktop\lab7.doc' ; data zinc; infile 'C:\Users\shuyu\Desktop\zinc.txt' firstobs = 2 ; input area \$ zinc; lzin =log(zinc); c proc print data= zinc; run ; proc univariate data =zinc normal plot ; class area; var zinc lzinc; run ; proc ttest data =zinc; class area; var lzinc; title 'TTEST procedure for two sample' ; run ; proc ttest data =zinc H0 = 5 ; where area= 'Rural' ; var lzinc; title 'ttest procedure for one sample' ; run ; ods rtf close ; quit ; 1

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

View Full Document
EXST 7003 Lab 07 Fall 2011 PROC TTEST for Two Samples As we know, the alpha (or significance level), is an estimate of the extent of Type I error that a researcher allows, and is controlled by the researcher. This error rate increases for each inferential test that is conducted in an experiment, and is at most equal to the sum of the error rates for the inferential tests. Sometimes though, a researcher either wants to (or is mandated to), perform more than one test in an experiment. For instance, it may be desired to test one sample against a known or suspected population mean value, and a different (independent) sample against a different value. Or, two drug treatments (a placebo and a suspected treatment for a particular disease) may be being tested to compare the effectiveness of the tested drug to an experimental control. One possible method of performing these experiments would be to set up
This is the end of the preview. Sign up to access the rest of the document.

## Lab07_Fall2011 - EXST 7003 Lab 07 Fall 2011 EXST 7003, Lab...

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

View Full Document
Ask a homework question - tutors are online