\documentclass[compress,9pt,xcolor={dvipsnames,svgnames},table]{beamer}
\usepackage{pxfonts}
\usepackage[brazil]{babel}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage[mathscr]{euscript}
\usepackage{pifont}
\usepackage{graphicx}
\graphicspath{{./figures/}}

\usepackage{verbatim}
\usepackage{hyperref}

\beamertemplateshadingbackground{white!10}{white!10}
%\setbeamercolor{structure}{bg=Maroon,fg=Maroon}
\setbeamercolor{structure}{bg=Maroon,fg=OliveGreen!70!Black}
\setbeamercolor{block title}{fg=white,bg=Maroon}
%\setbeamercolor{block title}{fg=white,bg=OliveGreen}
\setbeamercolor{block body}{bg=Maroon!6!white}
%\setbeamercolor{block body}{bg=OliveGreen}
\setbeamercolor{frametitle}{bg=Maroon,fg=white}

\usetheme[height=7mm]{Rochester}
\useoutertheme[subsection=false]{smoothbars}
\useinnertheme[shadow]{rounded}
\setbeamercovered{transparent=10}
\setbeamersize{text margin right=0.75cm,text margin left=0.75cm}
\beamersetleftmargin{0.4cm}
\beamersetrightmargin{0.4cm}

\setbeamercolor{section in toc}{fg=black,bg=white}
\setbeamertemplate{navigation symbols}{}

\setbeamertemplate{footline}{
 \begin{beamercolorbox}[right]{navigation symbols}
    \hspace*{1em}\insertframenumber{}/\inserttotalframenumber\hspace*{2ex}\vskip1pt
 \end{beamercolorbox}
}

