You are on page 1of 12

1/2012

Practica 2 DCA

EJEMPLO CUADERNO

options ls=76 ps=56;
data dca;
input dieta$ peso;
cards;
D1 142
D1 197
D1 195
D1 192
D1 154
D2 137
D2 169
D2 169
D2 95
D2 154
D3 55
D3 49
D3 42
D3 21
D3 52
D4 61
D4 112
D4 30
D4 89
D4 63
;
proc univariate normal plot;
var peso;
run;
proc glm;
class dieta;
model peso=dieta/ss3;
lsmeans dieta/stderr;
estimate "D1-D2" dieta 1 -1 0 0;
estmate "D2-D4" dieta 0 1 0 -1;
run;


The SAS System 46
17:05 Thursday, May 23, 2002

The UNIVARIATE Procedure
Variable: peso

Moments

N 20 Sum Weights 20
Mean 108.9 Sum Observations 2178
Std Deviation 60.0069294 Variance 3600.83158
Skewness 0.08915114 Kurtosis -1.5376575
Uncorrected SS 305600 Corrected SS 68415.8
Coeff Variation 55.1027818 Std Error Mean 13.4179573


Basic Statistical Measures

Location Variability

Mean 108.9000 Std Deviation 60.00693
Median 103.5000 Variance 3601
Mode 154.0000 Range 176.00000
Interquartile Range 108.00000

NOTE: The mode displayed is the smallest of 2 modes with a count of 2.
1/2012



Tests for Location: Mu0=0

Test -Statistic- -----p Value------

Student's t t 8.115989 Pr > |t| <.0001
Sign M 10 Pr >= |M| <.0001
Signed Rank S 105 Pr >= |S| <.0001


Tests for Normality

Test --Statistic--- -----p Value------

Shapiro-Wilk W 0.913827 Pr < W 0.0754
Kolmogorov-Smirnov D 0.177838 Pr > D 0.0945
Cramer-von Mises W-Sq 0.100527 Pr > W-Sq 0.1037
Anderson-Darling A-Sq 0.620038 Pr > A-Sq 0.0935


Quantiles (Definition 5)

Quantile Estimate

100% Max 197.0
99% 197.0
95% 196.0
90% 193.5
75% Q3 161.5
The SAS System 47
17:05 Thursday, May 23, 2002

The UNIVARIATE Procedure
Variable: peso

Quantiles (Definition 5)

Quantile Estimate

50% Median 103.5
25% Q1 53.5
10% 36.0
5% 25.5
1% 21.0
0% Min 21.0


Extreme Observations

----Lowest---- ----Highest---

Value Obs Value Obs

21 14 169 7
30 18 169 8
42 13 192 4
49 12 195 3
52 15 197 2



Stem Leaf # Boxplot
18 257 3 |
16 99 2 +-----+
14 244 3 | |
12 7 1 | |
10 2 1 *--+--*
8 95 2 | |
6 13 2 | |
4 2925 4 +-----+
2 10 2 |
----+----+----+----+
Multiply Stem.Leaf by 10**+1


The SAS System 48
17:05 Thursday, May 23, 2002

1/2012

The UNIVARIATE Procedure
Variable: peso

Normal Probability Plot
190+ *++*+ *
| * *++
| ** +++
| *+++
110+ ++*
| ++**
| ++++**
| *+* **
30+ * *++
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2



1/2012

The SAS System 49
17:05 Thursday, May 23, 2002

The GLM Procedure

Class Level Information

Class Levels Values

dieta 4 D1 D2 D3 D4


Number of observations 20
The SAS System 50
17:05 Thursday, May 23, 2002

The GLM Procedure

Dependent Variable: peso

Sum of
Source DF Squares Mean Square F Value Pr > F

Model 3 57328.20000 19109.40000 27.58 <.0001

Error 16 11087.60000 692.97500

Corrected Total 19 68415.80000


R-Square Coeff Var Root MSE peso Mean

0.837938 24.17302 26.32442 108.9000


Source DF Type III SS Mean Square F Value Pr > F

dieta 3 57328.20000 19109.40000 27.58 <.0001

1/2012



The GLM Procedure
Least Squares Means

Standard
dieta peso LSMEAN Error Pr > |t|

D1 176.000000 11.772638 <.0001
D2 144.800000 11.772638 <.0001
D3 43.800000 11.772638 0.0019
D4 71.000000 11.772638 <.0001


Dependent Variable: peso

Standard
Parameter Estimate Error t Value Pr > |t|

D1-D2 31.2000000 16.6490240 1.87 0.0793
D2-D4 73.8000000 16.6490240 4.43 0.0004



PRACTICA

