\HeaderA{plot.traj}{Plot sample trajectories of the posterior moments}{plot.traj}
\keyword{~kwd1}{plot.traj}
\keyword{~kwd2}{plot.traj}
\begin{Description}\relax
Plots sample trajectories of the posterior moments that where saved during the forward simulation.
\end{Description}
\begin{Usage}
\begin{verbatim}
plot.traj(traj, term, ntraj, s0, s1, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{traj}] Sample trajectories as in \code{"traj"} argument returned by \code{"read.forwsim"}.
\item[\code{term}] Terminal decisions and posterior moments for sample trajectories as returned by \code{"read.forwsim"}.
\item[\code{ntraj}] Number of trajectories to be plotted.
\item[\code{s0}] Value of the posterior log-standard deviation at which both boundaries cross. The posterior mean at this point is given by \code{b[1]}.
\item[\code{s1}] Value of the posterior log-standard deviation corresponding to the posterior means \code{b[2],b[3]}.
\item[\code{...}] Other arguments to \code{"plot"}. Note that arguments \code{"type","xlim"} and \code{"ylim"} are set automatically so specifying them will cause an error. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Arguments \code{"type","xlim"} and \code{"ylim"} are set automatically and passed to \code{"plot"}, so specifying them will cause an error.
\end{Details}
\begin{Value}
No value returned, the function is used for its side effects.
\end{Value}
\begin{Author}\relax
David Rossell
\end{Author}
\begin{Examples}
\begin{ExampleCode}
dir <- 'C:/R/R-2.2.1/library/forwsim/data'                                  #read forward simulation output
sim1 <- read.forwsim(dir)

plot.traj(sim1$traj,sim1$term,ntraj=20,s0=-3,s1=-2.3,lwd=2)                 #plot 20 trajectories
\end{ExampleCode}
\end{Examples}

