plot.coda: Plot fitted parameters and fitted values of a CoDa mortality...

Description Usage Arguments Details Examples

Description

Plot fitted parameters and fitted values of a CoDa mortality model. Two types of plots are available: "coef" to obtain representations of the three estimated series of parameters and "data" for visualising the input and fitted values.

Usage

1
2
3
## S3 method for class 'coda'
plot(x, plotType = c("coef", "data"), type = "l",
  ylim = NULL, ylab = "", ...)

Arguments

x

An object of class "coda" with the fitted parameters of the mortality model.

plotType

The type of the plot. The alternatives are "coef"(default) and "data".

type

1-character string giving the type of plot desired. The following values are possible, for details, see plot: "p" for points, "l" for lines, "b" for both points and lines, "c" for empty points joined by lines, "o" for overplotted points and lines, "s" and "S" for stair steps and "h" for histogram-like vertical lines. Finally, "n" does not produce any points or lines.

ylim

the y limits of the plot.

ylab

a label for the y axis, defaults to a description of y.

...

other graphical parameters (see par and section ‘Details’ below).

Details

When "plotType = coef" the figure is produced using the basic plot R function plot.

When "plotType = data" the figure is produced using function matplot.

This is important to know in order to use the "..." argument adequately.

Examples

1
2
3
4
5
6
7
8
9
# Fit model
M <- coda(CoDa.data, x = 0:110, y = 1960:2014)

# Plot fitted parameters
plot(M, plotType = "coef")
plot(M, plotType = "coef", type = "p", pch = 19)

# Plot input data and fitted values
plot(M, plotType = "data")

mpascariu/CoDa documentation built on May 5, 2019, 7 p.m.