\documentclass[12pt]{article}
\textwidth = 7 in
\textheight = 9 in
\oddsidemargin = -0.5 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.0 in
\parskip = 0.2in
\parindent = 0.0in
\usepackage{graphics, graphicx, xcolor}
\usepackage{longtable, rotating}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{wrapfig}

\def\sgn{{\rm sign}}
\def\drightarrow{{\stackrel{d}{\rightarrow}}}

\def\dotsim{\stackrel{.}{\sim}}
\def\goesd{\stackrel{{\cal L}}{\longrightarrow}}
\def\vp{{\varphi}}
\def\E{{\rm E}}
\def\Pvalue{{$p$-value}}
\def\Pvalues{{$p$-values}}
\def\pr{{\rm pr}}
\def\Pr{{\rm pr}}
\def\logit{{\rm logit}}
\def\T{{ \mathrm{\scriptscriptstyle T} }}
\def\blue{\color{blue}}
\def\red{\color{red}}

\usepackage{hyperref}

\begin{document}
{\bf STA 2201S  Homework 3.} 
\vspace{-0.5in}
\begin{flushright}{\em due Wednesday April 1 2015 at 11.59pm on Blackboard}\end{flushright}

Usual preamble (see HW 2)
%\noindent{When answering questions requiring numerical work, the results are to be reported in a narrative summary, in your own words.  Tables and Figures may be included, but must be formatted along with the text.  Do not include raw \texttt{R} code as part of your answer.  An exception can be made if 
%you are using {\tt knitr} or {\tt rmd}:  code chunk displays in text are permitted.  A complete set of scripts should be provided as an appendix.  }
%
\begin{enumerate}
\item {\em Faraway, Exercise 10.1}.
The {\tt ohio} data concern 536 children from Steubenville, Ohio, and were taken as part of a study on the health effects of air pollution. Children were in the study for four years from age seven to ten.  The response was whether they wheezed or not. The variables are:
\begin{quote}
{\tt resp}: an indicator of wheeze status (1 = yes, 0 = no)\\
{\tt id}: an identifier for the child\\
{\tt age}: 7 years = $-2$, 8 years = $-1$, 9 years = 0, 10 yrs = 1\\
{\tt smoke}: an indicator of maternal smoking at the first year of the study \\(1 = smoker, 0 = nonsmoker)
\end{quote}
\begin{enumerate}
\item Fit an appropriate GEE model and determine the effects of age and maternal smoking on wheezing.
\item What is the predicted probability that a 7 year-old with a smoking mother wheezes?
\item Analyse the data using a GLM, with a separate intercept for each subject.  Then analyze the data using a GLM but treating all the observations as independent (i.e.~ignoring {\tt id}.) Indicate how the conclusions change, and which set of results seem most appropriate for assessing the effect of maternal smoking on wheeze.
\item Sum the number of times wheezing is recorded for a child over the four measurements and model this as a function of the smoking status of the mother.\footnote{ \texttt{R} code for this is provided in the textbook.}  Now determine the effect of smoking on the response.  Compare this result to the previous analyses and discuss which is preferable.
\end{enumerate}

\item {\em Faraway, Exercise 11.2}. The dataset {\tt uswages} was drawn as a sample from the Current Population Survey in 1988. The response is {\tt wage},  weekly wages in dollars (adjusted for inflation), and the other variables in the data set are {\tt educ}, years of education, {\tt exper}, years of experience, {\tt race} (1 Black/ 0 White), {\tt smsa} (1 if living in a standard metropolitan statistical area/ 0 if not),  a set of dummy variables to indicate region of employment ({\tt ne, mw, we, so}), and a dummy variable to indicate part-time work ({\tt pt}).  Of interest is how years of education are associated with wages, and whether this effect is different in different subgroups determined by the other variables.
\begin{enumerate}

\item Using {\tt wage} as the response, fit one or more semi-parametric regression models, with smooth functions of education (and possibly experience), and including relevant dummy variables as appropriate. Choose the method, and model for that method, that you prefer, and summarize the results.
\item Fit a parametric model to {\tt wage} or a transformation of {\tt wage} and compare the results to those of the semi-parametric model that you chose in (a).
\item Faraway suggests smoothing the square root of the absolute value of the residuals from the semi-parametric model fit, and smoothing these as a function of {\tt educ}. Why do you think he suggested this?
\end{enumerate}


\item The article ``Cognitive control in media multitaskers" by Ophir, Nass and Wagner ({\em PNAS}, 2009) is widely quoted as evidence that we are not as good at multi-tasking as we think.  The authors report on a set of experiments involving different tasks: a filtering task, a continuous performance task, and a set of `two- or three- back tasks'.  This question concerns only the first, filtering task.  
\begin{enumerate}
\item
The authors' state ``Repeated-measures ANOVA revealed a group$\times$distractor level interaction, $F(1,39) = 4.61, P < 0.04$".  Write down an algebraic form for a linear model for the response, $K$\footnote{a measure of performance described in the Materials and Methods supplement}, as a function of the relevant covariates, and describe how you think the $F$-statistic was computed.  Why is the denominator degrees of freedom for the $F$-test equal to 39? 
\item Figure 1B is presented as evidence of the interaction effect.  How does this plot indicate interaction? Is the model and associated degrees of freedom in (a) consistent  with this plot?
\item In the Discussion the authors write "The present research suggests that individuals who frequently use multiple media approach fundamental information processing activities differently than do those who consume multiple media streams much less frequently." Do you think they have demonstrated this convincingly? If not, what further information do you think would be useful?
\end{enumerate}

\item {\em Measurement error in regression:}
Suppose $y$ depends on $x$ in a simple linear regression :
$$
y_i = \beta_0 + \beta_1 x_i + \epsilon_j, \quad i= 1, \dots, n; \, \epsilon \sim(0, \sigma^2_e), \, x_i \sim (\mu_x, \sigma^2_x).
$$
Instead of observing $x_i$, we are only able to observe a corrupted value
$w_i = x_i + u_i$, where $u_i$ is independent of $x_i$, and $u_i \sim (0, \sigma^2_u)$.
The least squares estimator from this regression
$$\hat\beta_1 = \Sigma(y_i - \bar y)(w_i - \bar w)/\Sigma (w_i-\bar w)^2.\footnote{you don't need to show this}$$ 
Find an expression for the limit in probability of $\hat\beta$ and thus deduce that it will normally be an under-estimate of the true regression coefficient $\beta$. In what special circumstance will it be consistent for $\beta$?

Usually this result is relied on to argue that if there is uncertainty in the $x$'s used in a given regression, the association with the response will be attenuated, i.e.~less likely to be significantly different from zero.
Diggle, Liang \& Zeger\footnote{Analysis of Longitudinal Data (2002) Oxford, Ch.~7.4} show for logistic regression that the estimate from the marginal model of GEE is approximately $(c^2 \nu^2+1)^{-1/2}$ times the estimate from a random effects model, where $\nu^2$ is the variance of the random effect, and $c^2$ is approximately $0.346$.
\end{enumerate}
\end{document}
