Displaying 20 results from an estimated 10000 matches similar to: "lm and time series: simple question"
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,
2008 Nov 20
1
different ACF results
Dear all,
I have one Model (M3) fitted using the lme package, and I have
checked the correlation structure of within-group errors using
plot(ACF (M3,maxLag=10),alpha=0.05)
But now I am not sure how to interpret this plot for the empirical
autocorrelation function.
The problem is that I am used to see/interpret diagrams in which all
the autocorrelation Lags, except lag-1, are inside the
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
2010 Aug 30
1
How to Remove Autocorrelation from Simple Moving Average time series
Hi R experts,
I am trying to remove autocorrelation from Simple Moving Average time series. I know that this can be done by using seasonal ARIMA like,
library(TTR)
data <- rnorm(252)
n=21
sma_data=SMA(data,n)
sma_data=sma_data[-1:-n]
acf(sma_data,length(sma_data))
2007 Jul 09
1
When is the periodogram is consistent with white noise?
Hello everyone,
This is my first time posting to the list, thanks in advance.
I am calculating the smoothed periodogram for the residuals of an AR model
that I fit to EEG data. The autocorrelation plot of the residuals shows the
series is now approximately white (i.e. ACF = 1 at lag 0, and close to 0 for
all other lags). I would like to show that the spectrum of the series is
also
2010 Nov 22
2
Help: Standard errors arima
Hello,
I'm an R newbie. I've tried to search, but my search skills don't seem
up to finding what I need. (Maybe I don't know the correct terms?)
I need the standard errors and not the confidence intervals from an
ARIMA fit.
I can get fits:
> coef(test)
ar1 ma1
intercept time(TempVector) - 1900
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
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
2010 Apr 17
2
interpreting acf plot
Hello,
I am attending a course in Computational Statistics at ETH and in one of the assignments I am asked to prove that a time series is not autocorrelated using the R function "acf".
I tried out the acf function with the given data, according to what I found here: http://landshape.org/enm/options-for-acf-in-r/ this test data does not look IID but rather shows some trends so how can I
2010 Apr 29
1
a question on autocorrelation acf
Hi R users,
where can I find the equations used by acf function to calculate
autocorrelation? I think I misunderstand acf. Doesn't acf use following
equation to calculate autocorrelation?
[image: R(\tau) = \frac{\operatorname{E}[(X_t - \mu)(X_{t+\tau} -
\mu)]}{\sigma^2}\, ,]
If it does, then the autocorrelation of a sine function should give a
cosine; however, the following code gives a
2010 Nov 07
1
When using ACF, receive error: no applicable method for 'ACF' applied to an object of class "c('double', 'numeric')"
I am guessing this is a very simple question, but this is only my second day
with R so it is all still a bit imposing.
I am trying to run an autocorrelation.
I imported a CSV file, which has one column labeled "logistic".
I ran the command:
ACF(data$logistic,maxLag=10)
However, I received the error:
Error in UseMethod("ACF") :
no applicable method for 'ACF'
2011 Aug 25
1
Autocorrelation using acf
Dear R list
As suggested by Prof Brian Ripley, I have tried to read acf literature. The main problem is I am not the statistician and hence have some problem in understanding the concepts immediately. I came across one literature (http://www.stat.nus.edu.sg/~staxyc/REG32.pdf) on auto-correlation giving the methodology. As per that literature, the auto-correlation is arrived at as per following.
2005 May 25
1
question: corCAR1 in lme
Hello all,
I am trying to use lme to examine how a response variable (Chla) changes
over time in different treatments (2 Temp & 2 Light levels). Within each
treatment combination, there are two replicate tanks (each with unique
TankID) with coral fragments in them. All tanks are subject to the same
environment until Time=0, when treatments are imposed, and Chla is measured
for each
2012 Jul 26
1
loop for, error: obj type 'closure' not subsetable
Hi everyone,
I've got the following problem:
I've got a matrix [1000,2] and two vectors. In very matrix row there is two
coefficients b0 and b1. The vectors are two variables x and y. I want to do
a loop to take b0 and b1 and with x and y calculate the residual of a linear
model and calculate the second order coefficient of autocorrelation. What I
did is :
rho<-function(mat, x,y){
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
2011 Aug 24
1
Autocorrelation using library(tseries)
Dear R list
I am trying to understand the auto-correlation concept. Auto-correlation is the self-correlation of random variable X with a certain time lag of say t.
The article "http://www.mit.tut.fi/MIT-3010/luentokalvot/lk10-11/MDA_lecture16_11.pdf" (Page no. 9 and 10) gives the methodology as under.
Suppose you have a time series observations as say
X =
2005 Oct 10
1
acf.plot() question
When I run the "acf()" function using the "acf(ts.union(mdeaths,
fdeaths))" example, the "acf()" function calls the "acf.plot()"
function to generate this plot...
http://members.cox.net/ddebarr/images/acf_example.png
The plot in the lower right-hand corner is labeled "fdeaths & mdeaths",
but the negative lags appear to belong to "mdeaths
2009 Aug 05
2
acf Significance
Hi List,
I'm trying to calculate the autocorrelation coefficients for a time
series using acf at various lags. This is working well, and I can get
the coefficients without any trouble. However, I don't seem to be able
to obtain the significance of these coefficients from the returned acf
object, largely because I don't know where I might find them.
It's clear that the acf
2009 May 20
1
stationarity tests
How can I make sure the residual signal, after subtracting the trend extracted through some technique, is actually trend-free ?
I would greatly appreciate any suggestion about some Stationarity tests.
I'd like to make sure I have got the difference between ACF and PACF right.
In the following I am citing some definitions. I would appreciate your thoughts.
ACF(k) estimates the correlation
2008 Jun 26
1
stationary "terminology" time series question
This is not exactly an R question but the R code below may make my
question more understandable.
If one plots sin(x) where x runs from -pi to pi , then the curve hovers
around zero obviously. so , in a"stationary in the mean" sense,
the series is stationary. But, clearly if one plots the acf, the
autocorrelations at lower lags are quite high and, in the "box jenkins"