Displaying 20 results from an estimated 10000 matches similar to: "Elements of a character vector in different colours?"
2009 Nov 24
1
Subscript out of bounds
Hi!
Trying to make a forecast, and get the following error message:
Error in NextMethod("[<-") : subscript out of bounds
The script is as follows:
> Forecast.A <- ts(matrix(NA, nrow=25, ncol = 1,
+ dimnames = list(c(), c("Outcome"))),
+ start = c(2006, 10), frequency = 12)
> for (i in 1:25) {
+ j <- i + 321
+ Data <- window(omxr, end = time(omxr)[j])
+
2008 Aug 12
1
arima forecast function
hi:
I am trying to fit prediction intervals for an arima object. My search led
me to the link:
http://finzi.psych.upenn.edu/R/library/forecast/html/forecast.Arima.html
which has the function "forecast", as I wanted. However, when I try to run
it in R, I get the message:
Error in plot(forecast(fit)) : could not find function "forecast"
Even the example provided on the page
2009 Aug 07
3
How do I plot a line followed by two forecast points?
Good day all,
I'm trying to plot a continuous line plot, which is followed by two
forecast points eg. one forecast point is 12 months out, and another
24 months out from the last date of the line plot.
In my attempts so far, the second plot (the forecast points) is scaled
against a new axis scale, thus the two plots are not directly
comparable (I need the forecast points to be scaled
2002 Aug 13
1
Ex ante forecasting from structural equation models (SEM package)
Dear Helplist,
I want to produce forecasts from a structural equation model. With the SEM
package the model setup and its estimation is possible. However, I have not
figured out how to obtain ex ante forecasts, i.e. applying the Gauss-Seidel
algorithm to the estimated structural equations for provided values of the
exogenous variables (i.e.: y_t = -inv(A)*B*x_t).
Does anyone know if the there is
2013 Mar 15
2
Help finding first value in a BY group
I have a large Excel file with SKU numbers (stock keeping units) and
forecasts which can be mimicked with the following:
Period <- c(1, 2, 3, 1, 2, 3, 4, 1, 2)
SKU <- c("A1","A1","A1","X4","X4","X4","X4","K2","K2")
Forecast <- c(99, 103, 128, 63, 69, 72, 75, 207, 201)
PeriodSKUForecast <-
2005 Jul 28
1
Forcing coefficents in lm(), recursive residuals, etc.
Hello all,
Does anyone know how to constrain/force specific coefficients when running
lm()?
I need to run recresid() {strucchange package} on the residuals of
forecast.lm, but forecast.lm's coefficients must be determined by
parameter.estimation.lm
I could estimate forecast.lm without lm() and use some other kind of
optimisation, but recresid() requires an object with class lm.
1998 Nov 19
1
list assignment
There appears to be a problem with name matching in list assignment:
Version 0.63.0 (November 14, 1998)
...
> r <- list()
> r$forecast.cov.trend <- 1:12
> r$forecast.cov.zero <- 1:12
> r$forecast.cov <- 1:2
> length(r$forecast.cov)
[1] 0 #should be 2
>
But note that this works correctly:
> r <- list()
>
2010 Oct 07
1
Forecasting with R/Need Help. Steps shown below with the imaginary data
1. This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year.
data Data1;
input Yr Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec;
datalines;
2008 12 13 12 14 13 12 11 15 10 12 12 12
2009 12 13 12 14 13 12 11 15 10 12 12 12
;
run;
I converted the above data into the below format to use it in R as it was giving error: asking
2008 Sep 22
1
Prediction errors from forecast()?
Hello,
I am using forecast() in the forecast package to predict future values of an
ARIMA model fit to a time series. I have read most of the documentation for
the forecast package, but I can't figure out how to obtain the forecast
variance for the predicted values. I tried using the argument
"se.fit=TRUE," hoping this would work since forecast() calls predict().
Is there an easy
2010 Dec 25
4
need help with data management
I have a data frame that reads
client ID date transcations
323232 11/1/2010 22
323232 11/2/2010 0
323232 11/3/2010 missing
121212 11/10/2010 32
121212 11/11/2010 15
.................................
I want to order the rows by client ID and date and using a black-box
forecasting method create the data fcst(client,date of forecast, date
for which forecast applies).
Assume that I
2011 Jul 04
1
forecast: bias in sampling from seasonal Arima model?
Dear all,
I stumbled upon what appears to be a troublesome issue when sampling from an
ARIMA model (from Rob Hyndman's excellent 'forecast' package) that contains
a seasonal AR component.
Here's how to reproduce the issue. (I'm using R 2.9.2 with forecast 2.19;
see sessionInfo() below).
First some data:
> x <- c(
0.132475, 0.143119, 0.108104, 0.247291, 0.029510,
2009 Sep 09
1
Forecast - How to create variables with summary() results parameters
Hi,
I would like to create variables in R containing parameters of
summary(*Forecast
Results*).
Using the following code:
library(forecast)
data <- AirPassengers
xets <- ets(data, model="ZZZ", damped=NULL)
xfor <- forecast(xets,h=12, level=c(80,95))
summary(xfor)
the output is:
Forecast method: ETS(M,A,M)
Model Information:
ETS(M,A,M)
Call:
ets(y = data, model =
2012 Feb 29
2
How to extract numerical values from time series forecast
hi all. i'm busy with some time series data, starting from an earlier period
until the current day.
i have created a time series forecast taking into account the entire data
from the earlier date up until 2007, using the "forecast" package for R. i
am comparing this forecasted data to the actual/ observed data (which starts
from the earlier date up until the current day).
my
2009 Jan 23
1
forecasting error?
Hello everybody!
I have an ARIMA model for a time series. This model was obtained through an
auto.arima function. The resulting model is a ARIMA(2,1,4)(2,0,1)[12] with
drift (my time series has monthly data). Then I perform a 12-step ahead
forecast to the cited model... so far so good... but when I look the plot of
my forecast I see that the result is really far from the behavior of my time
2018 Jun 01
0
Time-series moving average question
Hi Don, wow, you are so right. I picked that piece up from the bloggers tutorial and since I am R naive yet, I thought it was all one step
moving_average = forecast(ma(tdat[1:31], order=2), h=5)
Truly, I usually print and check at every step I can, as painful as it is sometimes.
Great lesson for this novice usR.
So the first and last values are NA in each case? Do you know why? Should I replace
2008 Feb 28
2
EMM: how to make forecast using EMM methods?
Hi all,
We followed some books and sample codes and did some EMM estimation,
only to find it won't be able to generate forecast.
This is because in the stochastic volatility models we are estimating,
the volatilities are latent variables, and we want to forecast 1-step
ahead or h-step ahead volatilities.
So it is nice to have the system estimated, but we couldn't get it to
forecast at
2005 Jun 14
1
using forecast() in dse2 with an ARMA model having a trend component
(My apologies if this is a repeated posting. I couldn't find any trace
of my previous attempt in the archive.)
I'm having trouble with forecast() in the dse2 package. It works fine
for me on a model without a trend, but gives me NaN output for the
forecast values when using a model with a trend. An example:
# Set inputs and outputs for the ARMA model fit and test periods
2018 Jun 01
2
Time-series moving average question
My guess would be that if you inspect the output from
ma(dat3[1:28], order=3)
you will find some NAs in it. And then forecast() doesn't like NAs.
But I can't check, because I can't find the ma() and forecast() functions. I assume they come from some package you installed; it would be helpful to say which package.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000
2010 Oct 07
1
auto.arima error
I am trying to use auto.arima to fit a univariate time series and do forecast.
This is an imaginary data on monthly outcomes of 2 years and I want to forecast the outcome for next 12 months of next year.
data Data1;
input RR;
datalines;
12
14
17
15
13
15
15
14
15
14
16
15
15
18
16
16
15
14
15
16
16
14
13
12
;
run;
I successfully took this data into R and used the auto.arima codes but am getting
2012 Jan 18
1
forecasting a time series
Couldn't find this in the archives. I'm fitting a series of historical
weather-related data, but would like to use the latest values to forecast.
So let's say that I'm using 1970-2000 to fit a model (using fourier terms
and arima/auto.arima), but now would like to use the last X values to
predict tomorrow's weather. I'm at a loss. All the functions I've come
across