On 2013-03-14 11:10, Jose Iparraguirre wrote:
Hi

I'm getting an error message with the roots() function 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 of R -in Windows- (ie 2.15.3 ), 
perhaps?

Jose

Wrap Up and Run 10k is back!

Also, new for 2013 – 2km intergenerational walks at selected venues. So recruit 
a buddy, dust off the trainers and beat the winter blues by
signing up now:

http://www.ageuk.org.uk/10k

                  Milton Keynes | Oxford | Sheffield | Crystal Palace | Exeter 
| Harewood House, Leeds |
                                  Tatton Park, Cheshire | Southampton | Coventry



Age UK Improving later life

http://www.ageuk.org.uk


You really need to provide the information requested in Posting Guide.

The example works just fine for me.

My sessionInfo():
R version 2.15.3 Patched (2013-03-01 r62110)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252
[3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] vars_1.5-0        lmtest_0.9-30     urca_1.2-7        strucchange_1.4-7
[5] sandwich_2.2-9    zoo_1.7-9         MASS_7.3-23

loaded via a namespace (and not attached):
[1] grid_2.15.3     lattice_0.20-13 tools_2.15.3

Peter Ehlers

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to