\documentclass[notitlepage,12pt]{article}
%twocolumn
\usepackage{epsfig}
\usepackage{fullpage,psfrag}
\usepackage{graphicx}
\usepackage{color}
\usepackage{subfigure}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{geometry}
%\usepackage{endfloat}
\usepackage{hyperref}


%\usepackage{loflot}
%\setstretch{0.8}

\textheight 8
in \oddsidemargin 0.03in \textwidth 6.0in
 \topmargin -.25in
\parskip .1in


\usepackage{natbib}

%\newcommand{\xv}{\mbox{\boldmath$x$}}
%\newcommand{\uv}{\mbox{\boldmath$u$}}
%\newcommand{\xiv}{\mbox{\boldmath$\xi$}}

\begin{document}
%\pagestyle{empty}

\begin{center}
FALL 2009\\
Stat 849: Homework Assignment 5\\
Due: December 11, 2009 \\
Total points = 400\\
\end{center}
\begin{enumerate}
\item In an experiment, the number of  Ceriodaphnia organisms are
counted in a controlled environment in which reproduction is
occurring among the organisms. The experimenter places into the
containers a varying concentration of a particular component of jet
fuel that impairs reproduction. Hence, it is expected that as the
concentration of jet fuel grows, the mean number of counts should
decrease. The experiment is done on two different strains and the
results are available in the \texttt{ceriodaphnia.txt} file from the
dataset. The  columns indicate:  number of organisms, the
concentration of jet fuel in grams per liter and the strain of the
organism. Build a generalized linear model (fit the models, provide
diagnostic plots, tests etc)  to study the effect of the fuel
concentration and strain type on the number of Ceriodaphnia
organisms.

\item The board of directors of a professional association conducted
a random sample survey of 30 members to assess the effects of
several possible amounts of dues increase. Two values are recorded:
(1) The dollar increase in annual dues posited in the survey
interview; (2) Whether or not the interviewee indicated that the
membership will not be renewed at that amount of dues. Consider
fitting a logistic regression model to these data treating (2) as
the response and (1) as the covariate.
\[Pr(\textnormal{Renew} | \textnormal{Amount in increase}) = logit(\beta_0 + \beta_1 (\textnormal{Amount in
increase})).\]
\begin{enumerate}
\item Find the maximum likelihood estimates of $\beta_0$ and
$\beta_1$ of the logistic regression model.

\item Obtain a scatter plot of the data with both the fitted
logistic response from part (a) and a lowess smooth superimposed.
Does the fitted logistic response function appear to fit well?

\item What is the interpretation of the $\hat{\beta}_1$?

\item What is the estimated probability that association members
will nor review their membership if the dues are increased by \$40?

\item Estimate the amount of dues increase for which 75 percent of
the members are expected not to renew their association membership?

\item Obtain an approximate 90 percent confidence interval for
$\exp(\beta)$. Interpret your interval.

\item Conduct a Wald test to determine whether dollar increase in
dues is related to the probability of membership renewal by using
$\alpha = 0.1$. State the null and alternative hypotheses, and
conclusion.

\item Conduct a likelihood ratio test to determine whether dollar increase in
dues is related to the probability of membership renewal by using
$\alpha = 0.1$. State the full and reduced models, and conclusion.
How does the result here compare to that obtained from the Wald test
in part (b)?

\end{enumerate}

\item In order to asses the appropriateness of  large sample
inferences for problem (2), employ the following parametric
bootstrap procedure.
\begin{itemize}
\item For each of the 30 cases, generate a Bernoulli outcome (0, 1)
using the estimated probability $\hat{\pi}_i$ for the original $X_i$
level according to the fitted model.

\item Fit the logistic regression model to the bootstrap sample and
obtain the bootstrap estimates $\hat{\beta}_0^*$ and
$\hat{\beta}_1^*.$

\item Repeat the above two steps  500 times. Compute the mean and standard
deviation of the 500 bootstrap estimates $\hat{\beta}_0^*$ and
$\hat{\beta}_1^*$.
\end{itemize}

\begin{enumerate}

\item Plot separate histograms of the bootstrap distributions of
$\hat{\beta}_0$ and $\hat{\beta}_1$. Are these distributions
approximately normal?

\item Compare the points estimates $\hat{\beta}_0$ and $\hat{\beta}_1$
and their estimated standard deviations obtained in the original fit
to the means and standard deviations of the bootstrap distributions.

\item Comment on the appropriateness of large sample inferences in
this dataset.

\end{enumerate}

\item A health insurance company collected information on 788 of its
subscribers who had made claims resulting from ischemic (coronary)
heart disease. Data were obtained on totals costs of services
provided for these 788 subscribers and the nature of the various
services for the period of January 1, 1998 through December 31,
1999. Each line in the dataset has identification number and
provides information on 9 other variables for each subscriber. The
10 variables are(in the order of columns that appear in the
dataset):
\begin{itemize}
\item Identification number: 1-788.
\item Total cost: Total cost of claims by subscriber (dollars).
\item Age: Age of subscriber (years).
\item Gender: Gender of subscriber: 1 = male, 0 = female.
\item Interventions: Total number of interventions or procedures
carried out.
\item Drugs: Number of tracked drugs prescribed.
\item Emergency room visits: Number of emergency room visits.
\item Complications: Number of other complications that arose during
heart disease treatment.
\item Comorbidities: Number of other diseases that the subscriber
had during period.
\item Duration: Number of days of duration of treatment condition.
\end{itemize}
 Consider modeling the number of emergency room visits as a
function of other variables in the dataset
\begin{enumerate}
\item Obtain the fitted Poisson model using all the variables. State
the estimated coefficients, their estimated standard errors, and the
estimated response function.

\item Comment on the adequacy of the fit of the Poisson regression
model based on the deviance residuals from the fit.

\item Can any of the predictors be dropped from the model? Explain.

\item Perform variable selection on this fit. State your final
model.
\end{enumerate}


\item Explicitly derive the maximum likelihood equations for fitting a
logistic regression model. \textit{Note: In the lecture, we derived
these in their most generic form. In this question, you will fill in
the gaps for logistic regression.}
\end{enumerate}

\end{document}
