\documentclass[12pt]{article}
% SOLUTIONS
\newcommand{\solution}{\underline{Solution:} \\}
%\newcommand{\solution}[1]{}
% MARGINS
\topmargin 0.5in
\setlength{\topmargin}{0.0in}
\setlength{\oddsidemargin}{-0.3in}
\setlength{\textwidth}{6.6in}
\setlength{\textheight}{9in}
% TITLE
\begin{document}
\begin{center}
\section*{Stat 536 Homework 3}
Due: 9/22/08
\end{center}
\begin{enumerate}
\item \label{} Consider two estimators for within-person gene correlation $f$: (1) MLE $\hat f$ and (2) MOM $\tilde f$. In this problem, you study possible differences between these two estimators in the two-allele case.
\begin{enumerate}
\item Using a rough argument, find a choice of allele frequency $p$ and $f$ for which you would have $80$\% power to reject $H_0: f=0$ given a sample of size $n=100$. [Hint: Use the results for $D_1$ and your choice of allele frequencies, then convert from $D_1$ to $f$ and assume that the power argument transfers to a test of $H_0: f=0$.]
\item Generate multiple simulated datasets using the $p$ and $f$ identified in part (a). Each dataset is like one random sample from a hypothetical population at HW disequilibrium. For each dataset, estimate $\hat f$ and $\tilde f$, and use these estimates to answer the question whether one estimator is better than the other. Recall that we prefer unbiased estimators and those with smaller variance.
\end{enumerate}
[Hint: You can generate simulated data with \texttt{R} code
\[
\mbox{\texttt{n.ij <- rmultinom(n=1, size=100, prob=c(P.AA,P.Aa,P.aa))}}
\]
after computing the population genotype proportions \texttt{P.AA, P.Aa}, and \texttt{P.aa} according to the selected model.]
\solution{%
}
\item \label{} Follow the WinBUGS tutorial (linked separately) to estimate the additive HW disequilibrium parameters $D_{uv}$ for the data below.
\begin{center}
\begin{tabular}{l|llllllllll}
Genotype & $AA$ & $BB$ & $CC$ & $DD$ & $AB$ & $AC$ & $AD$ & $BC$ & $BD$ & $CD$ \\
\hline
Count $n_{xy}$ & 101 & 430 & 329 & 568 & 103 & 214 & 74 & 99 & 65 & 402 \\
\hline
\end{tabular}
\end{center}
\begin{enumerate}
\item Report the posterior mean and 95\% credible sets for each parameter $D_{uv}$.
\item Retool the above example to estimate $f_{uv}$ and provide posterior means and credible sets for these parameters.
\item Compare the full model with distinct $f_{uv}$ to the model with $f_{uv} = f$ for all $u,v$ using the DIC.
\item Write a short discussion about this data analysis, answering the following questions.
\begin{enumerate}
\item Is there evidence to reject HWE? What about the hypothesis of homogeneity, i.e. $f_{uv}=f$?
\item How would you construct a likelihood ratio test for homogeneity? What is the asymptotic sampling distribution?
\item Could you have computed an exact probability for testing HWE? How would you compute it, using what tools? Could exact tests be used to test homogeneity?
\item Could you have tested the homogeneity of disequilibrium using the $D_{uv}$ model? If so, write down the constrained model.
\end{enumerate}
\end{enumerate}
\solution{%
}
\end{enumerate}
\end{document}