similar to: predict not complete?

Displaying 20 results from an estimated 30000 matches similar to: "predict not complete?"

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 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
2010 Feb 07
1
Out-of-sample prediction with VAR
Good day, I'm using a VAR model to forecast sales with some extra variables (google trends data). I have divided my dataset into a trainingset (weekly sales + vars in 2006 and 2007) and a holdout set (2008). It is unclear to me how I should predict the out-of-sample data, because using the predict() function in the vars package seems to estimate my google trends vars as well. However, I want
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
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 =
2011 Aug 02
1
Writing multiple regression in one function
Hello all, I am newbie to R and have not been able to find too much stuff on a version of VAR(p) I am working on. Would someone be able to tell me if there is a more elegant way of writing A function for the following? Many thanks in advance. Darius I am regressing returns of 8 asset classes on lagged values of 4 state variables and so I have 8 equations like the following: cash_lag1= dynlm
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,
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 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
2011 Nov 30
2
forecasting linear regression from lagged variable
I'm currently working with some time series data with the xts package, and would like to generate a forecast 12 periods into the future. There are limited observations, so I am unable to use an ARIMA model for the forecast. Here's the regression setup, after converting everything from zoo objects to vectors. hire.total.lag1 <- lag(hire.total, lag=-1, na.pad=TRUE) lm.model <-
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]]
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) __
2011 May 22
1
using predict.lm function
Dear all, I'm fitting a linear model with numerous lag terms of the response variable [i.e. y(t-1), y(t-2),y(t-3)...,] and other explanatory variables [x(1), x(2), x(3),....]- which go into my design matrix X. I'm fitting the linear model: lm(Y ~ X, ...). I would like to use the predict.lm function however the future predictions of Y are dependent upon previous predictions of Y [i.e.
2005 Jul 08
1
help with ARIMA and predict
I'm trying to do the following out of sample regression with autoregressive terms and additional x variables: y(t+1)=const+B(L)*y(t)+C(1)*x_1(t)...+C(K)*x_K(t) where: B(L) = lag polynom. for AR terms C(1..K) = are the coeffs. on K exogenous variables that have only 1 lag Question 1: ----------- Suppose I use arima to fit the model:
2007 Apr 13
0
How consistent is predict() syntax?
I have a situation where lagged values of a time-series are used to predict future values. I have packed together the time-series and the lagged values into a data frame: > str(D) 'data.frame': 191 obs. of 13 variables: $ y : num -0.21 -2.28 -2.71 2.26 -1.11 1.71 2.63 -0.45 -0.11 4.79 ... $ y.l1 : num NA -0.21 -2.28 -2.71 2.26 -1.11 1.71 2.63 -0.45 -0.11 ... $ y.l2 : num
2005 Oct 15
2
regression using a lagged dependent variable as explanatory variable
Hi, I would like to regress y (dependent variable) on x (independent variable) and y(-1). I have create the y(-1) variable in this way: ly<-lag(y, -1) Now if I do the following regression lm (y ~ x + ly) the results I obtain are not correct. Can someone tell me the code to use in R in order to perform a regression using as explanatory variable a lagged dependent variable? My best regards,
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>
2009 Nov 20
0
problem with predict from nnet package
Hi, I’m having mayor issues with predict from the nnet package. I’m training a neural network for forecasting. I trained the network with info from 1995 to 2009 and I want to forecast month by month 2010.(the network forecasts one month at a time). Since I have to do iterative forecasting, im using predict several times including, including the new forecast each time, but for some reason
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