\section{The Models}\label{sec:models}
This section describes our predictors
(for full details, see~\cite{me05e}). Each description 
includes notes on the space of known tunings within that model. In the sequel,
STAR2 will explore that space. Note that for STAR2, an additional model was
added: the Schedule (or Months) prediction model.

\subsection{Effort Prediction with COCOMO II}

COCOMO predicts development effort in person months where one month is 152
hours (and includes development and management hours). 
In COCOMO, the  {\em scale factors} $SF_i$ of \fig{cparems}
effect effort exponentially (on KSLOC, i.e. Thousand Source Lines of Code)
while {\em effort multipliers} $EM_j$
effect effort linearly:

{\small\begin{equation}\label{eq:coc2}
PM=a*\left(KSLOC^{\left(b+0.01*\sum_{i=1}^{5}SF_i\right)}\right)*\left(\prod_{j=1}^{17}EM_j\right)
\end{equation}}
where KSLOC is estimated
directly or computed from a function point analysis;
 $SF_i$ and $EM_j$ are the {\em scale factors};
{\em effort multipliers} of \fig{cparems};
and
$a$ and $b$ are  domain-specific parameters. In our NASA data,
these ranges\begin{equation}\label{eq:ab}
\left( 3.72 \le a \le 9.18 \right) \wedge \left(0.88 \le b \le 1.09\right) 
\end{equation} 
With the effort multipliers, off-nominal ranges (i.e. \{vl=1, l=2, h=4, vh=5, xh=6\}) change the prediction by some amount.
In the special case of the nominal range (i.e. \{n=3\}), that amount is one; i.e. the nominal
range make no change to the prediction.
Hence, these  ranges  can be modeled as a straight line $y=mx+b$
passing through the point $\{x,y\}$=$\{3,1\}$. Such a line has a y-intercept
of $b=1 - 3m$. Substituting this value of $b$ into $y=mx+b$ yields:
\begin{equation}\label{eq:lineem}\small
\begin{array}{l}
\forall x \in \{1..6\}\; EM_i=m_a(x-3) + 1
\end{array}
\end{equation}
where  $m_a$ denotes the effect of effort multiplier $a$ on {\em effort}.

The effort multipliers form
into two sets:
\be
\item
The {\em positive effort EM} features, with slopes $m^+_a$, that are proportional to effort. 
These features are:
cplx,
data,
docu,
pvol,
rely,
ruse,
stor, and
time.
\item
The
{\em negative effort EM} features, with slopes $m^-_{a}$,
are inversely proportional to effort.
These features are 
acap,
apex,
ltex,
pcap,
pcon,
plex,
sced ,
site,
tool.
\ee
Based on prior work~\cite{boehm00a}, we can describe
the
space of known tunings for COCOMO effort multipliers to be 
\begin{equation}\label{eq:mem}\small
\left(0.073 \le m^+_a \le 0.21\right) \wedge
\left(-0.178 \le m^-_a \le -0.078\right)
\end{equation}
Similarly, using experience from 161 projects~\cite{boehm00a},
we can say that the space of known tunings for the COCOMO scale factors 
(prec, flex, resl,team, pmat)
are:
\begin{equation}\label{eq:linesf}\small
 \forall x \in \{1..6\}\; SF_i=m_b(x - 6) \wedge \left(
-1.56	\le m_b \le -1.014\right)
\end{equation}
where  $m_b$ denotes the effect of scale factor $b$ on {\em effort}.

Note that the above ranges for the slopes were obtained by finding the average slope for each COCOMO attribute for both effort multipliers and scale factors over the range of values of that attribute.

\subsection{Defect Prediction with COQUALMO }
COQUALMO has two core models, used three ways:
\bi
\item
 The {\em defect introduction} model is similar to
\eq{coc2}; i.e. settings to \fig{cparems}'s effort multipliers and scale factors
map to predictions about number of defects.
\item
The {\em defect removal} model represents how various tasks (peer review, execution-based
testing, and automatic analysis) decrease the introduction of defects.
\item
The above two models are repeated three times 
for
defects introduction \&  removal for
requirements, design, or coding.
\ei
COQUALMO follows the same convention as COCOMO for the effort multipliers; i.e.
nominal values ($n=3$) add nothing to the predicted number of defects. As
above, COQUALMO is:
\begin{equation}\label{eq:linedefintro}\small
\begin{array}{l}
 \forall x \in \{1..6\}\; EM_i=m_c(x-3) + 1
\end{array}
\end{equation}
where  $m_c$ denotes the effect of $c$ on {\em defect introduction}.

The effort multipliers and  scale factors form two sets:
\be
\item The {\em positive defect} features, with slopes $m^+_c$, that are proportional
to the estimated introduced defects. These features are 
flex,
data,
ruse,
cplx,
time,
stor, and 
pvol.
\item The {\em negative defect} features, with slopes $m^-_c$, that are inversely proportional
to the estimated introduced defects. These features are 
acap,
pcap,
pcon,
apex,
plex,
ltex,
tool,
site,
sced,
 prec,
