similar to: Generating AR1 data

Displaying 20 results from an estimated 10000 matches similar to: "Generating AR1 data"

2007 Feb 26
1
Partial whitening of time series?
I have a time series with a one year lag, ar=0.5. The series has some interesting events that disappear when the series is whitened (i.e., fitting an AR process and looking at the residuals). I'd like to remove the autocorrelation in stages to see the effect on the time series. Is there a way to specify the autocorrelation term while fitting an AR process? For instance, given the following:
2011 Nov 22
1
arima.sim: innov querry
Apologies for thickness - I'm sure that this operates as documented and with good reason. However... My understanding of arima.sim() is obviously imperfect. In the example below I assume that x1 and x2 are similar white noise processes with a mean of 5 and a standard deviation of 1. I thought x3 should be an AR1 process but still have a mean of 5 and a sd of 1. Why does x3 have a mean of ~7?
2005 Mar 05
4
How to use "lag"?
Is it possible to fit a lagged regression, "y[t]=b0+b1*x[t-1]+e", using the function "lag"? If so, how? If not, of what use is the function "lag"? I get the same answer from y~x as y~lag(x), whether using lm or arima. I found it using y~c(NA, x[-length(x)])). Consider the following: > set.seed(1) > x <- rep(c(rep(0, 4), 9), len=9) > y <-
2007 Aug 31
3
Choosing the optimum lag order of ARIMA model
Dear all R users, I am really struggling to determine the most appropriate lag order of ARIMA model. My understanding is that, as for MA [q] model the auto correlation coeff vanishes after q lag, it says the MA order of a ARIMA model, and for a AR[p] model partial autocorrelation vanishes after p lags it helps to determine the AR lag. And most appropriate model choosed by this argument gives
2004 Mar 09
2
corARMA and ACF in nlme
Hi R-sters, Just wondering what I might be doing wrong. I'm trying to fit a multiple linear regression model, and being ever mindful about the possibilities of autocorrelation in the errors (it's a time series), the errors appear to follow an AR1 process (ar(ts(glsfit$residuals)) selected order 1). So, when I go back and try to do the simultaneous regression and error fit with gls,
2005 Apr 15
1
AR1 in gls function
Dear R-project users I would like to calculate a linear trend versus time taking into account a first order autoregressive process of a single time series (e.g. data$S80 in the following example) using th gls function. gls(S80 ~ tt,data=data,corAR1(value, form, fixed)) My question is what number to set in the position of value within corAR1? Should it be the acf at lag 1? I look forward for
2016 Mar 23
3
ACF retardos múltiplos del periodo
Hola, Estoy visualizando una serie temporal para determinar sus órdenes ARIMA y no consigo lo siguiente: ¿Cómo puedo sacar la ACF de los retardos múltiplos del periodo? Es decir, sólo ver en el gráfico ACF los retardos 12, 24, 36... Gracias!! David [[alternative HTML version deleted]]
2007 Mar 13
1
AR(1) and gls
Hi there, I am using gls from the nlme library to fit an AR(1) regression model. I am wondering if (and how) I can separate the auto-correlated and random components of the residuals? Id like to be able to plot the fitted values + the autocorrelated error (i.e. phi * resid(t-1)), to compare with the observed values. I am also wondering how I might go about calculating confidence (or
2006 Mar 04
1
replicated time series - lme?
Dear R-helpers, I have a time series analysis problem in R: I want to analyse the output of my simulation model which is proportional cover of shrubs in a savanna plot for each of 500 successive years. I have run the model (which includes stochasticity, especially in the initial conditions) 17 times generating 17 time series of shrub cover. I am interested in a possible periodicity of shrub
2007 Jul 16
1
question about ar1 time series
Hello everybody, I recently wrote a "program" that to generate AR1 time series, here the code: #By Jomopo. Junio-2007, Leioa, Vizcaya #This program to create the AR1 syntetic series (one by one) #Where the mean is zero, but the variance of the serie AR1 and #the coef. of AR1 are be changed. If var serie AR1 = 1 then is standarized! #Final version for AR1 time series program #Mon Jul
2007 Jan 16
2
ARIMA xreg and factors
I am using arima to develop a time series regression model, I am using arima b/c I have autocorrelated errors. Several of my independent variables are categorical and I have coded them as factors . When I run ARIMA I don't get any warning or error message, but I do not seem to get estimates for all the levels of the factor. Can/how does ARIMA handle factors in xreg? here is some example
2008 May 22
1
How to account for autoregressive terms?
Hi, how to estimate a the following model in R: y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3) 1) using "lm" : dates &lt;- as.Date(data.df[,1]) selection&lt;-which(dates&gt;=as.Date("1986-1-1") &amp; dates&lt;=as.Date("2007-12-31")) dep &lt;- ts(data.df[selection,c("dep")]) indep.ret1
2008 May 15
2
How to remove autocorrelation from a time series?
Dear R users, someone knows how to remove auto-correlation from a frequencies time series? I've tried by differencing (lag 1) the cumulative series (in order to have only positive numbers) , but I can't remove all auto-correlation. If it's useful I can send my db. x <- # autocorrelated series new1<-cumsum(x) new2<-diff(new1,lag=1,differences = 1) acf(new2) #
2011 Jul 07
3
AR vs ARIMA question
Dear R People: Here is some output from AR and ARIMA functions: > xb <- arima.sim(n=120,model=list(ar=0.85)) > xb.ar <- ar(xb) > xb.ar Call: ar(x = xb) Coefficients: 1 0.6642 Order selected 1 sigma^2 estimated as 1.094 > xb.arima <- arima(xb,order=c(1,0,0),include.mean=FALSE) > xb.arima Call: arima(x = xb, order = c(1, 0, 0), include.mean = FALSE)
2003 Apr 30
2
Bug in arima?
I'm using the fixed argument in arima. Shouldn't ar4, ar5, and ar6 display as zero in the output? Call: arima(x = window(log(hhprice), start = c(1990, 1), end = c(2003, 3)), order = c(7, 1, 0), xreg = window(ts.union(exa1 = lag(exa, -1), exa12 = lag(exa, -12), exb1 = lag(exb, -1), exc1 = lag(exc, -1), exc12 = lag(exc, -12)), start = c(1990, 1), end = c(2003, 3)),
2005 Jul 08
2
time series regression
Hi: I have two time series y(t) and x(t). I want to regress Y on X. Because Y is a time series and may have autocorrelation such as AR(p), so it is not efficient to use OLS directly. The model I am trying to fit is like Y(t)=beta0+beta1*X(t)+rho*Y(t-1)+e(t) e(t) is iid normal random error. Anybody know whether there is a function in R can fit such models? The function can also let me specify
2004 Mar 04
2
adding trend to an arima model
Hi, Does anyone know a method for adding a linear/polynominal trend to a simulated arima model using the arima.sim function? Any help will be greatly appreciated. Cheers, Sam.
2005 Mar 31
2
how to simulate a time series
Dear useRs, I want to simulate a time series (stationary; the distribution of values is skewed to the right; quite a few ARMA absolute standardized residuals above 2 - about 8% of them). Is this the right way to do it? #-------------------------------- load("rdtb") #the time series > summary(rdtb) Min. 1st Qu. Median Mean 3rd Qu. Max. -1.11800 -0.65010 -0.09091
2004 Jul 21
2
Testing autocorrelation & heteroskedasticity of residuals in ts
Hi, I'm dealing with time series. I usually use stl() to estimate trend, stagionality and residuals. I test for normality of residuals using shapiro.test(), but I can't test for autocorrelation and heteroskedasticity. Is there a way to perform Durbin-Watson test and Breusch-Pagan test (or other simalar tests) for time series? I find dwtest() and bptest() in the package lmtest, but it
2009 Apr 09
1
arima on defined lags
Dear all, The standard call to ARIMA in the base package such as arima(y,c(5,0,0),include.mean=FALSE) gives a full 5th order lag polynomial model with for example coeffs Coefficients: ar1 ar2 ar3 ar4 ar5 0.4715 0.067 -0.1772 0.0256 -0.2550 s.e. 0.1421 0.158 0.1569 0.1602 0.1469 Is it possible (I doubt it but am