Displaying 20 results from an estimated 40000 matches similar to: "help for dynlm command"
2008 Oct 15
2
dynlm and lm: should they give same estimates?
Hi,
I was wondering why the results from lm and dynlm are not the same for what I think is the same model.
I have just modified example 4.2 from the Pfaff book, please see below for the code and results.
Can anyone tell my what I am doing wrongly?
Many thanks,
Werner
set.seed(123456)
e1 <- rnorm(100)
e2 <- rnorm(100)
y1 <- ts(cumsum(e1))
y2 <- ts(0.6*y1 + e2)
lr.reg <- lm(y2
2024 Mar 14
0
CADFtest difference between max.lag.y with criterion and without criterion
Dear Professor Bernhard,
Sorry for take your time, but I found something strange that I am not able to explain/understand.
Suppose that I compute the ADF test by using the criterion="BIC" to select the lags:
summary(CADFtest(y, max.lag.y = 20, type = "drift", criterion="BIC"))
Suppose that 2 lags are selected.
Next, if I set the lags to 2: summary(CADFtest(y,
2011 Nov 14
3
What is the CADF test criterion="BIC" report?
Hello:
I am a rookie in using R. When I used the unit root test in
"CADFtest", I got the different t-test statistics between using
criterion="BIC" and no using criterion. But when I checked the result
with eviews, I find out that no using criterion is correct. Why after
using criterion="BIC", I got the different result?
Paul
> data(Canada)
> ADFt
2009 Apr 19
1
dynlm question: How to predefine formula for call to dynlm(formula) call
I want to set up a model with a formula and then run dynlm(formula)
because I ultimately want to loop over a set of formulas (see end of post)
R> form <- gas~price
R> dynlm(form)
Time series regression with "ts" data:
Start = 1959(1), End = 1990(4)
<snip>
Works OK without a Lag term
R> dynlm(gas ~ L(gas,1))
Time series regression with "ts" data:
Start =
2012 Aug 27
0
How can I find the principal components and run regression/forecasting using dynlm
Hello,
I would like to write a program that compute the principal components of
a set of data and then
1. Run the dependent variable against the principal components (lagged
value)
2. Do prediction
, following Stock and Watson (1999) "Forecasting Inflation". All data
are time series.
Now I can run the program using single factor (first principal
component), but I
2008 Jan 28
0
dynlm: new version 0.2-0
Dear useRs,
I've release a new version of the "dynlm" package to CRAN which adds two
new features:
o instrumental variables regression (two-stage least squares) via
formulas like
dynlm(y ~ x1 + x2 | z1 + z2 + z3, data = mydata)
where z1, z2, z3 are the instruments which can again contain
lags/differences/season via the d()/L()/season() operators.
o
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]]
2005 Apr 28
0
new package: dynlm 0.1-0
Dear useRs,
recently, there were several discussions on R-help about how to
conveniently fit dynamic linear models and time series regressions. The
package dynlm tries to address this problem by 1. providing some more
functions like lags L() and differences d() and season() in the formula
specification of a model and 2. preserving the time series attributes of
the data.
A first version of the
2005 Apr 28
0
new package: dynlm 0.1-0
Dear useRs,
recently, there were several discussions on R-help about how to
conveniently fit dynamic linear models and time series regressions. The
package dynlm tries to address this problem by 1. providing some more
functions like lags L() and differences d() and season() in the formula
specification of a model and 2. preserving the time series attributes of
the data.
A first version of the
2013 Feb 26
1
problem with nested loops
Each of the data sets contains monthly observations on price indices for 7 countries. I use the fitted values from reg1 in the reg2 model. The interior loop executes without error as long as I explicitly specify the data set, i.e. data=dat70. However the code fails to execute if I specify the model in the form of the commented line, i. e reg1 <-dynlm(form1,data=Dnames[j])
I get the following
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:
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 Jan 23
1
SARIMA with dynlm
Does anyone have an exemple of how to fit a SARIMA model , with a MA part, with the package dynlm?
Best regards.
---------------------------------
[[alternative HTML version deleted]]
2011 Jun 21
1
dynlm
Dear All,
I'm trying to use dynlm to fit a time series.
I have 3 seasonal terms. Here is an example of the problem.
This is my time variable, hourly data:
timeSeries <- seq(as.POSIXct("2011-01-01 00:00:00"), as.POSIXct("2011-12-31 23:00:00"), by="hour")
My response
is:
y <- rnorm(length(t), 1000, 500)
There are 3 seasonal factors:
t.h <-
2011 Jun 20
0
dynlm question
Dear All,
I'm trying to use dynlm to fit a time series.
I have 3 seasonal terms. Here is an example of the problem.
This is my time variable, hourly data:
timeSeries <- seq(as.POSIXct("2011-01-01 00:00:00"), as.POSIXct("2011-12-31 23:00:00"), by="hour")
My response
is:
y <- rnorm(length(t), 1000, 500)
There are 3 seasonal factors:
t.h <-
2011 Feb 16
0
predict not complete?
take this code
library(dynlm)
test=dynlm(diff(log(y))~ lag(x, -1) + lag(z, -1))
fc=predict(test)
fc
when I run this and look at "fc", the values there only go as long as the
sample (of y) goes, but it should be one further, right? since the other
values are lagged.
Is predict the wrong function to reach this?
Thank you
--
View this message in context:
2007 Aug 04
3
request
I want to calculate the commulative sum of any numeric vector with the following command but this following command does not work "comsum"
My question is , how we can calculate the commulative sum of any numeric vector with above command
Thanks
Zahid Khan
Lecturer in Statistics
Department of Mathematics
Hazara University Mansehra.
---------------------------------
2007 Mar 22
2
dynamic linear models in R
Hi all,
I've just started working my way through Mike West and Jeff Harrison's
_Bayesian Forecasting and Dynamic Models_, and I was wondering if
there were any publically-available packages to handle dynamic linear
models, as they describe.
I found the "dynlm" package, but either I don't yet understand what's
going on or that package uses a different sense of the phrase
2009 Nov 23
2
dynlm predict with newdata?
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091122/6a079ab8/attachment-0001.pl>
2011 Oct 06
1
Coefficients for lagged plm model variables not calculated
Hello,
So I am afraid I am having a recurring problem that 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