ST750 -- Fall 2010 Homework #5 -- due Tuesday, 26 October 2010 Exercises in Textbook: (*just turn in these) 9.13*, 9.15* R Exercises: *1) Fit a nonlinear regression model to the data in one of the files "ccl4d1r1.dat" through "ccl4d4r3.dat" (dirj for dosage level i and rat j) using your birth month. (Jan use d1r1; Feb use d1r2; Aug use d3r2; Dec use d4r3). The files are in the directory "ccl4" have times (ti)(hours) and drug concentrations (yi)(ng/ml) in a toxicology trial. The data are from Evans, et al. (1994) and obtained courtesy of Dr. Woodrow Setzer of EPA. Fit a model of the form Yi dist Normal(f(ti), sigma^2) where f(t) = a*exp(-b*t) + c*exp(-d*t) Note that getting starting values can be a challenge. Let b > d so that the first term decays more quickly. So for large values of t, fit just the second term -- just transform Yi and do a simple linear regression. Then adjust the response and fit the first group of observations for the first piece. a) Find the nonlinear least squares estimators of the parameters and report the standard errors. b) Compute sandwich standard errors using the C4 expression on p.224. (You can drop the T(betahat) terms to simplify.) c) Fit the data for the next (1->2,2->3,3->1) rat and do a likelihood ratio test whether the parameters (a,b,c,d) are the same in both rats. *2) Fit a Poisson regression model to the data in the file "rbmites.dat" where the first column is Y and the next two columns are covariates X1 and X2 (include an intercept). Do the computations (find MLE's and stderrs) either coding IRWLS or using nlm. (Use glm *ONLY* for checking your results.)