plot.traj             package:seqdesphII             R Documentation

Plot sample trajectories of the posterior moments

Description:

     Plots sample trajectories of the posterior moments that where
     saved during the forward simulation.

Usage:

     plot.traj(traj, term, ntraj, s0, s1, ...)

Arguments:

    traj: Sample trajectories as in '"traj"' argument returned by
          '"read.forwsim"'.

    term: Terminal decisions and posterior moments for sample
          trajectories as returned by '"read.forwsim"'.

   ntraj: Number of trajectories to be plotted.

      s0: Value of the posterior log-standard deviation at which both
          boundaries cross. The posterior mean at this point is given
          by 'b[1]'.

      s1: Value of the posterior log-standard deviation corresponding
          to the posterior means 'b[2],b[3]'.

     ...: Other arguments to '"plot"'. Note that arguments
          '"type","xlim"' and '"ylim"' are set automatically so
          specifying them will cause an error. 

Details:

     Arguments '"type","xlim"' and '"ylim"' are set automatically and
     passed to '"plot"', so specifying them will cause an error.

Value:

     No value returned, the function is used for its side effects.

Author(s):

     David Rossell

Examples:

     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

