Lecture 30—Monday, March 6, 2006

What was covered?

Terminology defined

Testing linear combinations of regression parameters

type.f<-factor(type,label=c('nonecho bats','birds','echo bats'))
contrasts(type.f)

             birds echo bats
nonecho bats     0         0
birds            1         0
echo bats        0         1
new.model<-lm(log(energy)~log(mass)+type.f, data=bats)

This fits the model shown below.


> summary(new.model,corr=F)

Call:
lm(formula = log(energy) ~ log(mass) + type.f)

Residuals:
     Min       1Q   Median      3Q     Max
-0.23224 -0.12199 -0.03637 0.12574 0.34457

Coefficients:
                Estimate Std. Error t value  Pr(>|t|)
(Intercept)     -1.57636    0.28724  -5.488 4.96e-05 ***
log(mass)        0.81496    0.04454  18.297 3.76e-12 ***
type.fbirds      0.10226    0.11418   0.896 0.384
type.fecho bats  0.07866    0.20268   0.388 0.703
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.186 on 16 degrees of freedom
Multiple R-Squared: 0.9815, Adjusted R-squared: 0.9781
F-statistic: 283.6 on 3 and 16 DF, p-value: 4.464e-14

We can apply this basic formula to test H0: β2β3 = 0, but to do so we need an estimate of β2β3 and its standard error.

Here the ci are just numbers while the βi are the parameters of interest.

Thus we see that the terms we need define the submatrix occupying rows 3 through 4 and column 3 through 4 of this matrix.

Using a dummy coding scheme to test specific research hypotheses

Group
Regressor 1
Regressor 2
nonecho bats
1
1
birds
–2
0
echo bats
1
–1

Cited Reference

Course Home Page


Jack Weiss
Phone: (919) 962-5930
E-Mail: jack_weiss@unc.edu
Address: Curriculum in Ecology, Box 3275, University of North Carolina, Chapel Hill, 27516
Copyright © 2006
Last Revised--March 18, 2006
URL: http://www.unc.edu/courses/2006spring/ecol/145/001/docs/lectures/lecture30.htm