similar to: time series regression

Displaying 20 results from an estimated 3000 matches similar to: "time series regression"

2008 Feb 05
3
C-index
Hi I am using Cox regression to identify at risk groups. How can I get the C-index in R? Thanks, Bereket <'r-help@stat.math.ethz.ch'> [[alternative HTML version deleted]]
2011 Jun 08
1
Autocorrelation in R
Hi, I am trying to learn time series, and I am attending a colleague's course on Econometrics. However, he uses e-views, and I use R. I am trying to reproduce his examples in R, but I am having problems specifying a AR(1) model. Would anyone help me with my code? Thanks in advance! Reproducible code follows: download.file("https://sites.google.com/a/proxima.adm.br/main/ex_32.csv
2008 Jul 27
1
help with durbin.watson
Hi, I have two time series, y and x. Diff(y) and Diff(x) both show no autocorrelation. But durbin.watson(lm(Diff(y)~lag(Diff(x),k=-4)) gives a DW value of zero. How come the residule is autocorrelated while Diff(y) and Diff(x) are not? Does anyone know if in my case a DW of zero indicates serial correlation, or is it telling me that the DW statistics is not the appropriate statistics to use here?
2006 Dec 06
1
Questions about regression with time-series
Hi, I am using 2 times series and I want to carry out a regression of Seri1 by Serie2 using structured (autocorrelated) errors. (Equivalent to the autoreg function in SAS) I found the function gls (package nlme) and I made: gls_mens<-gls(mening_s_des~dataATB, correlation = corAR1()) My problem is that I don’t want a AR(1) structure but ARMA(n,p) but the execution fails :
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
2008 Feb 06
2
Multivariate Maximum Likelihood Estimation
Hi, I am trying to perform Maximum Likelihood estimation of a Multivariate model (2 independent variables + intercept) with autocorrelated errors of 1st order (ar(1)). Does R have a function for that? I could only find an univariate option (ar.mle function) and when writing my own I find that it is pretty memory-consuming (and sometimes wrong) so there must be a better way. Thanks, KB
2012 May 25
1
Problem with Autocorrelation and GLS Regression
Hi, I have a problem with a regression I try to run. I did an estimation of the market model with daily data. You can see to output below: /> summary(regression_resn) Time series regression with "ts" data: Start = -150, End = -26 Call: dynlm(formula = ror_resn ~ ror_spi_resn) Residuals: Min 1Q Median 3Q Max -0.0255690 -0.0030378 0.0002787
2007 Nov 27
1
Difference between AIC in GLM and GLS - not an R question
Hi, I have fitted a model using a glm() approach and using a gls() approach (but without correcting for spatially autocorrelated errors). I have noticed that although these models are the same (as they should be), the AIC value differs between glm() and gls(). Can anyone tell me why they differ? Thanks, Geertje ~~~~ Geertje van der Heijden PhD student Tropical Ecology School of Geography
2013 Jan 09
1
How to estate the correlation between two autocorrelated variables
Dear R users, In my data, there are two variables t1 and t2. For each observation of t1 and t2, two location indicators (x, y) were provided. The data format is # x y t1 t2 Since the both t1 and t2 are depended on x and y, t1 and t2 are autocorrelated variables. My question is how to calculate the correlation between t1 and t2 by taking into account the structure of residual variance
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
2009 Aug 25
1
Autocorrelation and t-tests
Hi, I have two sets of data for a given set of (non-lattice) locations. I would like to know whether the two are significantly different. This would be simple enough if it wasn't for the fact that the data is spatially autocorrelated. I have come across several possible solutions (including Cliff & Ord which however appears to be for gridded data), or using gls. However, they don't
2011 Mar 16
1
Autocorrelation in linear models
I have been reading about autocorrelation in linear models over the last couple of days, and I have to say the more I read, the more confused I get. Beyond confusion lies enlightenment, so I'm tempted to ask R-Help for guidance. Most authors are mainly worried about autocorrelation in the residuals, but some authors are also worried about autocorrelation within Y and within X vectors
2009 Aug 05
2
Durbin-Watson
Hi, I ran an experiment with 3 factors, 2 levels and 200 replications and as I want to test for residuals independence, I used Durbin-Watson in R. I found two functions (durbin.watson and dwtest) and while both are giving the same rho, the p-values are greatly differ: > durbin.watson(mod1) lag Autocorrelation D-W Statistic p-value 1 -0.04431012 2.088610 0.012 Alternative
2002 Apr 19
4
Durbin-Watson test in packages "car" and "lmtest"
Hi, P-values in Durbin-Watson test obtained through the use of functions available in packages "lmtest" and "car" are different. The difference is quite significant. function "dwtest" in "lmtest" is much faster than "burbinwatson" in "car". Actually, you can take a nap while the latter trying to calculated Durbin-Watson test. My question
2004 Apr 16
2
regression and dw
Dear R People: Suppose we have a regression model that we will call y.lm We run the Durbin Watson test for autocorrelation and we find that there is positive autocorrelation, and phi = 0.72, say. What is our next step, please? Do we calculate the following yprime_t = y_t - 0.72y_t-1, x1prime_t = x1_t - 0.72x1_t-1, and so on, and re-fit the linear mode? I haven't done this in a while.
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
2009 Aug 03
1
Comparison of Output from "dwtest" and "durbin.watson"
Should "dwtest" and "durbin.watson" be giving me the same DW statistic and p-value for these two fits? library(lmtest) library(car) X <- c(4.8509E-1,8.2667E-2,6.4010E-2,5.1188E-2,3.4492E-2,2.1660E-2, 3.2242E-3,1.8285E-3) Y <- c(2720,1150,1010,790,482,358,78,35) W <- 1/Y^2 fit <- lm(Y ~ X - 1) dwtest(fit,alternative="two.sided")
2004 Aug 18
1
Gee
I am trying to learn the gee function in R. So I try to generate some data and use this function. I have the following lines: ######################################## Gee # Generating lny=10+2*Si-Si^2+eta # eta ~ N(0,1) # Si ~ U(0,11) eta <- vector(mode="numeric",100) eta <- rnorm(100) Si <- vector(mode="numeric",100) Si <- runif(100, min=0, max=11) lny <-
2003 Jan 06
2
Removing autocorrelations
Could anyone tell me whether there is an R function for removing autocorrelations from a series of observations before performing a linear or nonlinear regression analysis on them? Many thanks, Andrew Wilson
2005 Feb 10
2
correcting for autocorrelation in models with panel data?
Hi I have some panel data for the 50 US states over about 25 years, and I would like to test a simple model via OLS, using this data. I know how to run OLS in R, and I think I can see how to create Panel Corrected Standard Errors using http://jackman.stanford.edu/classes/350C/pcse.r What I can't figure out is how to correct for autocorrelation over time. I have found a lot of R stuff on