resl,
team,
pmat,
rely, and
docu.
\ee
The space of tunings for  defect introducing features are:
\begin{equation}\label{eq:coq}\small
\begin{array}{c}
requirements\left\{
\begin{array}{c}
0 \le m^+_c \le 0.112\\
-0.183 \le m^-_c \le -0.035
\end{array}
\right. \\
~\\
design \left\{
\begin{array}{c}
0 \le m^+_c \le 0.14\\
-0.208 \le m^-_c \le -0.048
\end{array}
\right. \\
~\\
coding \left\{
\begin{array}{c}
0 \le m^+_c \le  0.140\\
-0.19 \le m^-_c \le -0.053
\end{array}
\right.
\end{array}
\end{equation}

\noindent
The space of tunings for  defect removal features are:
\begin{equation}\label{eq:linedefrem}\small
\begin{array}{rl}
\forall x \in \{1..6\} &SF_i=m_d(x - 1)\\
requirements: 	& 0.08 	\le m_d \le 0.14 \\
design: 		& 0.1 	\le m_d \le 0.156 \\
coding: 		& 0.11 	\le m_d \le 0.176 \\
\end{array}
\end{equation}
where  $m_d$ denotes the effect of  $d$ on {\em defect removal}.

\subsection{THREAT: Predicting Effort and Schedule Overrun}\label{sec:threat}

The THREAT model
returns a heuristic estimate of the threat of a
schedule over run in the project. 
This estimation model is dependent upon
the COCOMO effort multipliers

Internally, THREAT contains dozens of tables of the
form of \fig{madeg}. Each such table  adds some ``threat'' value
to the overall project risk when multiplied by
the effort multiplier values of the corresponding COCOMO attributes.
 There are six major categories: schedule, product, personnel, process, platform and reuse.
After the threat for each category is calculated, the sum is
normalized to produce the final threat rating.


\begin{figure}[!t]
{\scriptsize
\begin{center}
\begin{tabular}{|p{0.8in}|c|c|c|c|c|}\cline{2-6}
\multicolumn{1}{c|}{} &rely=&rely=&rely=&rely=&rely=\\
\multicolumn{1}{c|}{}& very & low &nominal & high & very\\
\multicolumn{1}{c|}{}&  low&  & &  &  high\\\hline sced= very
low& 0 & 0 & 0  &1  &2\\\hline sced= low     & 0 &0  & 0 &
0&1\\\hline sced= nominal& 0 & 0 & 0  &0  &0\\\hline sced= high&
0& 0 & 0  & 0 &0\\\hline sced= very high& 0 & 0 & 0  &0 &0\\\hline
\end{tabular}
\end{center}
} \caption{An example risk table}\label{fig:madeg}
\end{figure}

\fig{madeg} can be represented as
an exponentially decaying function that peaks in one corner of the risk table
at a value of two.
All the tables peak at either a value of two  or four.
Since this model is heuristic in nature, the exact height of the peak is
not certain.
When we perform Monte Carlo simulations over THREAT, we vary the height of
the peak by 
a random factor $0.5 \le x \le 1$ if the peak is four, and $0.5 \le x \le 1.5$ if the peak is two.

\subsection{Development Time Prediction\\with COCOMO II}

This is an addition model that has been added to STAR2, adding a degree
of complexity and dimentionality to policy assessment in STAR2. The schedule
model aims at estimating the time to develop a project in calender months.
This model is largely based on the COCOMO II Effort Model in that it uses
that attributes, there values, and the calibrated coefficiants (i.e, $a$ and $b$).
The following are the equations for calculating months:

{\small\begin{equation}\label{eq:mon}
\begin{array}{c}
F=d+0.2*\left(0.01*(\sum_{i=1}^{5}SF_i)\right)\\
TDEV=\left[c*(PM_{NS})^{F}\right]*SCED\%\div100
\end{array}
\end{equation}}
where $PM_{NS}$ is the effort calculated without the inclusion of SCED, 
$SF_i$ are the {\em scale factors} of \fig{cparems},
$c$ and $d$ are  domain-specific parameters that can be calibrated,
and $SCED\%$ is the percentage of schedule relative to the nominal 
schedule. \fig{sced} shows the value of this parameter based on 
SCED.$TDEV$ is the development time in months calculated by this model,
and $F$ is refered to as the scaling exponent for schedule.

\begin{figure}[!t]
{\scriptsize
\begin{center}
\begin{tabular}{c|c}
SCED&SCED\%\\\hline
1&75\\
2&85\\
3&100\\
4&130\\
5&160\\
\end{tabular}
\end{center}
} \caption{The values of SCED\%}\label{fig:sced}
\end{figure}

