similar to: How can I find the principal components and run regression/forecasting using dynlm

Displaying 20 results from an estimated 300 matches similar to: "How can I find the principal components and run regression/forecasting using dynlm"

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 =
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
2007 Apr 20
0
help for dynlm command
Suppose we have the time series “y” When I regress this series on its first lag then I use the following command in dynlm as r=dynlm( y~L(y,1)) if I put the command of summary of above regression model then by the command summary (r ) I will get the following out put elements Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) __
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
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
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 <-
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]]
2012 Aug 23
1
Accessing the (first or more) principal component with princomp or prcomp
Hi , To my knowledge, there're two functions that can do principal component analysis, princomp and prcomp. I don't really know the difference; the only thing I know is that when the sample size < number of variable, only prcomp will work. Could someone tell me the difference or where I can find easy-to-read reference? To access the first PC using princomp:
2005 Sep 10
1
Readding Zlast info to the preprocessor
This small patch will make st->Zlast = Zframe, to allow applications access to an estimate of the signal-to-noise level. This used to be in there earlier, but was removed when Zlast was no longer used to compute Pframe. -------------- next part -------------- Index: preprocess.c =================================================================== --- preprocess.c (revision 10007) +++
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>
2012 Apr 12
1
Could dynlm function work for xts objects?
It seems to only works for zoo or ts objects? I tried to run it for xts objects, and error message occurs. Once I coerce it to be an zoo object (by as.zoo), it works. Error message: Error in model.frame.default(formula = dynformula(PIh - PI ~ L(X, 0:i) + : variable lengths differ (found for 'L(X, 0:i)') In addition: Warning messages: 1: In zoo(coredata(x), order.by = index(x), ...)
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
2005 Nov 04
3
Compile failure current SVN
Current SVN compilation fails on Win32 (Intel C++ compiler 9.0): ..\..\libspeex\mdf.c(317): error: declaration may not appear after executable statement in block float adapt_rate; Just moved it up to the variable declaration block to solve it locally, but as it's not valid C, I thought I'd mention it ;) PS: With the same compiler, AGC fails horribly (Zlast goes to several
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:
2010 Dec 01
0
Multivariate time series - Poisson with delayed lags
Hi all, How can a multivariate Poisson time series be modeled? Aspects of glm, forecast, dse and dynlm seem relevant but not quite complete--but hopefully what I am missing is how to assemble them effectively. What I am looking to do is model my dependent variable y_t as a Poisson family function of lags of several independent variables and lags of y_t. I would like to include all lags up
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,
2006 Nov 15
1
Quick survey for Speex 1.2
> /* FIXME: This VAD is a kludge */ > .. and it shows (or hears?) unfortunately. I've run a few tests with it > with my users, and they complain that it misdetects too often... In both > directions. Non-speech is detected as speech more often than before, and > more important it also doesn't detect speech as good as before. > I'd really like to see this