I'm working with a bivariate time series $(X_{t},Y_{t})$. Looking at the two time series separately, $X_{t}$ appears to be white noise. This is supported by looking at the empirical ACF and PACF of $X_{t}$ and by performing the Ljung-Box-Test for various lags (very high p-values). My model for $X_{t}$ would therefore be:

$$X_{t} = \mu + \epsilon_{t}$$ with $\epsilon_{t} \sim WN(\mu, \sigma_{\epsilon})$.

Looking at the empirical ACF and PACF of the other time series $Y_{t}$ I get significant values of both ACF and PACF even for relatively high lags. This could suggest an ARMA model but using AIC and a maximum model order of $p,q = 5$ points to an AR(1) model, like so:

$$Y_{t} = \alpha_{1}Y_{t-1}+\epsilon^{y}_{t}$$

Finally, I had a look at the empirical cross-correlation function of $Y_{t}$ and $X_{t}$. It shows a significant value for a lag of $h = -1$, that is a significant correlation between $Y_{t}$ and $X_{t+1}$. It would therefore seem appropriate to account for this by letting $X_{t}$ depend on $Y_{t-1}$, yielding something like

$$X_{t} = \mu + \beta_{1}Y_{t-1}+ \epsilon_{t}$$

I'm wondering how I would go about fitting such a model (preferably using R). Would I have to use a package for VAR models and specify the $X_{t-1}$ coefficient for $Y_{t}$ as zero?



1 Answer 1


The VAR() function in the R package "vars" will fit a VAR model.

I suspect it will fit a coefficient for Xt-1, but will not find the estimated coefficient to be significantly different from zero. Here's an example:

base.url <- "http://staff.elena.aut.ac.nz/Paul-Cowpertwait/ts/"
www <- paste0(base.url, "stockmarket.dat")
stock <- read.table(www, header = TRUE)
nyl <- cbind(stock$London, stock$NewYork)
colnames(nyl) <- c("London", "NewYork")
stock.var <- VAR(nyl, type = "const") 

For New York, both Londont-1 and NYt-1 are fit, but only NYt-1 is significantly different from zero.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.