Learn R Programming

fda (version 2.4.0)

phaseplanePlot: Phase-plane plot

Description

Plot acceleration (or Ldfobj2) vs. velocity (or Lfdobj1) of a function data object.

Usage

phaseplanePlot(evalarg, fdobj, Lfdobj1=1, Lfdobj2=2,
        lty=c("longdash", "solid"),
      labels=list(evalarg=seq(evalarg[1], max(evalarg), length=13),
             labels=monthLetters),
      abline=list(h=0, v=0, lty=2), xlab="Velocity",
      ylab="Acceleration", returnMatrix=FALSE, ...)

Arguments

evalarg
a vector of argument values at which the functional data object is to be evaluated. Defaults to a sequence of 181 points in the range specified by fdobj[["basis"]][["rangeval"]]. If(length(evalarg) == 1)it is replaced by seq(evalar
fdobj
a functional data object to be evaluated.
Lfdobj1
either a nonnegative integer or a linear differential operator object. The points plotted on the horizontal axis are eval.fd(evalarg, fdobj, Lfdobj1). By default, this is the velocity.
Lfdobj2
either a nonnegative integer or a linear differential operator object. The points plotted on the vertical axis are eval.fd(evalarg, fdobj, Lfdobj2). By default, this is the acceleration.
lty
line types for the first and second halves of the plot.
labels
a list of length two: evalarg = a numeric vector of 'evalarg' values to be labeled. labels = a character vector of labels, replicated to the same length as labels[["evalarg"]] in case it's not of the same length.
abline
arguments to a call to abline.
xlab
x axis label
ylab
y axis label
returnMatrix
logical: If TRUE, a two-dimensional is returned using a special class from the Matrix package.
...
optional arguments passed to plot.

Value

  • Invisibly returns a matrix with two columns containg the points plotted.

See Also

plot, eval.fd plot.fd nondurables index

Examples

Run this code
goodsbasis <- create.bspline.basis(rangeval=c(1919,2000),
                                   nbasis=161, norder=8)
LfdobjNonDur <- int2Lfd(4)

library(zoo)
logNondurSm <- smooth.basisPar(argvals=index(nondurables),
                y=log10(coredata(nondurables)), fdobj=goodsbasis,
                Lfdobj=LfdobjNonDur, lambda=1e-11)
phaseplanePlot(1964, logNondurSm$fd)

Run the code above in your browser using DataLab