search for: varest

Displaying 9 results from an estimated 9 matches for "varest".

Did you mean: rarest
2007 Aug 30
2
possible bug in vars package (predict.varest) ???
...C, p = 2, season=12,exogen=exoC,type = "const") exoC_2 <- as.matrix(Canada[73:84,4]) predict(var.2c, n.ahead = 12,dumvar=exoC_2) Error: Error in as.matrix(cycle, nrow = season, ncol = season - 1) : unused argument(s) (nrow = 12, ncol = 11) from what I can guess, the predict.varest function is using as.matrix() and passing nrow and ncol, as.matrix() does not take those two parameters but matrix() does. Does anyone have a suggestion of how to get around it? Is there a way I can get to the predict.varest() function and alter it myself? Thanks, Spencer [[alternative HTML ve...
2013 Mar 14
1
Error message in vars package
...in the vars package. Even the example in the help file comes up with an error: > data(Canada) > var.2c <- VAR(Canada, p = 2, type = "const") > roots(var.2c) Error in UseMethod("roots") : no applicable method for 'roots' applied to an object of class "varest" The error is odd, for the help file explains that one of the arguments of the roots() function is an object of class "varest" generated by VAR() -exactly the class of object that var.2c is: > class(var.2c) [1] "varest" May it be that I'm using the latest version...
2007 Oct 02
1
How to view the code of a method?
Dear All I am a biginner of R. I have difficulty with reading the code of a method. I am using the vars package to estimate a VAR model and I want to view the code of "predict" method for objects with class attribute "varest". I thougt I could just type the name "predict" without anything to display the code of the method as I often do with generic function. However, I got the following messages: function (object, ...) UseMethod("predict") <environment: namespace:stats> I cannot figu...
2007 Mar 12
1
Export successively displayed graphics
Hello, I am running R version 2.4.1 on Debian. I am using some R functions which produce several graphics displayed successively with an interactive prompt between each graph. For example, the plot.varest (vars) function produces such output (one graph per time series on which the VAR model is fitted). Plots on GARCH models also produce such outputs. Moreover, the frontend I am using for R (RkWard) does not enable me to export graphs as vectorial image files. How can I export such graphs as separa...
2006 Oct 10
1
.arch.uni in function call in arch test of vars package
I have been reviewing the arch test of vars package that is based on Engle's paper. R-metrics has this as a wants/todo item. I need an arch test and thought I might accomplish two things at once or at least try. The arch test requires a varest object and I am trying to write one that will use R-metrics arima, arch, Garch objects, or at least a vector. Also the arch function has the following line of code that I can not find the function anywhere archs.resids <- apply(resids, 2, function(x) .arch.uni(x, lags.single = l...
2012 Nov 21
0
Question about VAR (Vector Autoregression) in differences.
...kind of re-integration of the series. In a real case I would use the final value(s) of bivariateTS (1.0002006, 0.6545722 ) in place of the "1" in the cumsum above. My problem: The paths that I get make no sense. Here is the function I use (an alteration of Professor Pfaff's predict.varest) to simulate var paths. My apologies if it is bad form to use alter someone else's code for other purposes. # Modified VAR simulation function jigged up from the predict function of vars package simVARpath<-function(object, n.ahead, mult = 1) { K <- object$K p <- object$p...
2006 Apr 13
1
number of matches when using Match()
To anyone who uses the Match() function in the Matching library... How do you go about deciding how many matches you will use? With my data, my standard errors generally get smaller if I use more matches. Speaking of standard errors, when correcting for heteroscedasticity, how many matches do you use (this is the Var.cal option). It seems to me that it might make sense to use the same number
2010 Dec 29
2
Trying to extract an algorithm from a function
Hi, I'm using package "vars" and I'm trying to extract the algorithm that function "predict" contained in that package in order to understand how does it work. When I type function "VAR" then all its algorithm appears in R, however if I try to do the same with "predict" nothing happens...Is there any possible way to extract the algorithm? Thanks a
2013 May 21
1
Calculating AIC for the whole model in VAR
Hello! I am using package "VAR". I've fitted my model: mymodel<-VAR(mydata,myp,type="const") I can extract the Log Liklihood for THE WHOLE MODEL: logLik(mymodel) How could I calculate (other than manually) the corresponding Akaike Information Criterion (AIC)? I tried AIC - but it does not take mymodel: AIC(mymodel) # numeric(0) Thank you! -- Dimitri Liakhovitski