Performs frequency domain stochastic regression discussed in Chapter 7.
stoch.reg(xdata, cols.full, cols.red=NULL, alpha, L, M, plot.which, col.resp=NULL, ...)
spectrum under the full model
spectrum under the reduced model
regression parameter estimates
pointwise (by frequency) F-tests
coherency
data matrix with the last column being the response variable
specify columns of data matrix that are in the full model
specify columns of data matrix that are in the reduced model (use NULL if there are no inputs in the reduced model)
test size; number between 0 and 1
odd integer specifying degree of smoothing
number (integer) of points in the discretization of the integral
coh
or F.stat
, to plot either the squared-coherencies or the F-statistics, respectively
specify column of the response variable if it is not the last column of the data matrix
additional graphic arguments
D.S. Stoffer
This function computes the spectral matrix, F statistics and coherences, and plots them. Returned as well are the coefficients in the impulse response function.
Enter, as the argument to this function, the full data matrix, and then the labels of the columns of input series in the "full" and "reduced" regression models - enter NULL if there are no inputs under the reduced model.
If the response variable is the LAST column of the data matrix, it need not be specified. Otherwise specify which column holds the responses as col.resp
.
Other inputs are alpha (test size), L (smoothing), M (number of points in the discretization of the integral) and plot.which = "coh" or "F", to plot either the coherences or the F statistics.
You can find demonstrations of astsa capabilities at FUN WITH ASTSA.
The most recent version of the package can be found at https://github.com/nickpoison/astsa/.
In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.
The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.