Learn R Programming

MARX (version 0.2)

selection.lag.lead: The lag-lead model selection for MARX function

Description

This function allows you to determine the MARX model (for p = r + s) that maximizes the t-log-likelihood.

Usage

selection.lag.lead(y, x, p_pseudo)

Arguments

y

Data vector of time series observations.

x

Matrix of data (every column represents one time series). Specify NULL or "not" if not wanted.

p_pseudo

Number of autoregressive terms to be included in the pseudo-causal model.

Value

p.C

The number of lags selected.

p.NC

The number of leads selected.

loglikelihood

The value of the loglikelihood for all models with p = r + s.

Examples

Run this code
# NOT RUN {
data <- sim.marx(c('t',3,1), c('t',3,1),100,0.5,0.4,0.3)
selection.lag.lead(data$y,data$x,2)
# }

Run the code above in your browser using DataLab