Docsity

Brain Weight and Body Weight Data Analysis - Prof. A. John Bailer, Study notes of Statistics

Toggle sidebar
bg1
Number of Manatees killed regressed on the number of boats registered in Florida
The REG Procedure
Model: MODEL1
Dependent Variable: manatees
Week 04/05 Class Activities
File: week-04-05-19sep04.doc
Directory: C:\Documents and Settings\John Bailer\My Documents\
baileraj\Classes\Fall 2004\sta402\handouts
Based on:
C:\Documents and Settings\John Bailer\My Documents\baileraj\
Classes\Fall 2003\sta402\handouts\day10-and-11-17sep03.doc
AN INTRODUCTION TO STATISTICAL MODELING
* PROC REG for linear modeling (a very basic introduction)
* PROC GLM for anova models
Other normal response modeling
ANOVA – balanced anova models
Non-normal response modeling
GENMOD – generalized linear models
LOGISTIC – [grouped] binary regression
PROBIT – [grouped] binary regression (INVERSECL)
CATMOD – categorical data modeling
Failure time modeling
LIFEREG – accelerated failure time models
PHREG – Cox’s PH model
And more …
REGRESSION using PROC REG
Basic Model:
Yi = 0 +1Xi + i [“simple linear regression”]
14:19 Sunday, November 29, 2020 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42

Partial preview of the text

Download Brain Weight and Body Weight Data Analysis - Prof. A. John Bailer and more Study notes Statistics in PDF only on Docsity!

Number of Manatees killed regressed on the number of boats registered in Florida

The REG Procedure

Model: MODEL

Dependent Variable: manatees

Week 04/05 Class Activities

File: week-04-05-19sep04.doc

Directory: C:\Documents and Settings\John Bailer\My Documents\

baileraj\Classes\Fall 2004\sta402\handouts

Based on:

C:\Documents and Settings\John Bailer\My Documents\baileraj\

Classes\Fall 2003\sta402\handouts\day10-and-11-17sep03.doc

AN INTRODUCTION TO STATISTICAL MODELING

* PROC REG for linear modeling (a very basic introduction)

* PROC GLM for anova models

Other normal response modeling

ANOVA – balanced anova models

Non-normal response modeling

GENMOD – generalized linear models

LOGISTIC – [grouped] binary regression

PROBIT – [grouped] binary regression (INVERSECL)

CATMOD – categorical data modeling

Failure time modeling

LIFEREG – accelerated failure time models

PHREG – Cox’s PH model

And more …

REGRESSION using PROC REG

Basic Model:

Yi =  0 +  1 Xi +  i [“simple linear regression”]

14:19 Sunday, November 29, 2020 1

Number of Manatees killed regressed on the number of boats registered in Florida

The REG Procedure

Model: MODEL

Dependent Variable: manatees

=  0 +  1 Xi1 +  2 Xi2 +  3 Xi3 +  4 Xi4 +  5 Xi5 +  ij [“multiple linear regression”]

Error Assumption:

 ij ~ indep. N(0, ^2 )

i=1,2,…,n [observations]

example sas program that does simple linear regression

options ls=75;

data example1;

input year nboats manatees;

cards;

ODS RTF file='D:\baileraj\Classes\Fall 2003\sta402\SAS-programs\linreg- output.rtf’;

proc reg;

title ‘Number of Manatees killed regressed on the number of boats

registered in Florida’;

model manatees = nboats / p r cli clm;

plot manateesnboats=”o” p.nboats=”+” / overlay;

plot r.nboats r.p.;

run;

ODS RTF CLOSE;

14:19 Sunday, November 29, 2020 2

Number of Manatees killed regressed on the number of boats registered in Florida

The REG Procedure

Model: MODEL

Dependent Variable: manatees

