plot.surface           package:seqdesphII           R Documentation

Contour plot of the estimated expected utility surface.

Description:

     Draws a countour plot of the estimated expected utility for a
     fixed value of 'b0'.

Usage:

     plot.surface(bgrid, u, b0, max = TRUE, textb0 = TRUE, xlab='b1', ylab='b2', ...)

Arguments:

   bgrid: Grid with 'b0','b1','b2' values as the element '"bgrid"'
          returned by '"read.forwsim"'. 

       u: Expected utility for each point in the grid. 

      b0: Only grid points with the indicated 'b0' will be used for
          plotting. 

     max: If set to 'TRUE' the point at which the maximum is achieved
          will be indicated with a square.

  textb0: If 'TRUE', the value of 'b0' will be added to the top right
          of the plot. 

    xlab: x-axis label as in '"contour"'.

    ylab: y-axis label as in '"contour"'.

     ...: Optional arguments to '"contour"'. 

Value:

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

Author(s):

     David Rossell

See Also:

     'contour'

Examples:

     dir <- 'C:/R/R-2.2.1/library/forwsim/data'                              #read forward simulation output
     sim1 <- read.forwsim(dir)

     plot.surface(sim1$bgrid,sim1$u,sim1$b0[5],main='')                      #obtain contour plot for 5th b0 value

