plot.sim.model {bdpopt}R Documentation

Plot The Results Contained In Simulation Model Object

Description

Plot method for an object of class sim.model.

Usage

## S3 method for class 'sim.model'
plot(x, main.var.name = NULL, main.var.min = -Inf,
  main.var.max = Inf, fixed = list(), no.legends = FALSE,
no.reg = FALSE, reg.steps = 100, ...)

Arguments

x

A simulation model object obtained as output from eval.on.grid, fit.gpr or fit.loess.

main.var.name

A name for the main variable to be used when plotting. This defines the variable that varies along the x-axis of the plot. The full name of the variable must be given as a string, i.e., the name must include array brackets and array indices.

main.var.min

The minimum value for the main variable.

main.var.max

The maximum value for the main variable.

fixed

A list of vectors with named entries. Each such vector defines a set of fixed values for the remaining decision variables. The number of curves in the plot will be equal to the length of fixed. Note that the names of the entries must be written in full array notation, including explicit brackets and indices.

no.legends

By default, legends are included with numbers corresponding to the entries of fixed. Set no.legends to TRUE to remove it.

no.reg

Set to TRUE in order so suppress plotting of the regression curves.

reg.steps

The number of steps to use when plotting the regression curves.

...

Not used.

Details

The simulation grid points included in the plot are selected as follows:

  1. All points for which the value of the decision variable defined by main.var.name is not within the region defined by main.var.min and main.var.max are excluded from the total set of grid points.

  2. For the points remaining, any point which does not correspond to a value listed in fixed is excluded.

In the special case when there is only one decision variable, only the model x needs to be specified. In the special case when there are only two decision variables, fixed may also be given as a vector. It then specifies the values of the secondary variable and one curve will be drawn for each value.

The default behaviour is to also plot the fitted regression function if it is available, with one curve corresponding to each of the point sets defined by the entries of fixed.

Value

Returns NULL.

Author(s)

Sebastian Jobjörnsson jobjorns@chalmers.se


[Package bdpopt version 1.0-1 Index]