20PROC_TTest

20PROC_TTest - Statistical Techniques I EXST7005 SAS PROC...

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

View Full Document Right Arrow Icon
Statistical Techniques I EXST7005 SAS PROC TTEST
Background image of page 1

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

View Full DocumentRight Arrow Icon
SAS PROC TTEST We would normally do two-sample t-tests with SAS PROC TTEST. This procedure has the structure proc ttest data = dataset name ; class group variable ; var variable of interest ;
Background image of page 2
SAS PROC TTEST (continued) The PROC statement is familiar, and functions a any other proc statement. The VARIABLE or VAR statement works the same as in other procedures we have seen. The CLASS statement is new. It specifies th variable that will allow SAS to distinguish between the two sample groups to be tested
Background image of page 3

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

View Full DocumentRight Arrow Icon
PROC TTEST EXAMPLE 1 Corn silage was fed to sheep and steers. The objective was to determine if the percent digestibility differed for the two types of animals
Background image of page 4
Example 1: Raw data Obs Sheep Steers 1 57.8 64.2 2 56.2 58.7 3 61.9 63.1 4 54.4 62.5 5 53.6 59.8 6 56.4 59.2 7 53.2
Background image of page 5

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

View Full DocumentRight Arrow Icon
Example 1: Raw data (continued) Unfortunately this data is not structured properly for PROC TTEST. It has two variables (sheep and steers) giving the percent digestibility for sheep and steers separately. We need one variable with percent digestibility for both and a second variable specifying the type of animal. This can be fixed in the data step.
Background image of page 6
Example 1: SAS Program data silage; infile cards missover; TITLE1 ' Percent digestibility of corn silage '; LABEL animal = 'Type of animal tested'; LABEL percent = 'Percent digestibility'; input sheep steers; animal='Sheep '; percent=sheep; output; animal='Steers'; percent=steers; output; cards;
Background image of page 7

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

View Full DocumentRight Arrow Icon
Example 1: SAS output of modified data set proc print data=silage; var animal percent; run; OBS ANIMAL PERCENT 1 Sheep 53.2 2 Sheep 53.6 3 Sheep 54.4 4 Sheep 56.2 5 Sheep 56.4 6 Sheep 57.8
Background image of page 8
Example 1: SAS output of modified data set (continued) 7 Sheep 61.9 8 Steers . 9 Steers 58.7 10 Steers 59.2 11 Steers 59.8 12 Steers 62.5 13 Steers 63.1 14 Steers 64.2
Background image of page 9

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

View Full DocumentRight Arrow Icon
OBS ANIMAL PERCENT 1 Sheep 57.8 2 Steers 64.2 3 Sheep 56.2 4 Steers 58.7 5 Sheep 61.9 6 Steers 63.1 7 Sheep 54.4 8 Steers 62.5 9 Sheep 53.6 10 Steers 59.8 11 Sheep 56.4 12 Steers 59.2 13 Sheep 53.2 Example 1: SAS output of modified data set
Background image of page 10
Example 1: SAS Program (continued) proc ttest data=silage; class animal; var percent; run;
Background image of page 11

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

View Full DocumentRight Arrow Icon
Example 1: SAS OUTPUT Some intermediate statistics Percent digestibility of corn silage TTEST PROCEDURE Variable: PERCENT Percent digestibility ANIMAL N Mean Std Dev Std Error ------------------------------------------------------------------------------------------------ Sheep 7 56.21428571 3.00245931 1.13482295 Steers 6 61.25000000 2.30195569 0.93976948
Background image of page 12
Example 1: SAS OUTPUT (continued) The t-test results Variances T DF Prob>|T| ------------------------------------------------------ Unequal -3.4177 10.9 0.0058 Equal -3.3442 11.0 0.0065 For H0: Variances are equal, F' = 1.70 DF = (6,5) Prob>F' = 0.5764
Background image of page 13

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

View Full DocumentRight Arrow Icon
Image of page 14
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2011 for the course EXST 7087 taught by Professor Wang,j during the Fall '08 term at LSU.

Page1 / 51

20PROC_TTest - Statistical Techniques I EXST7005 SAS PROC...

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

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