[This article was first published on Xi'an's Og » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In the
p=10 T=260 dat=seri=rnorm(T) #white noise par(mfrow=c(2,2),mar=c(2,2,1,1)) for (i in 1:4){ coef=runif(p,min=-.5,max=.5) for (t in ((p+1):T)) seri[t]=sum(coef*seri[(t-p):(t-1)])+dat[t] plot(seri,ty="l",lwd=2,ylab="") }
leading to outputs like the following one
Filed under: Books, R, Statistics, University life Tagged: AR(p) model, Bayesian Core, polynomials, R, stationarity, time series
To leave a comment for the author, please follow the link and comment on their blog: Xi'an's Og » R.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.