similar to: Extract lags from a formula

Displaying 20 results from an estimated 20000 matches similar to: "Extract lags from a formula"

2006 May 15
3
Dyn or Dynlm and out of sample forecasts
All: How do I obtain one step ahead out-of-sample forecasts from a model using "dyn" or "dynlm" ? Thanks! Best, John [[alternative HTML version deleted]]
2006 Jun 21
5
colClasses
Hi Folks! I'm reading in some data from a .csv file that has a date column. How do I use colClasses to get read.csv to recognize the date column? The documentation on this seems to be nil - And yes, I've read help and R Data Import/Export and can't figure out what the colClasses syntax is. Thanks, john [[alternative HTML version deleted]]
2011 Sep 20
2
ARIMA - Skipping intermediate lags
Hello, I am a new R user. I am trying to use the arima command, but I have a question on intermediate lags. I want to run in R the equivalent Stata command of ARIMA d.yyy, AR(5) MA(5 7). This would tell the program I am interested in AR lag 5, MA lag 5, and MA lag 7, all while skipping the intermediate lags of AR 1-4, and MA 1-4, 6. Is there any way to do this in R? Thank you. -- View this
2006 Jun 23
3
Problems with weekday extraction from zoo objects
Hi Folks! I'm struggling with dates - but enough about my personal life..... I have two daily time series files. In one (x) the date format is Y/m/d and the other (y) is d/m/y. I used read.zoo on both and they read into R with no problem. Then I use: weekdays(as.Date(x$DATE)) and get what I expect - all the days of the week in my data set. When I use:
2010 Jul 31
1
Lags and Differences of zoo Objects
Hi, I'm struggling to understand the documentation. ?lag.zoo x - a "zoo" object. k, lag - the number of lags (in units of observations). Note the sign of k behaves as in lag. differences - an integer indicating the order of the difference. What does the above line actually mean? I've tried a few settings on sample data but can't figure out what it is doing. x <-
1998 Jul 07
2
S speedup in R
Venables and Ripley describe a speedup where you take a structure like x<-NULL for(i in sequence) y<-c(y,function(x,i)) and convert it to one like x<-numeric(its length) for(i in sequence) y[i]<-function(x,i) I tried this speedup on some simple examples and it made them twice as fast. But now I am hitting a snag with some real code. This original version works:
2005 Aug 14
1
Panel data handling (lags, growth rates)
I have written two functions which do useful things with panel data a.k.a. longitudinal data, where one unit of observation (a firm or a person or an animal) is observed on a uniform time grid: - The first function makes lagged values of variables of your choice. - The second function makes growth rates w.r.t. q observations ago, for variables of your choice. These strike me as
2002 May 28
1
determination of the number of lags
Dear all, I wish use the "est.variogram" function under R. My question concerns the determination of number of lags. To make this calculation, i determined the biggest and the smallest distance between 2 pairs of points. I built the following tolerance : tol=mindistance/2 and i defined 1 lag as : 1lag=mindist+tol. Then i made a buckle the step of stop of which the maximal distance.
2004 May 11
2
lags and differences
Dear all, could someone please clarify me if this works, so as to implement lags and differences for example in y and in a independent x1 of a regression? model<-lm((diff(y), -i)~x1+lag(x1,-1), data=anydata) Thanks, a lot, Alexandre. ---------- In??cio da mensagem original ----------- De: r-help-bounces at stat.math.ethz.ch Para: r-help at stat.math.ethz.ch Cc:
2003 Oct 21
2
Polynomial lags
Does anybody know if there is a built in fuction to use create polynomial distributed lags (sometimed called Almon lag) on linear models? Thanks Francisco _________________________________________________________________ See when your friends are online with MSN Messenger 6.0. Download it now
2009 Sep 11
2
How to Label Certain Lags for a PACF Graph
When I use the command for PACF, lags 5, 10, 15, and 20 are labeled. I would like to label lag 1. I would greatly appreciate if someone could tell me how to do this. Below is the command that I am using: pacf(data$R1,main="Series R1 Residuals") [[alternative HTML version deleted]]
2004 Feb 03
4
R: lags and plots
Hi all I want to calculate certain lags of a time series and plot them simultaneously on a graph. can anyone help?
2008 Jan 31
1
Feature request: about lag(), which.min() and cat().
Hello I'm only user of R and have many little knowledge in programming but I permit to send you some whishes/suggestions for R. which.min like which(), which.min() should also include an argument arr.ind. Note that one can have it with which(a==min(a), arr.ind=TRUE) but if there is a reason to build a special function which.min, why not add also this nice argument? lag() If one wants to
2010 Dec 26
2
What is the best way to lag a time series?
Dear R-users, I've been using R for a while and I am very satisfied! Unfortunately, I still have not figured out an efficient and general way to construct and use lags of time series, especially when I need to work with different packages. Let me give an example. I have two time series x and y and I want to estimate a variaty of distributed lags models and run different tests
2003 Sep 08
2
pacf lags
pacf in devel seems by default to return a different number of lags than 1.7.1 for $pacf. I don't see any mention of this in the NEWS file, or any change in the documentation, so I suspect it is and error, though it may be an undocumented improvement. (Newbie question: How is the simplest way to display a function like pacf.default that is not exported from a namespace?) Paul
2006 May 16
1
Substitute and quotes
Hi folks! I'm trying to update a model using: form <- substitute(.~.-bad.var, list(bad.var=bad.var)) model.update<-update(model, form) where bad.var is a character string like lag(X1, 10) The problem is that substitute puts lag(X1, 10) in quotes - something I don't want it to do. It even does this if I use noquote(bad.var). Any suggestions around this? Thanks!
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
2012 Feb 03
1
A question on Unit Root Test using "urca" toolbox
Hello, I have a question on unit root test with urca toolbox. First, to run a unit root test with lags selected by BIC, I type: > CPILD4UR<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags=12, selectlags ="BIC") > summary(CPILD4UR) The results indicate that the optimal lags selected by BIC is 4. Then I run the same unit root test with drift and 4 lags:
2006 Jul 02
1
Calculation of lags
Hi, If I have the follow situation: A dependent variable (i.e. number of insects) that is affected by an independent variable (i.e. rain). The problem is that the measure of rain affect the population in other moment. So there exit a lag between the rain and the number of insects. Exist in R any tool to find what is this lag? Explain better. Suppose that I have a linear relationship
2008 Aug 01
3
Reading data in R-metrics
Hi Folks! I used the code below previously with no problems, but now I get: DTB3<-read.table("C:\\Program Files\\R\\R-2.7.1\\DTB3.csv",header=TRUE,sep=",") > tail(DTB3) DATE VALUE 14233 2008-07-23 1.56 14234 2008-07-24 1.62 14235 2008-07-25 1.71 14236 2008-07-28 1.70 14237 2008-07-29 1.69 14238 2008-07-30 1.67 >