Homework Assignment for Statistics Class: Regression Analysis and ANOVA Model Comparison, Assignments of Statistics

A statistics homework assignment from the fall 2004 semester. The assignment includes tasks related to regression analysis using the manatee-boat registration data and comparing the one-way anova model to regression with coding for a log-bacterial growth study. Other topics include fitting a regression model with a linear and quadratic term using the square root of 'total' as the response variable, summarizing a modeling proc in sas, and brainstorming project ideas.

Typology: Assignments

Pre 2010

Uploaded on 08/18/2009

koofers-user-zpy
koofers-user-zpy 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Homework 04
Assigned: 19 September 2005
Due: 26 September 2005
C:\baileraj\Classes\Fall 2004\sta402\hw\Homework-04-19sep05.doc
1. Repeat the regression analysis of the Manatee – Boat registration data
a. Fit the model MANATEE = 00 +1 NBOATSi + i
b. Fit the model MANATEE = 01 +1 [NBOATSNBOATSi-min(NBOATS)] + ] + i
c. Fit the model MANATEE = 02 +1[NBOATSNBOATSi-average(NBOATS)] + ] + i
Prepare a table summarizing the estimated regression coefficients, standard errors, P-values for
these three models. Hint: use ODS output to manipulate the coefficient information.
2. Refer to the 4 group (packaging method)- log-bacterial growth study. In this exercise, you will
compare the one-way anova model to regression with coding.
a. Fit the anova model and obtain the estimated effects (estimates of , 1, 2, 3, 4) using
SOLUTION option to the GLM model statement.
proc glm data=meat order=data;
title2 fitting the one-way anova model via GLM;
class condition;
model logcount = condition/solution;
means condition;
run;
b. Define 4 indicator variables, one for each of the conditions. For example, let ICO2 = 1 if
condition=”CO2” and ICO2=0 otherwise. Define the other 3 indicator variables similarly.
c. Can you fit a regression model with all indicator variables included? If so, how?
d. Fit 4 different regression models with 3 of the 4 indicator variables. Which fit matches the
solution from part a? What does this tell you about the coding in the model fit from part 2a?
model logcount = IPlastic IVacuum IMixed;
model logcount = IPlastic IVacuum ICO2;
model logcount = IPlastic IMixed ICO2;
model logcount = IVacuum IMixed ICO2;
3. Fit a regression model with a linear and a quadratic term to the nitrofen data using the square
root of “total” as the response variable. As an aside, the square root transformation is a
normalizing transformation for Poisson data and is often performed prior to fitting models
that assume normal error terms. By the way, an alternative that might be even better than
ordinary regression with square root transformed counts is the generalized linear model with
pf2

Partial preview of the text

Download Homework Assignment for Statistics Class: Regression Analysis and ANOVA Model Comparison and more Assignments Statistics in PDF only on Docsity!

Homework 04

Assigned: 19 September 2005 Due: 26 September 2005 C:\baileraj\Classes\Fall 2004\sta402\hw\Homework-04-19sep05.doc

  1. Repeat the regression analysis of the Manatee – Boat registration data a. Fit the model MANATEE =  00 +  1 NBOATSi +i b. Fit the model MANATEE =  01 +  1 [NBOATSNBOATSi-min(NBOATS)] + ] +i c. Fit the model MANATEE =  02 +  1 [NBOATSNBOATSi-average(NBOATS)] + ] +i Prepare a table summarizing the estimated regression coefficients, standard errors, P-values for these three models. Hint: use ODS output to manipulate the coefficient information.
  2. Refer to the 4 group (packaging method)- log-bacterial growth study. In this exercise, you will compare the one-way anova model to regression with coding. a. Fit the anova model and obtain the estimated effects (estimates of ,  1 ,  2 ,  3 ,  4 ) using SOLUTION option to the GLM model statement. proc glm data=meat order=data; title2 fitting the one-way anova model via GLM; class condition; model logcount = condition/solution; means condition; run ; b. Define 4 indicator variables, one for each of the conditions. For example, let ICO2 = 1 if condition=”CO2” and ICO2=0 otherwise. Define the other 3 indicator variables similarly. c. Can you fit a regression model with all indicator variables included? If so, how? d. Fit 4 different regression models with 3 of the 4 indicator variables. Which fit matches the solution from part a? What does this tell you about the coding in the model fit from part 2a? model logcount = IPlastic IVacuum IMixed; model logcount = IPlastic IVacuum ICO2; model logcount = IPlastic IMixed ICO2; model logcount = IVacuum IMixed ICO2;
  3. Fit a regression model with a linear and a quadratic term to the nitrofen data using the square root of “total” as the response variable. As an aside, the square root transformation is a normalizing transformation for Poisson data and is often performed prior to fitting models that assume normal error terms. By the way, an alternative that might be even better than ordinary regression with square root transformed counts is the generalized linear model with

a log link and a Poisson distribution. Generate a plot of the observed counts and the model predictions. Use jitter to separate the points to clean up the plot.

  1. Pick one modeling PROC in SAS and summarize what it does and its basic syntax. As an example, folks in regression might be interested in looking at LOESS or NLIN or LOGISTIC. Folks interested in how complex surveys may impact regression might look at SURVEYREG.
  2. [PROJECT] Now is the time to start thinking about what you might do as part of a project for class. In the past, students have simulated games (a variation of Texas Hold ‘em), analyzed an economic data set to look at wage disparity, simulated a likelihood ratio test for step-stress experiments (looking at Type I error rates and power), and compared OLS/WLS for regression data with unequal variances (comparing standard errors). Include a short paragraph describing at least one possible project idea. Feel free to stop by my office to brainstorm about ideas.