1723 search results for "time series"

demodulating time series

February 17, 2014
By
demodulating time series

This posting shows how one might perform demodulation in R. It is assumed that readers are generally familiar tith the procedure. First, create some fake data, a carrier signal with period 10, modulated over a long timescale, and with phase drifting linearly over time. 1 2 3 4 5 6 7 8 9 10 period <- 10 fc <- 1/period fs <- 1 n...

Read more »

Automatic time series forecasting in Granada

January 30, 2014
By

In two weeks I am presenting a workshop at the University of Granada (Spain) on Automatic Time Series Forecasting. Unlike most of my talks, this is not intended to be primarily about my own research. Rather it is to provide a state-of-the-art overview of the topic (at a level suitable for Masters students in Computer Science). I thought I’d provide...

Read more »

Inference for ARMA(p,q) Time Series

January 30, 2014
By
Inference for ARMA(p,q) Time Series

As we mentioned in our previous post, as soon as we have a moving average part, inference becomes more complicated. Again, to illustrate, we do not need a two general model. Consider, here, some  process, where  is some white noise, and assume further that . > theta=.7 > phi=.5 > n=1000 > Z=rep(0,n) > set.seed(1) > e=rnorm(n) > for(t...

Read more »

Inference for MA(q) Time Series

January 29, 2014
By
Inference for MA(q) Time Series

Yesterday, we’ve seen how inference for time series was possible.  I started  with that one because it is actually the simple case. For instance, we can use ordinary least squares. There might be some possible bias (see e.g. White (1961)), but asymptotically, estimators are fine (consistent, with asymptotic normality). But when the noise is (auto)correlated, then it is more...

Read more »

Inference for AR(p) Time Series

January 28, 2014
By
Inference for AR(p) Time Series

Consider a (stationary) autoregressive process, say of order 2, for some white noise with variance . Here is a code to generate such a process, > phi1=.25 > phi2=.7 > n=1000 > set.seed(1) > e=rnorm(n) > Z=rep(0,n) > for(t in 3:n) Z=phi1*Z+phi2*Z+e > Z=Z > n=length(Z) > plot(Z,type="l") Here, we have to estimate two sets of parameters: the autoregressive...

Read more »

Time series data in R

January 28, 2014
By

There is no shortage of time series data available on the web for use in student projects, or self-learning, or to test out new forecasting algorithms. It is now relatively easy to access these data sets directly in R. M Competition data The 1001 series from the M-competition and the 3003 series from the M3-competition are available as part...

Read more »

Quantitative Finance Applications in R – 3: Plotting xts Time Series

January 28, 2014
By
Quantitative Finance Applications in R – 3: Plotting xts Time Series

by Daniel Hanson, QA Data Scientist, Revolution Analytics Introduction and Data Setup Last time, we included a couple of examples of plotting a single xts time series using the plot(.) function (ie, said function included in the xts package). Today, we’ll look at some quick and easy methods for plotting overlays of multiple xts time series in a single...

Read more »

Causal Autoregressive Time Series

January 21, 2014
By
Causal Autoregressive Time Series

In the MAT8181 graduate course on Time Series, we will discuss (almost) only causal models. For instance, with , with some white noise , those models are obtained when . In that case, we’ve seen that was actually the innovation process, and we can write which is actually a mean-square convergent series (using simple Analysis arguments on series). From that...

Read more »

Visualizing Autoregressive Time Series

January 21, 2014
By
Visualizing Autoregressive Time Series

In the MAT8181 graduate course on Time Series, we started discussing autoregressive models. Just to illustrate, here is some code to plot  – causal – process, > graphar1=function(phi){ + nf <- layout(matrix(c(1,1,1,1,2,3,4,5), 2, 4, byrow=TRUE), respect=TRUE) + e=rnorm(n) + X=rep(0,n) + for(t in 2:n) X=phi*X+e + plot(X,type="l",ylab="") + abline(h=mean(X),lwd=2,col="red") + abline(h=mean(X)+2*sd(X),lty=2,col="red") + abline(h=mean(X)-2*sd(X),lty=2,col="red") + u=seq(-1,1,by=.001) + plot(0:1,0:1,col="white",xlab="",ylab="",axes=FALSE,ylim=c(-2,2),xlim=c(-2.5,2.5)) + polygon(c(u,rev(u)),c(sqrt(1-u^2),rev(-sqrt(1-u^2))),col="light yellow")...

Read more »

Estimating a nonlinear time series model in R

January 20, 2014
By
Estimating a nonlinear time series model in R

There are quite a few R packages available for nonlinear time series analysis, but sometimes you need to code your own models. Here is a simple example to show how it can be done. The model is a first order threshold autoregression:     where is a Gaussian white noise series with variance . The following function will generate...

Read more »