Output Statistics Obs DepVar manatees Predicted Value StdError MeanPredict 95% CL Mean 95% CL Predict Residual StdError Residual Student Residual 1 13.0000 14.3827 1.9299 10.1779 18.5876 4.1604 24.6050 -1.3827 3.816 -0. 2 21.0000 16.0059 1.7974 12.0896 19.9222 5.8989 26.1130 4.9941 3.880 1. 3 24.0000 18.6280 1.5976 15.1472 22.1089 8.6816 28.5745 5.3720 3.967 1. 4 16.0000 20.7507 1.4528 17.5853 23.9161 10.9102 30.5911 -4.7507 4.022 -1. 5 24.0000 22.6236 1.3420 19.6997 25.5475 12.8582 32.3891 1.3764 4.060 0. 6 20.0000 22.4987 1.3488 19.5600 25.4375 12.7288 32.2687 -2.4987 4.058 -0. 7 15.0000 24.2468 1.2622 21.4968 26.9968 14.5320 33.9616 -9.2468 4.086 -2. 8 34.0000 28.3672 1.1482 25.8656 30.8689 18.7198 38.0147 5.6328 4.119 1. 9 33.0000 31.6137 1.1650 29.0753 34.1520 21.9566 41.2707 1.3863 4.115 0. 10 33.0000 35.2346 1.2909 32.4221 38.0472 25.5019 44.9673 -2.2346 4.077 -0. 11 39.0000 39.1054 1.5187 35.7963 42.4144 29.2178 48.9929 -0.1054 3.998 -0. 12 43.0000 42.8512 1.7974 38.9349 46.7675 32.7442 52.9582 0.1488 3.880 0. 13 50.0000 47.3462 2.1762 42.6048 52.0877 36.8917 57.8007 2.6538 3.681 0. 14 47.0000 48.3451 2.2647 43.4109 53.2794 37.8018 58.8884 -1.3451 3.628 -0. Output Statistics Obs -2-1^0 1 Cook's D 1 |^ |^ |^ 0. 2 |^ |^ |^ 0. 3 |^ |^ |^ 0. 4 |^ *|^ |^ 0. 5 |^ |^ |^ 0. 6 |^ |^ |^ 0. 7 |^ ****|^ |^ 0. 8 |^ |^ |^ 0. 9 |^ |^ |^ 0. 10 |^ |^ |^ 0. 11 |^ |^ |^ 0. 12 |^ |^ |^ 0. 13 |^ |^ |^ 0. 14 |^ |^ |^ 0.

14:19 Sunday, November 29, 2020 4

Number of Manatees killed regressed on the number of boats registered in Florida

The REG Procedure

Model: MODEL

Dependent Variable: manatees

Output Statistics Obs -2-1 0 1 2 Cook's D Sum of Residuals 0 Sum of Squared Residuals 219. Predicted Residual SS (PRESS) 281.

14:19 Sunday, November 29, 2020 5

brain wt - body wt data

Multiple Regression with indicator variables

Log(Brain Weight)i =  0 +  1 Log(Body Weight)i +  i

Log(Brain Weight)i =  0 +  1 Log(Body Weight)i +  2 Idinoi +  i

Log(Brain Weight)i =  0 +  1 Log(Body Weight)i +  2 Idinoi +  3 Idinoi ×Log(Body Weight)i +  i

data mrexample;

14:19 Sunday, November 29, 2020 8

brain wt - body wt data

plot r.*logbody; run;

ODS RTF CLOSE;

brain wt - body wt data

The UNIVARIATE Procedure

Variable: bodywt

BODY WEIGHT

Moments N 28 Sum Weights 28 Mean 4278.43875 Sum Observations 119796. Std Deviation 16480.4904 Variance 271606563 Skewness 5.03388585 Kurtosis 26. Uncorrected SS 7845918273 Corrected SS 7333377205 Coeff Variation 385.198698 Std Error Mean 3114. Quantiles(Definition5) Quantile Estimate 100% Max 87000. 99% 87000. 95% 11700. 90% 9400. 75% Q3 493. 50% Median 53. 25% Q1 2. 10% 0. 5% 0. 1% 0. 0% Min 0. Extreme Observations Lowest Highest Value species Obs Value species Obs 0.023 mouse 20 2547 asieleph 7 0.120 hamster 19 6654 afreleph 15 0.122 mole 27 9400 tricerat 16 0.280 rat 26 11700 diplodoc 6 1.040 guipig 5 87000 brachios 25

14:19 Sunday, November 29, 2020 11

brain wt - body wt data

allometric scaling - brain and body wt.

[All Species combined]

The REG Procedure

Model: MODEL

Dependent Variable: logbrain

Analysis of Variance Source DF Sumof Squares Mean Square F Value Pr>F Model 1 17.81230 17.81230 40.26 <. Error 26 11.50305 0. Corrected Total 27 29. Root MSE 0.66515 R-Square 0. Dependent Mean 1.92195 Adj R-Sq 0. Coeff Var 34. Parameter Estimates Variable DF Parameter Estimate Standard Error tValue Pr>|t| Intercept 1 1.10958 0.17942 6.18 <. logbody 1 0.49599 0.07817 6.35 <.

