%%%
%%% This is the beginning of the actual thesis.  If you don't know latex
%%% then start with the LaTeX manual by Lamport and another easy
%%% reference, like the paperback by Jane Hahn, LaTeX for Everyone, PTI,
%%% 1991. See also $TEX/latex/sample.tex and $TEX/doc/story.tex, where
%%% $TEX==/usr/local/lib/tex
%%%
% Start this dissertation....
%

\chapter{Selection Criteria for Main Effects and Two-Factor Interactions}  % level 1
\section{The $L_1$ Importance Measure}

After choosing $\hat{\lambda}$ by the GACV or ranGACV criteria, the LBP estimate $f_{\hat{\lambda}}$ 
is obtained by minimizing ($\ref{eq:obj}$), ($\ref{eq:obj2}$), ($\ref{eq:obj3}$) or ($\ref{eq:obj4}$). 
How to measure the importance of a particular component of the fitted model is a key question. We will 
consider the main effects and, possibly, the two factor interactions as the model components of interest.

We propose using the functional $L_1$ norm as the importance measure. This measure is especially useful 
when the optimization problem has sparse solutions, which is exactly the case of LBP. In practice, we 
calculate the empirical $L_1$ norm for each functional component, which is the average of the function 
values evaluated at all the data points. 
\begin{itemize}
\item For the continuous variables in the model ($\ref{eq:obj}$), the empirical $L_1$ norms of the main 
effect $f_\alpha$ and the two-factor interaction $f_{\alpha \beta}, ~ \alpha = 1,\dotsc,D$, 
$\beta < \alpha$, are
\beqr
L_1(f_\alpha) & = &  \frac{1}{n} ~ \sum_{i=1}^n ~ | f_\alpha (x^\alpha_i)| =  \frac{1}{n} ~ 
\sum_{i=1}^n ~ | b_\alpha k_1(x^\alpha_i) + \sum_{j=1}^{N} ~ c_{\alpha,j} 
K_1(x^\alpha_i, x^\alpha_{j*})| \nonumber \\
L_1(f_{\alpha \beta}) & = & \frac{1}{n} ~ \sum_{i=1}^n ~  |f_{\alpha \beta} (x^\alpha_i, x^\beta_i)|
\nonumber \\
& = & \frac{1}{n} \sum_{i=1}^n | b_{\alpha \beta} k_1(x^\alpha_i) k_1(x^\beta_i) + 
\sum_{j=1}^N c^{\pi s}_{\alpha \beta,j} K_1(x^\alpha_i, x^\alpha_{j*}) k_1(x^\beta_i) k_1(x^\beta_{j*}) 
\nonumber \\ 
& & ~ + ~\sum_{j=1}^N ~ c^{\pi s}_{\beta \alpha,j} K_1(x^\beta_i, x^\beta_{j*}) k_1(x^\alpha_i) 
k_1(x^\alpha_{j*})\nonumber \\
& & ~ + ~ \sum_{j=1}^N ~ c^{ss}_{\alpha \beta,j} K_1(x^\alpha, x^\alpha_{j*}) K_1(x^\beta, x^\beta_{j*})|. 
\nonumber 
\eeqr
\item
For the categorical variables in the model ($\ref{eq:obj3}$), the empirical $L_1$ norm of the main 
effect $f_\gamma$, $\gamma = 1, \dotsc, r$, is: 
\begin{equation}
L_1(f_\gamma) = ~ \frac{1}{n} ~ \sum_{i=1}^n ~ | ~ B_\gamma \Phi_\gamma(z^\gamma_i) ~ |
= ~ \frac{1}{n} ~ |B_\gamma| ~ \sum_{i=1}^n ~ | ~ \Phi_\gamma(z^\gamma_i) ~ | \nonumber 
\end{equation}
\noindent and the empirical $L_1$ norms for the interactions between categorical variables are 
defined similarly. 
\end{itemize}

The rank of the $L_1$ norm scores indicates the relative importance of all the main effect terms and 
the interaction terms. For instance, the component  with the largest $L_1$ norm is the most important, 
and any variable with near zero $L_1$ norm might be unimportant. An alternative measure is based on the 
functional $L_2$ norm. The empirical $L_2$ norms of the main effect $f_\alpha$ and the two-factor 
interaction $f_{\alpha \beta}, ~ \alpha = 1,\dotsc,D$, $\beta < \alpha$, are
\beqr
L_2(f_\alpha) & = &  [ ~ \frac{1}{n} ~ \sum_{i=1}^n ~ (f_\alpha (x^\alpha_i))^2 ~]^{\frac{1}{2}} \nonumber \\
& = & [ ~ \frac{1}{n} ~ \sum_{i=1}^n ~ (~ b_\alpha k_1(x^\alpha_i) + ~ \sum_{j=1}^{n} ~ c_{\alpha,j} 
K(x^\alpha_i, x^\alpha_{j*}) ~)^2 ~ ]^{\frac{1}{2}} \nonumber \\
L_2(f_{\alpha \beta}) & = & [ ~ \frac{1}{n} ~ \sum_{i=1}^n ~  ( ~ f_{\alpha \beta} 
(x^\alpha_i, x^\beta_i))^2 ~ ]^{\frac{1}{2}} \nonumber \\
L_2(f_\gamma) & = & |B_\gamma|~ [ ~\frac{1}{n} ~ \sum_{i=1}^n ~ ( ~ \Phi_\gamma(z^\gamma_i))^2 ~ ]^{\frac{1}{2}} 
\nonumber 
\eeqr
$L_2$ norm works equally well as $L_1$ norm in our simulation studies. But we omit further discussion 
of it.

