.BG
.VE $Header: /usr3/s/current/s/.help/RCS/tsmatrix,v 1.2 83/12/30 19:36:08 rab Exp $
.FN tsmatrix
.TL
tsmatrix: Create Matrix with Time-Series as Columns
.CS
tsmatrix(arg1, arg2, ...)
.PP
.AG argi
time-series to form a column of the resulting matrix.  The
time window for the matrix will be the intersection of time windows for
the arguments (i.e., the maximum of the start dates and
the minimum of the end dates).  All series must have the
same periodicity.
Missing values (NAs) are allowed.
.RT
a matrix with one column for each argument
and a component named `Tsp' with the start date, end date, and number of
observations per year.
.PP
Note the distinction from the related function `cbind'.  This allows
vectors or matrices as arguments as well, but makes no effort to make
time parameters consistent.  Frequently, the two functions can be used
together (see examples).
.EX
tsmatrix(x,lag(x),diff(x)) #x, lag\-1 of x and first diffs
cbind(tsmatrix(x,lag(x)),1) #two series, column of 1s

yx<-tsmatrix(employment,gnp,lag(gnp), ...)
regress(yx[,1],yx[,\-1])  # regression with x and y times aligned
.KW matrix
.KW ts*
.KW structure
.KW array*
.WR
