{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hier - Hierarchical Regression Models Ho Chapter 11 NC...

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

Hierarchical Regression Models Hoff Chapter 11 November 19, 2010

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

View Full Document
NC Mercury in Fish data Length (cm) [Mercury] (ppm) 0 1 2 3 30 40 50 60 0 1 30 40 50 60 2 3 4 5 6 0 1 2 3 7 0 1 2 3 8 9 10 11 12 30 40 50 60 13 14 30 40 50 60 0 1 2 3 15
Models Consider the following models for log MERCURY as a function of log LENGTH: 1. log MERCURY ij = β 0 + β 1 log LENGTH ij (common line for all stations) 2. log MERCURY ij = β 0 j + β 1 log LENGTH ij (parallel regression lines) 3. log MERCURY ij = β 0 j + β 1 j log LENGTH ij (separate lines for each station) Use ANOVA to compare the 3 models

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

View Full Document
Fitting Models with Categorical Predictors in R fish\$S = factor(fish\$STATION) # convert to categorical fish.com = lm(log(MERCURY) ~ 1 + log(LENGTH), data=fish) fish.par = lm(log(MERCURY) ~ S + log(LENGTH), data=fish) fish.dif = lm(log(MERCURY) ~ S*log(LENGTH), data=fish) anova(fish.com, fish.par, fish.dif) Analysis of Variance Table Model 1: log(MERCURY) ~ 1 + log(LENGTH) Model 2: log(MERCURY) ~ S + log(LENGTH) Model 3: log(MERCURY) ~ S * log(LENGTH) Res.Df RSS Df Sum of Sq F Pr(>F) 1 169 41.621 2 154 23.974 15 17.648 8.1515 5.051e-13 *** 3 139 20.062 15 3.912 1.8070 0.03918 * --- Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern