Plot PMcycle objects, which can be
accessed as the $data
object within the $cycle
field of a PM_result object, e.g.
PM_result$cycle$data
. It is largely now a legacy plotting function and should generally
be replaced by plot.PM_cycle.
Usage
# S3 method for PMcycle
plot(x, x.leg = 0, y.leg = 1, cex.leg = 1.2, omit, col, out = NA, ...)
Arguments
- x
The name of an PMcycle data object generated by makeCycle.
- x.leg
Porportionate location along the X-axis to place legend; 0 (default) is at left, 1 at right.
- y.leg
Porportionate location along the X-axis to place legend; 0 is at bottom, 1 (default) at top.
- cex.leg
Porportionate size of legend text.
- omit
Decimal between 0 and 1 specifying the proportion of "burn-in" cycles to omit from the plots. If missing, the first 20% will be omitted.
- col
A vector of colors for the curves, which will be recycled if too short. Not mandatory.
- out
Direct output to a PDF, EPS or image file. Format is a named list whose first argument,
type
is one of the following character vectors: “pdf”, “eps” (maps topostscript
), “png
”, “tiff
”, “jpeg
”, or “bmp
”. Other named items in the list are the arguments to each graphic device. PDF and EPS are vector images acceptable to most journals in a very small file size, with scalable (i.e. infinite) resolution. The others are raster images which may be very large files at publication quality dots per inch (DPI), e.g. 800 or 1200. Default value isNA
which means the output will go to the current graphic device (usually the monitor). For example, to output an eps file, out=list(“eps”) will generate a 7x7 inch (default) graphic.- ...
Additional R plotting parameters.
Value
Plots a panel with the following windows: -2 times the log-likelihood at each cycle, gamma/lambda at each cycle; Akaike Information Criterion at each cyle and Bayesian (Schwartz) Information Criterion at each cycle, the mean parameter values at each cycle (normalized to starting values); the normalized standard deviation of the population distribution for each parameter at each cycle; and the normalized median parameter values at each cycle.
Examples
library(PmetricsData)
plot(NPex$cycle$data)
#> Don't know how to automatically pick scale for object of type
#> <tbl_df/tbl/data.frame>. Defaulting to continuous.
#> Error in check_aesthetics(evaled, n): Aesthetics must be either length 1 or the same as the data (81).
#> ✖ Fix the following mappings: `y`.
plot(NPex$cycle$data, omit = 0)
#> Don't know how to automatically pick scale for object of type
#> <tbl_df/tbl/data.frame>. Defaulting to continuous.
#> Error in check_aesthetics(evaled, n): Aesthetics must be either length 1 or the same as the data (100).
#> ✖ Fix the following mappings: `y`.