%  This is file "newcomms.tex" created on 4/17/97 by Eric C. Anderson
%  It contains all the definitions of new commands for my thesis and 
%  a few extra ones that are just leftover from various places.


\newcommand{\pone}{\ensuremath{\mathbf{p}_A}}
\newcommand{\ptwo}{\ensuremath{\mathbf{p}_B}}
\newcommand{\xone}{\ensuremath{\mathbf{x}_A}}
\newcommand{\xtwo}{\ensuremath{\mathbf{x}_B}}
\newcommand{\qone}{\ensuremath{\mathbf{q}_A}}
\newcommand{\qtwo}{\ensuremath{\mathbf{q}_B}}
\newcommand{\ctrans}{\ensuremath{\phi}}
\newcommand{\ctransone}{\ensuremath{\ctrans (\qone,\pone)}}
\newcommand{\ctranstwo}{\ensuremath{\ctrans (\qtwo,\ptwo)}}
\newcommand{\fumes}{\ensuremath{\mathcal{S}}}
\newcommand{\cf}{{\em cf.}\xspace }
\newcommand{\eg}{{\em e.g.},\xspace }
\newcommand{\ie}{{\em i.e.},\xspace }
\newcommand{\etal}{{\em et al.}\ }
\newcommand{\etc}{{\em etc.}\@\xspace}
\newcommand{\support}{\mathbf{\mathcal{S}}} % This is the S for "Support"
\newcommand{\like}{L} % This is the L for "Likelihood"
\newcommand{\cgeno}{p} %This is the probability g for the vector of complete genotype
\newcommand{\bthetahat}{\mathbf{\hat{\Theta }}}
\newcommand{\mix}{\ensuremath{m}}
\newcommand{\locus}[1]{\mbox{\textsl{#1}$^*$}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Cov}{\mathrm{Cov}}


%%%  Some Characters in My Figures  %%%%%%%
\newcommand{\xlocircle}{\protect\makebox[1.15ex][l]{\includegraphics*{opencircle.eps}}}
\newcommand{\xlclsdmnd}{\protect\makebox[1.4ex][l]{\includegraphics*{clsdmnd.eps}}}
\newcommand{\xlopentri}{\protect\makebox[1.4ex][l]{\includegraphics*{opentri.eps}}}
\newcommand{\xlbullet}{\protect\makebox[1.3ex][l]{\includegraphics*{bullet.eps}}}


%% Some changes so that all my citations are of a "shortcite" style. %%
\renewcommand{\cite}{\shortcite}
\renewcommand{\citeN}{\shortciteN}
\renewcommand{\citeNP}{\shortciteNP}
\renewcommand{\citeA}{\shortciteA}
\renewcommand{\citeANP}{\shortciteANP}

%% Some table stuff
\newcolumntype{f}{D{.}{.}{4}}
\newcolumntype{q}{D{x}{}{-1}}
\newcommand{\mcn}{\multicolumn}

%%  A marginlabel command.
\newcommand{\marginlabel}[1]
						{\mbox{}\marginpar{\scriptsize\raggedleft\hspace{0pt}#1}}


\newlength{\grheight}  %heights of all those graphs
\setlength{\grheight}{1.8in}
\newlength{\fixheight}  %heights of fixprob and deltas graphs
\setlength{\fixheight}{73.9mm}
\newcommand{\allele}[1]{\textsl{#1}}


\newcolumntype{j}{D{.}{.}{3}}  % for the longtables in appendix.
\newcolumntype{k}{D{,}{,}{3}}
% to mark cultus population sizes that are made up
\newcommand{\fake}{\makebox[0pt]{\hspace{.75ex}$^*$}}   
										

%% Environment for MY PROGramS  in the appendix  %%
\newenvironment{myprogs}{\renewcommand{\baselinestretch}{1.0}%
            \small}%
       {\renewcommand{\baselinestretch}{1.5}%
            \normalsize}



% New commands for chapter 4 
\newcommand{\sources}{\ensuremath{\mathcal{S}}}
\newcommand{\loci}{\ensuremath{\mathcal{L}}}
\newcommand{\alles}{\ensuremath{\mathcal{R}_j}}

%extra newcommands
\newcommand{\bY}{\ensuremath{\mathbf{Y}}\xspace}
\newcommand{\bX}{\ensuremath{\mathbf{X}}\xspace}
\newcommand{\bx}{\ensuremath{\mathbf{x}}\xspace}
\newcommand{\by}{\ensuremath{\mathbf{y}}\xspace}
\newcommand{\thh}{{^\mathrm{th}}}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}

%%  Names of the different F-based estimators:
\newcommand{\wmch}{ACE}
\newcommand{\PE}{PE}



%Some forwards-backwards notations
% some newcommands for this section
\def\bmstyle#1#2{\mbox{\boldmath$#1#2$}}
\def\bm#1{\mathpalette\bmstyle{#1}}
\newcommand{\myparam}{N}
\newcommand{\nofix}{\mathbf{\nabla}_\bY}
\newcommand{\ycond}{\mathbf{\xi}_\bY}
\newcommand{\notzero}{\kappa}
\newcommand{\zorone}{\delta}
\newcommand{\xnofix}[1][1]{\mathcal{X}_{#1}(\nofix)}
\newcommand{\binseq}{\mathcal{B}}
\newcommand{\bico}[2]{\left(\begin{array}{c}#1 \\ #2\end{array}\right)}
\newcommand{\smallbico}[2]{\biggl(\begin{array}{c}#1 \\ #2\end{array}\biggr)}
\newcommand{\totbinseq}{\mathcal{G}}
\newcommand{\Normal}{\mathcal{N}}
\newcommand{\btX}{ {\bm X} }
\newcommand{\btx}{ {\bm x} }
\newcommand{\btY}{ {\bm Y} }
\newcommand{\bty}{ {\bm y} }
\newcommand{\btz}{ {\bm z} }
\newcommand{\btb}{ {\bm b} }
\newcommand{\btB}{ {\bm B} }
\newcommand{\btw}{ {\bm w} }
\newcommand{\btN}{ {\bm N} }
\newcommand{\btS}{ {\bm S} }
\newcommand{\xprior}{\pi}
\newcommand{\realprob}{\mathcal{Q}}
\newcommand{\totalleles}{K}
\newcommand{\rubout}[1]{}


\def\bmstyle#1#2{\mbox{\boldmath$#1#2$}}
\def\bm#1{\mathpalette\bmstyle{#1}}
\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}

\newcommand{\apost}{^*}
\newcommand{\Exp}{\mathbb{E}}
\renewcommand{\myparam}{ {N_e}}
\newcommand{\tprod}{\textstyle\prod}



%% Some newcommands for the Overlapping Generations Importance Sampling
%% section.  
\newcommand{\oneyear}[1]{\begin{array}{c}
X_{#1,1} \\ \mbox{} \\ \hspace*{1em}X_{#1,2} \\ \\  \\ \\ 
Y_{#1}
\end{array}}
\newcommand{\bmu}{\bm{\mu}}
\newcommand{\bSigma}{\bm{\Sigma}}
\newcommand{\bw}{\mathbf{w}}
\newcommand{\bA}{\mathbf{A}}
\newcommand{\bgamma}{\bm{\gamma}}
\newcommand{\bphi}{\bm{\phi}}
\newcommand{\bL}{\mathbf{L}}
\newcommand{\tpose}{^\prime}
\newcommand{\bz}{\mathbf{z}}


\newcommand{\bigdot}{\bullet}



%% Some newcommands for the Mixture/Admixture Chapter
%% which was originally an article submitted to JABES.
\newcommand{\Dir}{\mathrm{Dir}}
\newcommand{\ceil}[1]{\lceil #1 \rceil}
\newcommand{\modtwo}{\mathrm{[mod~2]}}
\newcommand{\thetaof}[2]{\theta \langle #1;#2\rangle}
\newcommand{\Mpa}{M_\mathrm{P,A}}
\newcommand{\Ma}{M_\mathrm{A}}
\newcommand{\rjaccept}{\mathcal{A}}
%% Here are some hand-formatted bibliography reference list entries.
%% The command should be included in the NOTE field of the entry in the .bib file
\newcommand{\RafteryDiscByHand}{Discussion of ``Model determination using predictive distributions
			   with implementation via sampling-based methods,'' by \textsc{A.~E~Gelfand},
\textsc{D.~K.~Dey}, and \textsc{H.~Chang}, in {\em Bayesian Statistics
  4}, eds. \textsc{J.~M. Bernardo}, \textsc{J.~O. Berger}, \textsc{A.~P. Dawid}, and
\textsc{A.~F.~M.
  Smith}, Oxford: Oxford University Press, pp.~147--167. }

%% Commands for the Overlapping Chapter:
\newcommand{\Ages}{\mathcal{A}}


%%% Some commands for the cutthroat/steelhead chapter
\newcommand{\twoblack}{\lower.13ex\hbox{\includegraphics[height=1.7ex]{twoblack.eps}}}
\newcommand{\oneblack}{\lower.13ex\hbox{\includegraphics[height=1.7ex]{oneblack.eps}}}
\newcommand{\oneblacktwo}{\lower.13ex\hbox{\includegraphics[height=1.7ex]{oneblack2.eps}}}
\newcommand{\noblack}{\lower.13ex\hbox{\includegraphics[height=1.7ex]{noblack.eps}}}


%% macros for different symbols for the stuff in the overlapping urn model
\newcommand{\CA}{C}
\newcommand{\CG}{J}
\newcommand{\SA}{S}
\newcommand{\SG}{R}
\newcommand{\YA}{\bY}
\newcommand{\XA}{\bX}
\newcommand{\XG}{{\mathbf{W}}}
\newcommand{\SRA}{\varphi}
\newcommand{\SRG}{\psi}
\newcommand{\syset}{{\mathcal{S}_\YA}}
\newcommand{\szset}{{\mathcal{R}_\bZ}}
\newcommand{\btZ}{ {\bm Z} }
\newcommand{\btW}{ {\bm W} }
\newcommand{\bZ}{\mathbf{Z}}
\newcommand{\bW}{\mathbf{W}}
\newcommand{\fitness}{\gamma}
\newcommand{\bfitness}{ {\bm \gamma}}
\newcommand{\bg}{ {\bm g} }


\newcommand{\btheta}{\bTheta}
\newcommand{\bttheta}{\bm{\theta}}
\newcommand{\bTheta}{\bm{\Theta}}
\newcommand{\bpi}{\bm{\pi}}
\newcommand{\btQ}{\bm{Q}}
\newcommand{\bQ}{ \mathbf{Q} }
\newcommand{\btV}{\bm{V}}
\newcommand{\bG}{ \mathbf{G} }
\newcommand{\btG}{\bm{G}}
\newcommand{\btf}{\bm{f}}
\newcommand{\blambda}{{\bm{\lambda}}}


\addtolength{\jot}{1.7ex}

%% Stuff from the Monte Carlo lecture I gave,  might
%% need it for the introduction section

\newcommand{\meang}{\widetilde{g_n}(x)}
\newcommand{\Meang}{\widetilde{g_n}(X)}
\newcommand{\ind}{\mathcal{I}}
\newcommand{\gh}{\widetilde{g_n^h}}
\newcounter{example}
\setcounter{example}{1}
\newcounter{digression}
\setcounter{digression}{1}
\renewcommand\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\textit{#1}}
\newenvironment{example}[1]{\noindent
\textsc{Theorem~\Roman{example}:
#1}\\ \indent} {\refstepcounter{example}}
\newenvironment{digression}[1]{\begin{quotation}\small\noindent
\textsl{Digression~\arabic{digression}:
#1}} {\refstepcounter{example}\end{quotation}}


\newcommand{\A}{\ensuremath{A}\xspace}
\newcommand{\B}{\ensuremath{B}\xspace}

\newcommand{\M}{\mathcal{M}}

\newcommand{\F}{\ensuremath{\mathrm{F}}}
\newcommand{\Gn}{{\mathcal{G}_n}}
\newcommand{\thetaAof}[4]{\theta_#1 \langle #2;#3;#4\rangle}