\section{Choosing the Threshold}

We focus on the main effects model in this section. Using the chosen parameter $\hat{\lambda}$, 
we obtain the estimated main effect components $\hat{f}_1,\cdots,\hat{f}_D$ and calculate their 
$L_1$ norms $L_1(\hat{f}_1),\dotsc L_1(\hat{f}_D)$. Denote the decreasingly ordered norms as 
$\hat L_{(1)},\cdots,\hat L_{(D)}$ and the corresponding components $\hat{f}_{(1)},\dotsc 
\hat{f}_{(D)}$. A universal threshold value is needed to differentiate the important components 
from unimportant ones. Call the threshold $q$. Only variables with their $L_1$ norms greater than 
or equal to $q$ are ``important''. 

Essentially we will test the variables' importance one by one in their $L_1$ norm rank order. If 
one variable passes the test (hence ``important''), it enters the null model for testing the next 
variable; otherwise the procedure stops. After the first $\eta ~ (0 \le \eta \le D-1)$ variables enter 
the model, it is a one-sided hypothesis testing problem to decide whether the next component 
$\hat{f}_{(\eta+1)}$ is important or not. When $\eta = 0$, the null model $f$ is the constant,
say, $f = \hat{b}_0$, and the hypotheses are $H_0: L_{(1)} = 0$ vs $H_1: L_{(1)} > 0$. When $\eta \ge 1$, 
the null model is $f = \hat{b}_0 + \hat{f}_{(1)} + \cdots + \hat{f}_{(\eta)}$ and the hypotheses 
$H_0: L_{(\eta+1)} = 0$ vs $H_1: L_{(\eta+1)} > 0$. Let the desired one-sided test level be 
$\alpha$. If the null distribution of $\hat{L}_{(\eta+1)}$ were known, we could get the critical value 
$\alpha$-percentile and make a decision of rejection or acceptance. In practice the exact 
$\alpha$-percentile is difficult or impossible to calculate. However the Monte Carlo bootstrap 
test provides a convenient approximation to the full test. 

Now we develop a sequential Monte Carlo bootstrap test procedure to determine $q$. Conditional on 
the original covariates $\{\mathbf{x}_1,\dotsc \mathbf{x}_n\}$, we sample $T$ independent sets of data 
$(\mathbf{x}_1, y_{1,t}^{*(\eta)}),\dotsc (\mathbf{x}_n,y_{n,t}^{*(\eta)}), ~ t = 1,\dotsc T$ 
from the null model $f = \hat{b}_0 + \hat{f}_{(1)} + \cdots + \hat{f}_{(\eta)}$. We fit the main effects 
model for each set and compute $\hat L_t^{*(\eta+1)}, ~ t = 1,\cdots,T$. Under the null hypothesis, 
these $B$ values are equally likely values 
of $\hat L_{(\eta+1)}$, since $L_{(\eta+1)}, L_1^{*(\eta+1)},\cdots,L_T^{*(\eta+1)}$ 
are independently and identically distributed. If exactly $k$ of the simulated 
$\hat L^{*(\eta+1)}$ values exceed $\hat L_{(\eta+1)}$ and none equal it, the Monte 
Carlo $p$-value is $\frac{k+1}{T+1}$. See Davison \& Hinkley (1997) \nocite{davison:hinkley:1997} for 
an introduction on Monte Carlo bootstrap test.
\newpage
\begin{center}
{\bf \large Sequential Monte Carlo Bootstrap Tests Algorithm:}
\end{center}
\begin{itemize}
\item[{\bf Step 1:}] Let $\eta = 0$ and $f = \hat{b}_0$. We test $H_0: L_{(1)} = 0$ vs 
$H_1: L_{(1)} > 0$. Generate $T$ independent sets of data $(\mathbf{x}_1,y_{1,t}^{*(0)}),
\cdots,(\mathbf{x}_n,y_{n,t}^{*(0)}),~  t = 1,\cdots,T$ from $f = \hat{b}_0$. Fit the LBP main 
effects model and compute the Monte Carlo $p$-value $p_0$. If $p_0 < \alpha$, go to step 2; 
otherwise stop and define $q > \hat L_{(1)}$.
\item[{\bf Step 2:}] Let $\eta = \eta+1$ and $f = \hat{b}_0 + \hat{f}_{(1)} + \cdots + 
\hat{f}_{(\eta)}$. We test $H_0: L_{(\eta+1)} = 0$ vs $H_1: L_{(\eta+1)} > 0$. 
Generate $T$ independent sets of data $(\mathbf{x}_1,y_{1,t}^{*(\eta)}),\cdots,
(\mathbf{x}_n,y_{n,t}^{*(\eta)})$ based on $f$, fit the main effects model and compute 
the Monte Carlo $p$-value $p_\eta$. If $p_\eta < \alpha$ and $\eta < D-1$, repeat 
step 2; and if $p_\eta < \alpha$ and $\eta = D-1$, go to step 3; otherwise stop and 
define $q = \hat L_{(\eta)}$.
\item[{\bf Step 3:}] Stop the procedure and define $q = \hat L_{(D)}$.
\end{itemize}














