Docsity

Homework 4 - Notes for Statistical Programming | STA 402, Assignments of Statistics

Toggle sidebar
bg1
Homework 04
Assigned: 21 September 2007
Due: 01 October 2007
..\sta402\hw\Homework-04-05oct07.doc (*.pdf) – revised to clarify
questions
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: you might 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 of the CONDITION factor 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
pf2

Partial preview of the text

Download Homework 4 - Notes for Statistical Programming | STA 402 and more Assignments Statistics in PDF only on Docsity!

Homework 04

Assigned: 21 September 2007 Due: 01 October 2007 ..\sta402\hw\Homework-04-05oct07.doc (*.pdf) – revised to clarify questions

  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: you might 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 of the CONDITION factor 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 (GENMOD in SAS does this). Generate a plot of the observed counts vs. concentration with the model predictions superimposed. Use jitter to separate the points to clean up the plot (probably only want to jitter in the "conc" direction).

  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 deer hunting patterns in Ohio counties (displays included Maps), 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.