14:19 Sunday, November 29, 2020 13

brain wt - body wt data

Dinosaurs fitted with potentially different line

The REG Procedure

Model: MODEL

Dependent Variable: logbrain

Analysis of Variance Source DF Sumof Squares Mean Square F Value Pr>F Model 3 27.01211 9.00404 93.82 <. Error 24 2.30324 0. Corrected Total 27 29. Root MSE 0.30979 R-Square 0. Dependent Mean 1.92195 Adj R-Sq 0. Coeff Var 16. Parameter Estimates Variable DF Parameter Estimate Standard Error tValue Pr>|t| Intercept 1 0.93391 0.08562 10.91 <. logbody 1 0.75226 0.04493 16.74 <. idino 1 -0.91748 1.79054 -0.51 0. idinobod 1 -0.31441 0.41371 -0.76 0.

14:19 Sunday, November 29, 2020 16

brain wt - body wt data

Dinosaurs fitted with potentially different INTERCEPTS

The REG Procedure

Model: MODEL

Dependent Variable: logbrain

Analysis of Variance Source DF Sumof Squares Mean Square F Value Pr>F Model 2 26.95668 13.47834 142.86 <. Error 25 2.35867 0. Corrected Total 27 29. Root MSE 0.30716 R-Square 0. Dependent Mean 1.92195 Adj R-Sq 0. Coeff Var 15. Parameter Estimates Variable DF Parameter Estimate Standard Error tValue Pr>|t| Intercept 1 0.93879 0.08465 11.09 <. logbody 1 0.74855 0.04428 16.90 <. idino 1 -2.26674 0.23024 -9.84 <.

14:19 Sunday, November 29, 2020 19

  • 14:19 Sunday, November 29,
  • 14:19 Sunday, November 29,
  • 1 beaver 1.35 8.1 0.13033 0.90849 0 0. Obs species bodywt brainwt logbody logbrain idino idinobod
  • 2 cow 465.00 423.0 2.66745 2.62634 0 0.
  • 3 wolf 36.33 119.5 1.56027 2.07737 0 0.
  • 4 goat 27.66 115.0 1.44185 2.06070 0 0.
  • 5 guipig 1.04 5.5 0.01703 0.74036 0 0.
  • 6 diplodoc 11700.00 50.0 4.06819 1.69897 1 4.
  • 7 asieleph 2547.00 4603.0 3.40603 3.66304 0 0.
  • 8 donkey 187.10 419.0 2.27207 2.62221 0 0.
  • 9 horse 521.00 655.0 2.71684 2.81624 0 0.
  • 10 potarmon 10.00 115.0 1.00000 2.06070 0 0.
  • 11 cat 3.30 25.6 0.51851 1.40824 0 0.
  • 12 giraffe 529.00 680.0 2.72346 2.83251 0 0.
  • 13 gorilla 207.00 406.0 2.31597 2.60853 0 0.
  • 14 human 62.00 1320.0 1.79239 3.12057 0 0.
  • 15 afreleph 6654.00 5712.0 3.82308 3.75679 0 0.
  • 16 tricerat 9400.00 70.0 3.97313 1.84510 1 3.
  • 17 rhemonke 6.80 179.0 0.83251 2.25285 0 0.
  • 18 kangaroo 35.00 56.0 1.54407 1.74819 0 0.
  • 19 hamster 0.12 1.0 -0.92082 0.00000 0 0.
  • 20 mouse 0.02 0.4 -1.63827 -0.39794 0 0.
  • 21 rabbit 2.50 12.1 0.39794 1.08279 0 0.
  • 22 sheep 55.50 175.0 1.74429 2.24304 0 0.
  • 23 jaguar 100.00 157.0 2.00000 2.19590 0 0.
  • 24 chimp 52.16 440.0 1.71734 2.64345 0 0.
  • 25 brachios 87000.00 154.5 4.93952 2.18893 1 4.
  • 26 rat 0.28 1.9 -0.55284 0.27875 0 0.
  • 27 mole 0.12 3.0 -0.91364 0.47712 0 0.
  • 28 pig 192.00 180.0 2.28330 2.25527 0 0.
  • 14:19 Sunday, November 29,
  • 14:19 Sunday, November 29,
  • 14:19 Sunday, November 29,
  • 14:19 Sunday, November 29,
  • 14:19 Sunday, November 29,
  • 14:19 Sunday, November 29,