\newcommand{\indica}[2]{\bfI \genfrac{}{}{0pt}{}{#1}{#2}}
\newcommand{\distind}{\genfrac{}{}{0pt}{}{\text{ind}}{\sim}}
\def\colorize<#1>{%
\temporal<#1>{\color{Gray!40}}{\color{red}}{\color{black}}}
\setbeamercolor{postit}{fg=black,bg=yellow!20}
\setbeamercolor{postit2}{fg=black,bg=yellow!15}
%\setbeamercolor{verde2}{fg=black,bg=green!8}
\setbeamercolor{verde}{fg=black,bg=OliveGreen!9}
\setbeamercolor{branco}{fg=black,bg=white}
%\setbeamercolor{rojo}{fg=black,bg=red!10}
%\setbeamercolor{azul}{fg=black,bg=DarkBlue!6!white}
%\setbeamercolor{marron}{fg=black,bg=RawSienna!6!white}
\setbeamercolor{marron2}{fg=black,bg=RawSienna!4!white}

\def \IR{\hbox{{\rm I}\kern-.2em\hbox{{\rm R}}}}
\def \IN{\hbox{{\rm I}\kern-.2em\hbox{{\rm N}}}}
\newcommand\Var{\mbox{\rm \,Var\,}}
\newcommand\Cov{\mbox{\rm \,Cov\,}}
\newcommand\E{\mbox{\rm \,E\,}}


%-------------------------------------------------------------------------------------------------------------

\title{\textcolor{white}{\Huge\sc \textbf{{\huge }Fórum  Mineiro de Estatística e Probabilidade}}\\
      \textcolor{white}{\emph{\Large Os 30 anos do Curso de Estatística da UFMG}}}


\author{{\Large \bf Geostatistical analysis of compositional data:\\ some models and applications}\\\mbox{}\\
  {Paulo Justiniano Ribeiro Jr\\[0.1cm]%\vspace{0.1cm}
    \textit{LEG:Laboratório de Estatística e Geoinformação} / \textit{UFPR}}\\\mbox{}\\
  \textcolor{DarkRed}{\hfill \hspace{8cm} In collaboration with:\\
  \hfill{ \hspace{6.5cm} Ernesto Jardim (IPIMAR, Lisboa)}\\
  \hfill{ \hspace{5.7cm} Ana Beatriz Tozzo Martins (UEM/LEG)}\\
  \hfill{ \hspace{6.7cm} Wagner H Bonat (LEG/UFPR)}}}
%\\[0.1cm]  }

\institute{\small \texttt{\url{http://www.leg.ufpr.br}}\\\texttt{\url{e-mail:paulojus@ufpr.br}}\\\vspace{0.1cm}}

\date{\textcolor{DarkBlue}{Belo Horizonte, MG \\ 20 -- 22 de Maio de 2009}}

\begin{document}
% -----------------------------------------------------------------------------
% Slide number 1 - Titlepage
% -----------------------------------------------------------------------------
\begin{frame}
  \thispagestyle{empty}
  % \centerline{\includegraphics[scale=0.20]{leg_logo.eps}}
  \titlepage
\end{frame}

%-----------------------------------------------------------------------------
\section{Opening}
\subsection{54 RBRAS e 13 SEAGRO}
\begin{frame}

\frametitle{\textbf{$54^a$ RBRAS e $13^o$ SEAGRO}}

\begin{beamercolorbox}[wd=0.97\textwidth,center,rounded=true,shadow=true]{marron2}

\textcolor{DarkBlue}{{\bf $54^a$ Reunião da Região Brasileira da Sociedade Internacional de Biometria\\
[0.4cm] \& $13^o$ Simpósio de Estatística Aplicada a Agronomia}}

\vspace{0.2cm}

\end{beamercolorbox}

%\textcolor{DarkBlue}{{\bf Informações:}}

\medskip

%{\small
\begin{enumerate}
\itemsep 3ex
\colorize<2> \item Região Brasileira da Sociedade Internacional de Biometria
\colorize<2> \item 27 a 31 Julho 2009, São Carlos, SP
\colorize<2> \item semana seguinte à Escola de Séries Temporais -- ESTE (São Carlos)
\colorize<2> \item com participação da ABE/Embrapa na programação
\colorize<2> \item condições especiais para sócios RBRAS/ABE
\colorize<2> \item \textcolor{NavyBlue}{\url{http://www.rbras.org.br/rbras54}}
\end{enumerate}
%}
\end{frame}

\subsection{IBC-2010 e $55^a$ RBRAS}
\begin{frame}
\frametitle{\textbf{IBC-2010/Floripa e 55 RBRAS}}

\begin{beamercolorbox}[wd=0.97\textwidth,center,rounded=true,shadow=true]{marron2}

\textcolor{DarkBlue}{{\bf International Biometrics Conference \&\\
\vspace{0.5cm}$55^a$ Reunião da Região Brasileira da Sociedade Internacional de Biometria}}

\vspace{0.2cm}

\end{beamercolorbox}

%\textcolor{DarkBlue}{{\bf Information:}}

\medskip

%{\small
\begin{enumerate}
\itemsep 3ex
\colorize<2> \item Organization: IBS, Rbras, RArg
\colorize<2> \item 05 a 10  december de 2009, Florianópolis, SC, Brasil
\colorize<2> \item satelite events (opened to proposals)
\colorize<2> \item RBRAS meeting on wednesday, 07/12 
\colorize<2> \item special fees for delegates from \textit{special circunstance countries}
\colorize<2> \item \textcolor{NavyBlue}{\url{http://www.rbras.org.br/ibc2010}} 
and \textcolor{NavyBlue}{\url{http://www.tibs.org}}
\end{enumerate}
%}
\end{frame}
 %-----------------------------------------------------------------------------

%\section{Tópicos}
\subsection{Topics}
\begin{frame}
  \frametitle{\textbf{Outline}}
  \begin{itemize}
    \itemsep 2ex
  \item Motivating examples
    \begin{itemize}
    \item soil fractions
    \item fish stocks and age structure
    \end{itemize}
  \item Joint model for abundance and population structure
    \begin{itemize}
    \item general setup, strategies and ingredients
    \item compositional data analysis
    \item geoestatistical analysis
    \item results
    \end{itemize}
  \item Multivariate model for compositional data
    \item Model specification
    \item Inference and Prediction
    \item computational implementation
  \item Final remarks
  \end{itemize}
\end{frame}

% -----------------------------------------------------------------------------

\section{Motivation}
\subsection{Soil fractions}

\begin{frame}[fragile]
  \frametitle{\textbf{Motivating Examples I: soil fractions}}
  \begin{columns}[T]
    \begin{column}{0.38\textwidth}
      \centerline{\includegraphics[height=0.85\textwidth]{soilfigs/pivo}}
    \end{column}
    \pause
    \begin{column}{0.62\textwidth}
      \begin{itemize}
        \itemsep 2ex
      \item soil fractions determines management practices (fertilizers, irrigation, \ldots)
      \item spatial description is essential to \\ \textcolor{DarkRed}{\textit{precision agriculture}}
      \item definition of soil classes  
      \item typical data structure
        {\small
\begin{verbatim}
  X Y DenGlob DenPar PoroTot Areia Silte Argila
 20 0    1.69   2.63   35.61    31    25     44
 40 0    1.58   2.87   45.08    24    21     55
 60 0    1.44   2.55   43.51    23    27     50
 80 0    1.50   2.57   41.48    22    25     53
100 0    1.58   2.56   38.31    22    25     53
120 0    1.45   2.69   46.05    16    25     59
\end{verbatim}
        }
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{\textbf{soil fractions (cont.)}}
    \centerline{\includegraphics[height=0.9\textheight]{soilfigs/hists}}
\end{frame}

\subsection{Fish stocks}

\begin{frame}
  \frametitle{\textbf{Motivating Examples II: fish stocks and age structure}}
  \textcolor{DarkRed}{\textbf{Hake (\textit{Merluccius merluccius})}}\\

  \vspace{2cm}

%  \begin{columns}[T]
%    \begin{column}{0.45\textwidth}
    \includegraphics[height=0.4\textwidth]{figs/hake1}
%    \end{column}
%    \begin{column}{0.55\textwidth}
%    \includegraphics[height=0.9\textheight]{figs/hakedistribution1}
%    \end{column}
%  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{\textbf{Hake distribution}}
%  \begin{columns}[T]
%    \begin{column}{0.45\textwidth}
%    \includegraphics[height=0.4\textwidth]{figs/hake1}
%    \end{column}
%    \begin{column}{0.55\textwidth}
    \includegraphics[height=0.9\textheight]{figs/hakedistribution1}
%    \end{column}
%  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{\textbf{fish stocks and age structure (cont.)}}
  \begin{itemize}
    \itemsep 3ex
  \item assessment of fish stocks and population structure on the Portuguese coast;
  \item data from BTS (bottom trawl surveys);
  \item several target species, focus on \textcolor{DarkRed}{\textit{Hake}};
  \item related issues: 
    \begin{itemize}
    \itemsep 2ex
    \item design (Jardim \& Ribeiro Jr, 2007), 
    \item comparing strategies for stock assessment (Jardim \& Ribeiro Jr, 2008), 
    \item spatial-temporal modelling (Silva \& Ribeiro Jr, 2008), 
    \item wider context (Jardim, 2009): \textit{MSE} (management stratagy evaluation).
    \end{itemize}  
  \end{itemize}  
\end{frame}

\section{Model I}
\subsection{Fish stocks and age structure}
\begin{frame} 
  \frametitle{Data from BTS}
    \centerline{\includegraphics[height=0.9\textheight]{figs/fig01}}
\end{frame}

\begin{frame}
  \frametitle {Goals}
  \begin{itemize}
    \itemsep 3ex
  \item General: modelling and prediction of abundance at age;
    \begin{itemize}
    \item \textit{abundance \ldots :} global and local description of stocks 
    \item \textit{\ldots at age:}  global and local population structure
    \end{itemize}
    \pause
  \item spatial-temporal estimates and predictions
    \pause
  \item results as inputs for large simulation frameworks\\ 
    MSE (\textit{management strategy evaluation}): scientific advice on fisheries and ecological management.
    \pause
  \item confront results from design-based (mostly used) and model-based alternatives
  \end{itemize}
\end{frame}


\begin{frame}
\frametitle {Statistical issues and "ingredients"}
\begin{itemize}
\itemsep 2ex
\item population structure: proportions of five age classes \\
  \textit{compositional data analysis} (Aitchison, 1986)
\item spatial structure of total stocks and abundances at age: \\
  \textit{geostatistics} (\ldots, \ldots, \ldots, Diggle \& Ribeiro Jr, 2007)
\item spatial variation of the proportions \\ mixing of "natural"{} and "spurious"{} correlations\\
  \textit{geostatistical analysis of compositions} (Pawlowsky-Glahn \& Olea, 2004)
\item \textit{Bayesian/spatial/compositions} (Tjelmeland \& Lund, 2003)
\item Joint modelling of abundance \textbf{and} compositions\\spatio-temporal\\
Jardim \& Ribeiro Jr (submitted) 
\end{itemize}
\end{frame}


\begin{frame} 
  \frametitle {Some (loose) notation} 
  {\vspace{0.3cm}}
  \begin{itemize}
    \itemsep 2ex
  \item Primary data: (normalised) catches $c_{ijh}(x)$ \\ ($i$-year, $j$-age, $h$-haul, $x$-location)
  \item aggregated catch $y_{ih}(x) = \sum_{j} c_{ijh}(x)$
  \item The variables (dropping $i$, $h$ and $x$ indexes): \\
    Abundance at age $C_j$, proportion at age $P_j = C_j/Y$ and\\ total abundance $Y = \sum_j C_j$ 
  \item A natural structure and modelling alternatives
    \textcolor{DarkRed}{$$[C_1, \ldots, C_m] = [P_1, \ldots, P_m|Y][Y]$$} 
    \begin{itemize}
    \item multivariate model for $C's$, or \ldots
    \item full parametric geostatistical model for $Y$
    \item compositional data analysis for multinomial probabilities
    \end{itemize}
  \item inference by simulation
  \end{itemize}
\end{frame}


\frame { \frametitle {Inference and Prediction} 

{\textcolor{DarkRed}{First Ingredient: compositional}}

\begin{itemize}
\itemsep 3ex
\item $G_{ijh} = \log(P_{i, j\neq a, h}/P_{i, j = a, h})$ 
\item $\mathbf{G}_{ij} \sim Gau(\mu_i, \Sigma_i)$, $\mathbf{G} = (G_1, \ldots, G_{D-1})$
\item sampling mechanism for each year using estimates 
\item reference age class $a$: age 2 (greater abundance)
\item 0's: multiplicative replacement strategy \\ (Martín-Fernandez et al, 2003)
\end{itemize}
}

\begin{frame} 
\frametitle {Inference and Prediction (cont.)} 

{\textcolor{DarkRed}{Second Ingredient:  (Bayesian) geostatistics}}

\begin{itemize}
  \itemsep 3ex
\item trans-Gaussian geostatistical model (Christensen et. al, 2001)
\item $[g_\lambda(Y(x))|S(x)] \sim Gau(F(x)\beta + S(x), \epsilon)$
  \begin{itemize}
  \itemsep 2ex
  \item covariates $F(x)$
  \item $S(\cdot)$ Gaussian process with covariance function \\$\sigma^2 \rho(x) = \sigma^2 Corr\left[S(x), S(x^\prime)\right] = \sigma^2 \exp(-||x-x^\prime||/\phi)$
  \item $\epsilon \sim Gau(0, \tau^2)$
  \end{itemize}
\item Priors:
  \begin{itemize}
  \itemsep 2ex
  \item $[\beta, \sigma^1|\phi, \tau^2] \propto 1/\sigma^2$
  \item $[\phi] \sim \exp(1/20)$ 
  \item $[\tau^2]$ discrete (based on a ZIP) and  truncated in $[0,2]$
  \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
  \frametitle {General scheme}
    \centerline{\includegraphics[height=0.99\textheight]{figs/algoritm}}
\end{frame} 

\subsection{Results}

\frame { \frametitle {Yearly compositions}
\centering{\includegraphics[height=0.98\textheight]{figs/figcomp}}
}

\frame { \frametitle {Yearly spatial predictions}
\centering{\includegraphics[height=0.97\textheight]{figs/figkrig}}
}
    
\frame { \frametitle {Yearly total abundance}
\centering{\includegraphics[height=0.8\textheight]{figs/figYi}}
}
    
\frame { \frametitle {Yearly abundance at age}
\centering{\includegraphics[height=0.97\textheight]{figs/figiaya}}
}
    
\frame { \frametitle {$\phi$: priors and posteriors}
\centering{\includegraphics[height=0.97\textheight]{figs/figphip}}
}
    
\frame { \frametitle {$\tau^2$: priors and posteriors}
\centering{\includegraphics[height=0.97\textheight]{figs/figtaup}}
}
    
\subsection{Comments}
\frame { \frametitle {Remarks on the application} 
%{\vspace{0.3cm}}
\begin{itemize}
  \itemsep 2ex
  \pause
\item  differences between design based and model based estimates
\item  shifts: differences in abundances at age and/or classification errors
\item  spatial results highlights persistent areas of high abundance and recruitment spots 
\item  allows identification of competition/cannibalism spots (e.g. recruits vs parental stocks) 
\item  comments on interpretation of correlations from paper
\item  reasonable and consistent results for $\phi$
\item  little information on data about $\tau_{R}^2 = \tau^2/\sigma^2$

\end{itemize}
}

\begin{frame} 
  \frametitle {Further modelling} 
  % {\vspace{0.3cm}}
  \begin{itemize}
     \itemsep 3ex
  \item  $R(x)$: zero mean, unit variance Gaussian random field
  \item  $Y(x) = \exp\{\mu + \sigma R(x) + \epsilon \}$ 
  \item  For each age class consider $S_d(x) =  \beta_{0d} + \beta_{1d} R(x) + \epsilon_d$ 
  \item $q_k(x) = \exp\{S_d(x)\}/(1+\exp\{S_d(x)\})$
  \item compositions $p_d(x) = q_d(x)/\sum_d(q_d(x))$
  \item The abundance at age  $C_d(x) = p_d(x) \cdot{} Y(x)$.
  \item Parameters: 
    \begin{itemize}
     \itemsep 1.5ex
    \item $4 + 3 D$ parameters. 
    \item common $\tau_d$  : $5 + 2 D$ parameters
    \item $\tau_D = \tau$  : $4 + 2 D$ parameters.
    \end{itemize}
  \end{itemize}
\end{frame}

\section{Model II}
\subsection{Soil fractions}

\begin{frame}
  \frametitle{\textbf{Example 2: soil fractions}}
{\small  
  \begin{columns}[T]
    \begin{column}{0.55\textwidth}      
      {\large \bf Some Algebra for Compositional data}
      \begin{itemize}
        \itemsep 1.5ex
      \item  Original sampling space
        $ \mathbb{S}^B = \{ \b{Y} \in \mathbb{R}^B;\, Y_i > 0, \, i=1,...,B;\,\b{j}'\b{Y}=1 \}$
      \item Base:  $\b{W}(\b{x})$, $\b{x} \in \Omega \subset \mathbb{R}^n$ 
      \item Transformed sampling space
        $\mathbb{R}^B_+ = \{ \b{W}(\b{x}) \in \mathbb{R}^B;\,\, W_i(\b{x}) > 0, \,\, i=1,...,B \}$ 
        \vspace{0.1cm}
      \item closure operator: \,\, Base \, $\Rightarrow$ \, composition
        $$
        \begin{array}{cccl}
          \mathcal{C} : &  \mathbb{R}^B_+  &  \longrightarrow & \mathbb{S}^B \\ 
          &  \b{W}(\b{x})    &  \longrightarrow & \mathcal{C}[\b{W}(\b{x})]=\dfrac{\b{W}(\b{x})}{\b{j}'\b{W}(\b{x})},\\
        \end{array} \hspace{0.4cm}\b{j}' \,\,\text{vetor de}\,\, 1^{'s}.
        $$
      \item Amalgamation, partition and sub-compositions
      \item Aditive log-ratio (ALR):  
        $$
        \begin{array}{cccl}
          \text{ALR} : & \mathbb{S}^B & \longrightarrow & \mathbb{R}^{B-1}        \\ 
          & \b{Y}(\b{x}) & \longrightarrow & \text{ALR} [\b{Y}(\b{x})]=\left(\text{ln}\,\dfrac{Y_1(\b{x})}{Y_B(\b{x})},
            \dots,
            \text{ln}\,\dfrac{Y_{B-1}(\b{x})}{Y_B(\b{x})}\right)'. \\
        \end{array}
        $$ 
      \item inverse additive generalised logistic ($agl = alr^{-1}$)
      \end{itemize}
    \end{column}
    
    \begin{column}{0.45\textwidth}            
      \centerline{\includegraphics[height=0.85\textwidth, angle=0]{ternario}}
    \end{column}
  \end{columns}
}
\end{frame}

\begin{frame}
  \frametitle{\textbf{Analogous and alternative models}}
  \begin{itemize}
    \itemsep 4ex
  \item Linear combination of spatial terms
    $$S_j(x) = \sum_{j=1}^d a_{kj} U_j(x),$$
    in matrix form: $S(x) = A U(x)$
    with covariance function $\Gamma(x,x^\prime)= A R A^\prime$,
    
  \item Linear model of corregionalisation
    $$S(x) = \sum_{i=1}^p A_i U^i(x)$$

  \item Gelfand et. al. (Test, 2004): \textit{Nonstationary multivariate process modeling through spatially varying coregionalization (with Discussion)}
  \end{itemize}  
\end{frame}


\begin{frame} 
  \frametitle{\textbf{\Large \bf Bivariate Gaussian Common Component Model (BGCCM)}}
  \begin{itemize}
    \itemsep 3ex
  \item Common Components: 
    $S(\cdot) = \{S_1(\cdot),S_2(\cdot)\}$ to be:
    $$S_j(x) = S_0^*(x) + S_j^*(x) : j=1,2.$$
    Por construção, $S(\cdot)$ é um processo válido com covariância:
    $${\rm Cov}\{S_j(x),S_{j^\prime}(x-u)\} = \gamma_0(u) + I(j=j^\prime) \gamma_j(u)$$
    \pause
    \item BGCCM model:
    \begin{beamercolorbox}[wd=0.85\textwidth,center,rounded=true,shadow=true]{marron2}
      $$Y_1(x_i) = \mu_1 + S_0(x_i) + S_1(x_i)= \mu_1 + \sigma_{01} R_0(x_i;\phi_0) + \sigma_1 R_1(x_i,\phi_1)$$ 
      $$Y_2(x_j) = \mu_2 + S_0(x_j) + S_2(x_j)= \mu_2 + \sigma_{02} R_0(x_j;\phi_0) + \sigma_2 R_2(x_j,\phi_2)$$ 
    \end{beamercolorbox}
  \end{itemize}
\end{frame}

\begin{frame} 
  \frametitle{\textbf{\Large Bivariate Gaussian Common Component Model (BGCCM)}}
  \pause
  \begin{itemize}
    \itemsep 3ex
  \item Notation:
    \begin{itemize}
    \item $C$ (vector) compositions
    \item $Y$ (vector) observations on the additive log-ratio scale
    \item $Z$ (vector) standard MV-Gaussian
    \end{itemize}    
  \item Likelihood
    \begin{itemize}
    \item density:
      $$f(C)=(2\pi)^{(-d/2)} |\Sigma_Y|^{-1/2} 
      \exp \left\{-0.5 \left(alr(C) - \mu_Y\right)^{\prime}\Sigma^{-1}_Y \left(alr(C) - \mu_Y\right)\right\}
      \left(\prod_{i=1}^{D}C_i\right)^{-1}$$
    \item reparametrisation, concentrated likelihood
    \item numerical methods, hessian, delta method, \ldots
    \end{itemize}
  \item Prediction:
    \begin{itemize}
    \item usual for geostatistical model on de $Y$ scale based on multivariate-normal
    \item particular issues on back-transforming
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame} 
  \frametitle{\textbf{\Large Back transforming predictions I}}
{\small
  \begin{itemize}
  \item Back-transforming to the original scale (proportions)
    \begin{align*}
      \mu_C &= \E[C] = \int_{S^D} C f(C) dC \\
      \Sigma_C &= \Cov[C, C] = \int_{S^D} (C - \mu_C)(C - \mu_C)^{\prime} f(C) dC \\
      f(C) &= (2\pi)^{(-d/2)} |\Sigma_Y|^{-1/2} \exp\left\{-0.5\left(alr(C) - \mu_Y\right)^{\prime}\Sigma^{-1}_Y
        \left(alr(C) - \mu_Y\right)\right\} \left(\prod_{i=1}^{D}C_i\right)^{-1}
    \end{align*}
    \pause
  \item Gauss-Hermite integration:
      $$      \mu_C = \int_{\IR^D} g_1(Z) \exp\{-Z^{\prime}Z\} dZ \;\;\;\;\;
      \Sigma_C = \int_{\IR^D} g_2(Z) \exp\{-Z^{\prime}Z\} dZ  $$
    \pause
    \begin{align*}
      Z^{\prime}Z &= 0.5\left(alr(C) - \mu_Y\right)^{\prime}\Sigma^{-1}_Y \left(alr(C) - \mu_Y\right)\\
      \Sigma_Y &= R^{\prime}R \\
      C &= agl\left(\sqrt{2} R^{\prime}Z + \mu_Y \right) \\
      \mu_C &= \int_{\IR^D} \pi^{-(D-1)/2} agl\left(\sqrt{2} R^{\prime}Z + \mu_Y \right) \exp\{-Z^{\prime}Z\} dZ\\
      \Sigma_C &= \int_{\IR^D} \pi^{-d/2)} M M^\prime  \exp\{-Z^{\prime}Z\} dZ \;\;\;; \;\;
      M = agl\left(\sqrt{2} R^{\prime}Z + \mu_Y \right) - \mu_C
    \end{align*}
  \end{itemize}
}
\end{frame}

\begin{frame} 
  \frametitle{\textbf{Back transforming predictions II}}
  \vspace{0.5cm}
  \textbf{Alternative (simulation)}
  \begin{itemize}
    \itemsep 3ex
  \item sample $Y_s(x)$ from $Y(x)$ predictive distribution
  \item $C_s(x) = agl(Y_s(x)): (Y_{s1}(x), \ldots, Y_{s(D-1)}(x), 0) \rightarrow (C_{s1}(x), \ldots, C_{sD}(x))$ 
  \end{itemize}
  \pause
  \vspace{0.5cm}
  \textbf{Computacional illustration}
  
\end{frame}





\section{Remarks}
\subsection{remarks I}
\begin{frame}
\frametitle{Computational details}
\begin{itemize}
  \itemsep 3ex
\item code for fish data analysis at LEG's \textit{paper companions} web page
\item code for soil data available at\\
  \texttt{\textsf{geoComp}} "pre-pre-pre-alpha" R-package (to be added to \texttt{\textsf{geoR}})
\item more general number of compositions
\item possible integration with otehr packages \texttt{\textsf{sp}}, \texttt{\textsf{INLA}}, 
\texttt{\textsf{RandomFields}}, \texttt{\textsf{spBayes}}
\end{itemize}
\end{frame}

\subsection{remarks II}
\begin{frame}
  \frametitle{Final remarks}
  \pause
  \begin{itemize}
    \itemsep 2ex
    \item Fish model (hopefully not \textit{fishy})
    \begin{itemize}
      \itemsep 2ex
    \item  avoids multivariate models by joint modelling of total and proportions 
    \item  suggests how population structure evolves over time \\
      (however with a na\"ive  temporal structure)
    \item  extended for count (neg. binomial) data 
    \item  needs more general and coherent inferential setup
    \item  separation of the correlations (spatial and compositional)
    \item  in summary \ldots this is just towards a model \ldots
    \end{itemize}
    \item Geostatistical models for compositional data
    \begin{itemize}
      \itemsep 2ex
    \item More efficient computation
    \item Bayesian inference being developed/implemented
    \item issues on incorporating covariates
    \item more general specification of multivariate models
    \item \textbf{better understanding of multivariate models}
    \end{itemize}
  \end{itemize}
\end{frame}

\subsection{remarks II}
\begin{frame}
  \frametitle{Final remarks}
\mbox{} \\

\vspace{2cm}

\centering{\Huge Muito Obrigado!}\\
\mbox{}
\\
\centering{\large (um privilégio estar aqui!)}

\end{frame}


\end{document}



  % -----------------------------------------------------------------------------

\section{Geoestatística I}
\subsection{Geo-Básico}
\begin{frame}
  \frametitle{\textbf{Procedimentos básicos de geoestatística}}
  \begin{columns}[T]
    \begin{column}{0.45\textwidth}
%      \vspace{0.5cm}
      {\small \textcolor{DarkBlue}{Análise exploratória}
        \begin{itemize}
        \item \textcolor{RawSienna}{Não espacial}
        \item \textcolor{RawSienna}{Espacial}
        \end{itemize}
        \vspace{0.5cm}
      }
      \pause
      {\small   \textcolor{DarkBlue}{Análise estrutural}
        \begin{itemize}
        \item \textcolor{RawSienna}{(cross)-variogramas e suas variantes}
        \item \textcolor{RawSienna}{escolha de funções permitidas e ajustes}
        \end{itemize}
        \vspace{0.5cm}
      }
      \pause
      {\small \textcolor{DarkBlue}{Predição ou Interpolação}
        \begin{itemize}
        \item \textcolor{RawSienna}{krigagem}
        \item \textcolor{RawSienna}{(em todas formas e cores \ldots)}
        \item \textcolor{RawSienna}{todo o ``menu de krigagem''}
        \end{itemize}
        \bigskip
      }
    \end{column}
    \pause
    \begin{column}{0.45\textwidth}
      {\small \textcolor{DarkBlue}{Avaliação}
        \begin{itemize}
        \item \textcolor{RawSienna}{validação cruzada/jackknife}
        \item \textcolor{RawSienna}{outros diagnósticos}
        \end{itemize}
        \vspace{0.8cm}
      }
      \pause
      {\small \textcolor{DarkBlue}{Extensões}
        \begin{itemize}
        \item \textcolor{RawSienna}{indicadoras}
        \item \textcolor{RawSienna}{simulações condicionais}
        \item \textcolor{RawSienna}{multivariadas}
        \item \textcolor{RawSienna}{e muitas outras!}
        \end{itemize}
      }
    \end{column}
  \end{columns}
\end{frame}

% -----------------------------------------------------------------------------
\subsection{Modelo I}
\begin{frame}
\frametitle{\textbf{Escrevendo e explorando o modelo}}
{\large \textbf{O modelo básico:}}
\vspace{0.3cm}

\textcolor{DarkBlue}{
$$Y_k(x_i) = \mu_k(x_i) + S_k(x_i) + \epsilon$$
}

\vspace{0.7cm}

\pause

\begin{beamercolorbox}[wd=0.96\textwidth,center,rounded=true,shadow=true]{postit2}
\begin{itemize}
\itemsep 3ex
\item $Y_k(x_i)$ é a $k$-ésima variável na localização $x_i$
\item tipicamente $\mu_k(x_i) = \sum_{j} \beta_{jk} f_{j}(x_i)$ (cte ou \textit{trend}, covariáveis)
\item $S_k(x_i)$ é o termo que captura o padrão espacial (único ou não, (an)isotropia, etc)
  \begin{itemize}
  \item caracterizado pela função de variância ${\rm Cov}(Y_k(x), Y_{k^\prime}(x^\prime)) = 
    \sigma_k\sigma_{k^\prime} \rho(\cdot; \phi)$
  \end{itemize}
\item $\epsilon$ é uma v.a. sem dependência espacial, ${\rm Var}(\epsilon) = \tau^2$
\item Parâmetros: $\beta, \sigma^2, \phi, \tau^2$ caracterizam o processo 
%\item demo usando \textsf{\textbf{geoR}} (\texttt{\url{http://www.leg.ufpr.br/geoR}})
\end{itemize}
\end{beamercolorbox}

\end{frame}

\subsection{Correlação}
\begin{frame}
  \frametitle{Função de correlação}
{\Large \bf Família de Matèrn}
  \textcolor{DarkBlue}{  
    $$\rho(u) = \{2^{\kappa-1} \Gamma(\kappa)\}^{-1} (u/\phi)^\kappa K_\kappa(x/\phi)$$
  }
%\vspace{0.2in}
  \begin{columns}[T]
    \begin{column}{0.45\textwidth}
      \begin{itemize}
      \item $\kappa$ e $\phi$ são par\^ametros
      \item $K_\kappa(\cdot)$ função Bessel de ordem $\kappa$
      \item $\phi>0$ e $\kappa>0$
      \item $\kappa=0.5$: {\it modelo exponencial} 
      \item $\kappa \rightarrow \infty$: {\it modelo Gaussiano} 
      \item $S(x)$ \'e $\lceil \kappa-1$ vezes diferenci\'avel   
      \end{itemize}
    \end{column}
    \begin{column}{0.45\textwidth}
      \vspace{-3cm}
      \centerline{\includegraphics[width=10cm]{Rfigs/fig03-covmatern}}
  \end{column}
  \end{columns}
\end{frame}


% -----------------------------------------------------------------------------
\subsection{Modelo II}
\begin{frame}  
  \frametitle{\textbf{Reescrevendo o modelo básico}}
  \begin{itemize}
    \itemsep 2ex
  \item Explicitando o modelo
    \textcolor{DarkBlue}{
      $$Y(x_i) \sim {\rm N} (\mu(x_i), \tau^2)$$
      $$\mu(x_i) = \sum_{j} \beta_{j} f_{j}(x_i) + S(x_i) $$
    }
    \pause
  \item Verossimilhança
    \begin{eqnarray*}
      L(\beta,\tau,\sigma,\phi; y) \propto  -0.5\{\log |(\sigma^2 R_{\phi} +\tau^2 I)| +
      (y-F \beta)^\prime (\sigma^2 R_{\phi} +\tau^2 I)^{-1} (y-F\beta)\}.
    \end{eqnarray*}
%  \item Representação gráfica
%    \vspace{-0.5cm}
%    \centerline{\includegraphics[height=10cm,width=5cm,angle=270]{modelo}}
  \end{itemize}  
\end{frame}

\subsection{Por que?}
\begin{frame}
  \frametitle{\textbf{Por que reescrever o modelo desta forma?}}  
  \begin{beamercolorbox}[wd=0.96\textwidth,center,rounded=true,shadow=true]{postit2}
    \begin{itemize}
      \itemsep 3ex
    \item explicita os pressupostos
    \item \textbf{permite construir verossimilhança}: medida de compatibilidade com os dados com propriedades ótimas
    \item avaliação de incertezas
    \item compreensão global de uma séria de procedimentos
    \item visualização de generalizações
    \item permite declarações hierárquicas
    \item acoplamento explícito em sistemas complexos/estruturados
    \end{itemize}
  \end{beamercolorbox}
\end{frame}

\subsection{Predição}
\begin{frame}
  \frametitle{\textbf{Predição Espacial}}
  
  \begin{itemize}  
  \item o valor esperado da realização do processo $S(\cdot)$ em pontos/malha 
  \item ou a m\'edia de $S(\cdot)$ em uma região $B$ de área $|B|$ 
    $$T=|B|^{-1} \int_B S(x)dx$$ 
  \end{itemize}

  \pause
  \vspace{0.3cm}
  \textcolor{DarkBlue}{Preditor de min\'{\i}mos quadrados de $T=S(x)$:}
  $$\hat{T} = \mu+ \sigma^2 {\bf r}^\prime (\tau^2I + \sigma^2 R)^{-1}
  (Y - \mu {\bf 1})$$
  $${\rm Var}(T|Y) = \sigma^2 - \sigma^2 {\bf r}^\prime (\tau^2 I + \sigma^2 R)^{-1} \sigma^2 {\bf r}$$

  \pause
  \vspace{0.3cm}
  \textcolor{DarkBlue}{\textbf{Inferência Bayesiana:}}

  \textcolor{RawSienna}{Posteriori:} $ pr\!\left(\phi|y\right) \propto
  pr\!(\phi)\;|V_{\hat{\beta}}|^{\frac{1}{2}}\; |R_y|^{-\frac{1}{2}}\;(S^2)^{-{\frac{n-p}{2}}}$

  \vspace{0.1in}

  \textcolor{RawSienna}{Preditiva:} $p(S^{*}|Y) = \int p(S^{*}|Y,\phi)\; p(\phi|y)\,d\phi$

  \pause
  \vspace{0.3cm}
   
  \begin{itemize}
  \item Diversos \emph{pacotes} para o programa \textsf{\textbf{R}} (\url{http://www.r-project.org}):
  \item \textsf{\textbf{spatial}}, \textsf{\textbf{RandomFields}}, \textsf{\textbf{gstat}}, \textsf{\textbf{sgeostat}}, \textsf{\textbf{fields}}, \ldots
  \item \ldots \textsf{\textbf{geoR}}: implementa métodos {\it model-based} (\url{http://www.leg.ufpr.br/geoR})
  \end{itemize}
\end{frame}    

%-----------------------------------------------------------------------------
\section{Aplicações}
\subsection{Aplicações}


\end{document}

