similar to: Questions about the functions ar.ols and auto.arima when fitting an AR model

Displaying 20 results from an estimated 8000 matches similar to: "Questions about the functions ar.ols and auto.arima when fitting an AR model"

2012 Sep 27
2
Is there a function that runs AR model with Schwarz Bayesian Information Criteria (BIC)?
Hello, Is there a function in R by which one can run AR model with Bayesian Information Criteria (BIC)? To my knowledge, functions ar and ar.ols could select the order only by AIC. Thanks, Miao [[alternative HTML version deleted]]
2010 Mar 17
1
Reg GARCH+ARIMA
Hi, Although my doubt is pretty,as i m not from stats background i am not sure how to proceed on this. Currently i am doing a forecasting.I used ARIMA to forecast and time series was volatile i used garchFit for residuals. How to use the output of Garch to correct the forecasted values from ARIMA. Here is my code: ###delta is the data fit<-arima(delta,order=c(2,,0,1)) fit.res <-
2009 Mar 08
0
ARIMA second order differencing problem
Hi, I have been using this site ( http://www.stat.pitt.edu/stoffer/tsa2/Rissues.htm) to help me with some ARIMA modelling in R. Unfortunately the methods mentioned do not appear to work with second order differencing; arima(*, 2, *). I have used some dummy data to illustrate my point. When I use the xreg=... method, the estimate of intercept is *way* off. This can be seen by the high s.e but I
2010 Dec 08
1
Question on ARIMA Prediction
Dear all, I'm new to R and time series analysis. I'd appreciate if you could shed light on my problem. Here is what I have been trying to do: 1. I fit the model ARIMA(1,0,0) with the training dataset xdata[1:100] fitit = arima(xdata, order=c(1,0,0) 2. I have some current observations in the buffer. Say that buf = xdata_new[1:20] 3. I'm trying to forecast the xdata_new[21] based on
2016 Apr 26
0
How to print the frequency table (produced by the command "table" to Excel
Hi jpm miao, You can get CSV files that can be imported into Excel like this: library(prettyR) sink("excel_table1.csv") delim.table(table(df[,c("y","z")])) sink() sink("excel_table2.csv") delim.table(as.data.frame(table(df[,c("y","z")])),label="") sink() sink("excel_table3.csv")
2010 May 02
0
how to plot forecast together with historical series in OLS or special ARIMA model
Dear R users, Please let me know how to plot the forecast in such a model: First I do it simple with ARIMA model that works ok with the codes provided to me at the lecture: arima<-arima(HCPIlong, order=c(1,1,0)) arima.predict<-predict(arima, n.ahead= 5 ) ts.plot(HCPIlong,arima.predict$pred,lty=1:2, main="Forecast of HCPI") But I need to include the additional variable in my
2013 May 03
10
Why can't R understand if(num!=NA)?
I have a program, when I write if(num!=NA) it yields an error message. However, if I write if(is.na(num)==FALSE) it works. Why doesn't the first statement work? Thanks, Miao [[alternative HTML version deleted]]
2008 May 08
1
ARIMA, AR, STEP
Here is my problem: Autoregressive models are very interesting in forecasting consumptions (eg water, gas etc). Generally time series of this type have a long history with relatively simple patterns and can be useful to add external regressors for calendar events (holydays, vacations etc). arima() is a very powerful function but kalman filter is very slow (and I foun difficulties of estimation)
2012 Jul 27
2
How can I access an element of a string?
Dear Daniel and Jorge, Thank you very much and it does help. If I have a string "ABCD", how can I access the second element of the string "B"? Thanks, Miao 2012/7/27 Daniel Nordlund <djnordlund@frontier.com> > > -----Original Message----- > > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org] > > On Behalf Of jpm miao
2013 Jun 11
2
How can we access an element in a structure
Hi, I have a structure, which is the result of a function How can I access the elements in the gradient? > dput(test1) structure(-1.17782911684913, gradient = structure(c(-0.0571065371783791, -0.144708170683529), .Dim = 1:2, .Dimnames = list(NULL, c("x1", "x2")))) > test1[[1]] [1] -1.177829 > test1 [1] -1.177829 attr(,"gradient") x1
2012 Feb 21
2
Debugging using RStudio or any other R editor
Hello, I am using RStudio and have trouble finding out the problematic line in the presence of a bug. Could I view the line NUMBER which contains a bug? Is there any R editor able to do it? Thanks, Miao [[alternative HTML version deleted]]
2009 Jan 18
1
auto.arima forecasting issue
Hello everybody! I'm having this problem with the auto.arima function that i've not been able to solve. I use this function on time series that contains NA values, but every time that the resulting model contains drift I can't perform a forecasting (using forecast.Arima function). The printed error (when I try to forecast the resulting model) claims a dimension mismatch
2016 Apr 26
2
How to print the frequency table (produced by the command "table" to Excel
Hi, How could we print the frequency table (produced by "table") to an Excel file? Is there an easy way to do so? Thanks, Miao > df <- data.frame(x = 1:3, y = 3:1, z = letters[1:3]) > table(df[,c("y","z")]) z y a b c 1 0 0 1 2 0 1 0 3 1 0 0 > test<-table(df[,c("y","z")]) > as.data.frame(test) y z Freq 1 1 a
2012 Oct 01
2
Input and output of time series data - any function or packages that helps?
Hello, I work with time series data. From time to time I run programs to produce results that are in time series form (e.g., quarterly or monthly data). After a few days I might need to access part of the results and to run another program. Is there any function or package (like dataframe or zoo?) that might help so that I don't need to copy the results manually to a csv or xls file?
2012 Feb 17
4
How can I tabulate time series data (in RStudio or any other R editor)?
Hello, I have a question on how to tabulate the time series data. I use RStudio, but if can be done in any other R editor, it should work in RStudio as well. > a1<-11:22 > a1ts<-ts(a1, frequency=4, start=c(1978,1)) > a1ts Qtr1 Qtr2 Qtr3 Qtr4 1978 11 12 13 14 1979 15 16 17 18 1980 19 20 21 22 If I click the variable "a1ts" on the
2011 Jun 15
1
Query regarding auto arima
I am using AUTO ARIMA for forecasting. But it is not detecting 'seasonality term' of its own for any data. Is there any other method by which we can detect seasonality and its frequency for any data? Is there any method through which seasonality and its frequency can be automatically detected from ACF plot? -- Siddharth Arun, 4th Year Undergraduate student Industrial Engineering and
2011 Jun 15
1
Problem auto.arima() in R
I am using auto.arima() for forecasting.When I am using any in built data such as "AirPassangers" it is capturing seasonality. But, If I am entering data in any other format(in vector form or from an excel sheet) it is not detecting seasonality. Is there any specific format in which it detects seasonality or I am doing some thing wrong? Does data have to be entered in a specific
2013 Apr 17
3
Transformation of a variable in a dataframe
HI, I have a dataframe with two variable A, B. I transform the two variable and name them as C, D and save it in a dataframe dfcd. However, I wonder why can't I call them by dfcd$C and dfcd$D? Thanks, Miao > A=c(1,2,3) > B=c(4,6,7) > dfab<-data.frame(A,B) > C=dfab["A"]*2 > D=dfab["B"]*3 > dfcd<-data.frame(C,D) > dfcd A B 1 2 12 2 4 18
2012 Jul 31
2
How can I declare an empty zoo object?
Hi, I let xzoo be an empty object: > xzoo<-{} and I have an existing zoo object x1zoo_f. I would like to combine the two to make a new zoo object, and continue doing so in a loop, which is not shown here. However, when I type > xzoo<-cbind(xzoo, x1zoo_f) An error message emerges Error in zoo(structure(x, dim = dim(x)), index(x), ...) : “x” : attempt to define
2013 May 03
2
Declare a set (list?) of many dataframes or matrices
Hi, I would like to read several datasets and would like to create a set (list? sequence?) of many empty dataframes. How could this be done? How could I declare a set (list? sequence?) of many empty matrices? Thanks, Miao [[alternative HTML version deleted]]