Displaying 20 results from an estimated 1397 matches for "lags".

Did you mean:
flags

2006 Jun 13

3

Multiple lag.plots per page

Hi,
I'm trying to plot several lag.plots on a page, however the second plot
replaces the first one (although it only takes up the upper half as it
should):
par(mfrow=c(2,1))
a<-sin(1:100)
b<-cos(1:100)
lag.plot(a)
lag.plot(b)
What's the trick to this?
I'm using R 2.2.1 (2005-12-20 r36812) on Ubuntu Linux.
Thanks,
Gad
--
Gad Abraham
Department of Mathematics and

2011 Oct 06

1

Coefficients for lagged plm model variables not calculated

...hat I just can't figure out.
I am using the plm package to conduct a panel analysis - although I am not
sure if the problem is arising as a result of the plm package or something
more general.
I am trying to run a fixed effects model with effects over time and
individual. The model has various lags, and the problem is that these lags
do not seem to always be taken into account when the plm model is calculated
(i.e no coefficients are calculated for some of the lagged regressors when
>summary(plm.object) is called).
I have used exactly the same ".txt" file before, with exactly th...

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 message...

2005 Aug 18

1

How do I make a Sweave + latex table out of this ?

Dear list,
I have a table that I would like to convert to latex for inclusion
into a Sweave file.
> round(ftable(prop.table(xtabs(~agemF + votcat + Type , data=work),margin=2))*100,1)
Type Voiced Voiceless unaspirated Voiceless aspirated
agemF votcat
18 - 24 Prevoiced 2.6 8.7

2010 May 06

1

question about rolling regressions

Hi All,
I am using R 2.11.0 on a Ubuntu machine. I have a time series data set and
want to run rolling regressions with it. Any suggestions would be useful.
Here are the details:
(1) I convert relevant variables into time series objects and compute first
differences:
vad <- ts(data$ALLGVA/data$GDPDEF, start=1948, frequency=1)
emp <- ts(data$ALLEMP, start=1948, frequency=1)
vad.dif1

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]]

2009 Oct 07

0

error using predict() / "fRegression"-package

Hello!
I'm puzzled by the following problem. It occurs while trying to predict
responses in a test-dataset using a linear model fitted with regFit from
the rMetrics "fRegression"-package.
All goes well when I call "predict" using the training dataset. However,
a call using the test-dataset retuns an error message - telling me that
the latter dataset provides variables

2008 Feb 02

1

ARCH LM test for univariant time series

Hi,
Does anyone know if R has a Lagrange multiplier (LM) test for ARCH
effects for univariant time series?
Thanks!
--
Tom
[[alternative HTML version deleted]]

2004 Sep 07

3

Maximum tollerable lag/jitter for IAX2 w/o jitterbuffer enabled?

I'm having a problem with intersite calls over IAX2 being abruptly
terminated. Nothing odd shows in any of the logs for Asterisk or the host.
The only think I can think it might be is a lag-spike on the site to site
connection.
How sensitive is IAX2 to lost frames, lag spikes or large variations in
jitter with the GSM codec and:
bandwidth=low
jitterbuffer=no
trunkfreq=100 ; Raised from

2006 Aug 18

3

Query: how to modify the plot of acf

I need to modify the graph of the autocorrelation. I tried to do it through plot.acf but with no success.
1. I would like to get rid of the lag zero
2. I would like to have numbers on the x-axis only at lags 12, 24, 36, 48, 60, ...
Could anybody help me in this?
Any help will be appreciated
Thank you for your attention
Stefano
[[alternative HTML version deleted]]

2001 Mar 23

0

Re: Finding functions (eg. 'lag')

Many thanks to those who gave me a loaf, and others who taught me how to
fish!
Stuart
>
> > From: "Dr Stuart Leask" <stuart.leask at nottingham.ac.uk>
> > To: "R-help" <r-help at stat.math.ethz.ch>
> > Subject: [R] 'lag' in R?
> > Date: Thu, 22 Mar 2001 16:46:18 -0000
> > X-Priority: 3
> > X-MSMail-Priority: Normal