options ls:76 ps:56;
data dca;
input conc porc;
cards;
0 5
0 0
0 10
0 5
50 50
50 55
50 50
50 45
100 70
100 85
100 75
100 65
150 80
150 90
150 85
150 75
;
proc univariate normal plot;
var porc;
run;
proc glm;
class conc;
model porc=conc/ss3;
lsmeans conc/stderr;
contrast "lin-con" conc -3 -1 1 3;
contrast "cua-con" conc 1 -1 -1 1;
run;








The SAS System 21:54 Wednesday, January 15, 2003 39

The UNIVARIATE Procedure
Variable: porc
1/2012


Moments

N 16 Sum Weights 16
Mean 52.8125 Sum Observations 845
Std Deviation 31.5155385 Variance 993.229167
Skewness -0.6765067 Kurtosis -1.0026528
Uncorrected SS 59525 Corrected SS 14898.4375
Coeff Variation 59.6743924 Std Error Mean 7.87888462


Basic Statistical Measures

Location Variability

Mean 52.81250 Std Deviation 31.51554
Median 60.00000 Variance 993.22917
Mode 5.00000 Range 90.00000
Interquartile Range 50.00000

NOTE: The mode displayed is the smallest of 4 modes with a count of 2.


Tests for Location: Mu0=0

Test -Statistic- -----p Value------

Student's t t 6.703043 Pr > |t| <.0001
Sign M 7.5 Pr >= |M| <.0001
Signed Rank S 60 Pr >= |S| <.0001


Tests for Normality

Test --Statistic--- -----p Value------

Shapiro-Wilk W 0.869136 Pr < W 0.0264
Kolmogorov-Smirnov D 0.162841 Pr > D >0.1500
Cramer-von Mises W-Sq 0.119302 Pr > W-Sq 0.0567
Anderson-Darling A-Sq 0.799926 Pr > A-Sq 0.0309


Quantiles (Definition 5)

Quantile Estimate

100% Max 90.0
99% 90.0
95% 90.0
90% 85.0
75% Q3 77.5
50% Median 60.0

1/2012

The SAS System 21:54 Wednesday, January 15, 2003 40

The UNIVARIATE Procedure
Variable: porc

Quantiles (Definition 5)

Quantile Estimate

25% Q1 27.5
10% 5.0
5% 0.0
1% 0.0
0% Min 0.0


Extreme Observations

----Lowest---- ----Highest---

Value Obs Value Obs

0 2 75 16
5 4 80 13
5 1 85 10
10 3 85 15
45 8 90 14


Stem Leaf # Boxplot
9 0 1 |
8 055 3 |
7 055 3 +-----+
6 5 1 *-----*
5 005 3 | + |
4 5 1 | |
3 | |
2 +-----+
1 0 1 |
0 055 3 |
----+----+----+----+
Multiply Stem.Leaf by 10**+1



1/2012

The SAS System 21:54 Wednesday, January 15, 2003 41

The UNIVARIATE Procedure
Variable: porc

Normal Probability Plot
95+ +++ *
| *+*+
| * * +++
65+ * +++
| * **+++
| * ++++
35+ +++
| +++
| +++ *
5+ * +++*
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2



1/2012

The SAS System 21:54 Wednesday, January 15, 2003 42

The GLM Procedure

Class Level Information

Class Levels Values

conc 4 0 50 100 150


Number of observations 16

1/2012

The SAS System 21:54 Wednesday, January 15, 2003 43

The GLM Procedure

Dependent Variable: porc

Sum of
Source DF Squares Mean Square F Value Pr > F

Model 3 14454.68750 4818.22917 130.30 <.0001

Error 12 443.75000 36.97917

Corrected Total 15 14898.43750


R-Square Coeff Var Root MSE porc Mean

0.970215 11.51441 6.081050 52.81250


Source DF Type III SS Mean Square F Value Pr > F

conc 3 14454.68750 4818.22917 130.30 <.0001

1/2012

The SAS System 21:54 Wednesday, January 15, 2003 44

The GLM Procedure
Least Squares Means

Standard
conc porc LSMEAN Error Pr > |t|

0 5.0000000 3.0405249 0.1260
50 50.0000000 3.0405249 <.0001
100 73.7500000 3.0405249 <.0001
150 82.5000000 3.0405249 <.0001

1/2012

The SAS System 21:54 Wednesday, January 15, 2003 45

The GLM Procedure

Dependent Variable: porc

Contrast DF Contrast SS Mean Square F Value Pr > F

lin-con 1 13132.81250 13132.81250 355.14 <.0001
cua-con 1 1314.06250 1314.06250 35.54 <.0001

You might also like