Learn R Programming

tseries (version 0.1-2)

tsparam: Time Series Paramater Object

Description

The "tsparam" class is designed to represent results from time series analysis. It just provides common plot and print methods for estimated parameters.

Usage

tsparam (x, y, xlab="", ylab="", lab="", ybnd=NULL, ysgnf=NULL)
plot (obj, xlim = range(obj$x), ylim = range(attr(obj,"ybnd"),obj$y),
      xlab = attr(obj,"xlab"), ylab = attr(obj,"ylab"),
      type = "l", main = "", grid = TRUE, col = "black", 
      bcol = "blue", gridcol = "lightgrey") 
print (obj, digits = max(3,.Options$digits-3), ...)

Arguments

x,y
the vectors containg the data.
xlab,ylab
the labels of x,y.
lab
an additional label which contains a more detailed description of the "tsparam" object or the way it was build.
ybnd
a list of vectors with the same length as x and y which contains confidence bounds for the y data.
ysgnf
a vector of characters with the same length as x containing the significance codes for the y data.
obj
a "tsparam" object.
xlim,ylim
the ranges of the axes.
xlab,ylab
the axis labels.
type
the type of the plot.
main
a main title string.
grid
a logical indicating whether a grid is plotted.
col, bcol, gridcol
strings specifying the colors for the data, the confidence bounds, and the grid.
digits
the number of digits to format real numbers.
...
additional arguments to print.

Value

  • tsparam constructs and returns a class "tsparam" object. It consists of a list with elements x and y. Attached attributes are "xlab", "ylab", "ybnd", "ysgnf", and "lab". The print and plot methods return the invisible input object.

See Also

plot, print

Examples

Run this code
x <- 1:100
y <- rnorm (100)
t <- tsparam (x,y,"index","random numbers")
plot (t)
print (t)

Run the code above in your browser using DataLab