2013 Apr 01

1

Parameter Estimation in R with Sums and Lagged Variables

...My first try looks like this:
parameters<-function(alpha,y){
logl<- for(i in 1:n){
sum((alpha[1]+alpha[2]*i)*lag(xvar,i))
}
return(-logl)
}
optim(c(0.001,0.001),parameters,y=yvar)
It is really hard to find any clear sources when it comes to optimization
including lags.
I would really appreciate if someone could help me out on this one!
Kind regards & Happy Easter,
Christian
[[alternative HTML version deleted]]

2011 Feb 23

5

mgcv: beta coefficient and 95%CI

Hi i am doing an environmental research
The equation is as follow:
gam(y1 ~ x1 + s(x2) + s(x3) + s(x4), family = gaussian, fit = true)
I would like to obtain the beta coefficient and 95CI of x4 (or s(x4)), what
should I do?
Thanks,
Lung
--
View this message in context: http://r.789695.n4.nabble.com/mgcv-beta-coefficient-and-95-CI-tp3320491p3320491.html
Sent from the R help mailing

2004 Jan 08

1

Help with acf

I would like to get the result of acf min of lag 2 and max of lag 50.
When I use time series ( acf, lag.max = 50, type="covariance"), I
got lag 0 to lag 50. How do I get lag 2 to lag 50?
Sincerely,
Stephen

2011 Jun 18

0

Unexpected result with lag() et diff() in plm package.

I have an unexpected result with the functions lag() and diff() in the plm
(panel data) package when used with transform(). These plm-specific
functions are supposed to generate lags and first differences within each
panel.
lag() does not work properly the first time (it reproduces the same
series--this is a common time series pitfall), BUT then it does work
properly when it is run a second time. (This is demonstrated in the code
below.
diff() does not work at all if it is r...

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

2007 Aug 31

3

Choosing the optimum lag order of ARIMA model

...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 min AIC.
Now I considered following data :
2.1948 2.2275 2.2669 2.2839 1.9481 2.1319 2.0238 2.3109 2.5727 2.5176
2.5728 2.6828 2.8221 2.879 2.8828 2.9955 2.9906 2.9861 3.0452 3.068
2.9569 3.0256...

2006 Jan 06

2

panel data unit root tests

...ing point because it demonstrates
how we should be able to move the very basic R matrices. I have a real-
world small N data set with
rows:
id(n=1)---t1---variable1
...
id=(N=20)---T=21---variable1
Thus, a good test case. For first id I was considering something like this:
lag <- as.integer(lags)
lags.p <- lags + 1
id <- unique(group)
id.l <- length(id)
y.l <- length(y)
yid.l <- length(y)/id.l
if (lag > yid.l -2)
stop("\nlag too long for defined cross-sections.\n")
#for (i in id) {
lagy <- y[2:yid.l]
lagy.em <- embed(lagy, lags)
i...

2012 Jun 26

2

Ljung-Box test (Box.test)

I fit a simple linear model y = bX to a data set today, and that produced 24 residuals (I have 24 data points, one for each year from 1984-2007). I would like to test the time-independence of the residuals of my model, and I was recommended by my supervisor to use the Ljung-Box test. The Box.test function in R takes 4 arguments:
x a numeric vector or univariate time series.
lag the statistic

2002 Feb 13

1

cor() and lagged ts objects

The following is internally consistent, but not intuitive:
R : Copyright 2002, The R Development Core Team
Version 1.4.1 (2002-01-30)
[...]
> library(ts)
> x<-rnorm(100) # white noise
> xTS<-ts(x,start=1) # as time series
> xTSl<-lag(xTS,lag=-1) # lagged once
> cor(xTS,xTSl) # Big surprise
[1] 1
> cor(cbind(xTS,xTSl),use="pairwise") # what was really