Two things relating to this occurred to me recently. The first was that while I’d provided EViews code for calculating asymptotic critical values to be used with these tests, it would also be useful to have the corresponding code for calculating p-values for any calculated values of the Trace test statistics.
Second, given the discussion and comments in my recent posts (here and here) about open-source software, I thought it would be a good idea to make the p-values and critical values code available for users of R. (Thanks for the earlier comments, “Ben” and Tal Galili!)
So, in a joint effort, Ryan Godwin and I have written the R code, and extended the earlier EViews code to compute the p-values. Both of them are on the Code page that goes with this blog – in two places: under this post, and also in place of the code for the earlier post. (You can thank Ryan for the nice windows that open when you run the R program.) In addition, an Excel workbook with a big selection of critical values is avalable on the Data page for this blog.
We hope you find the programs useful!
Note: The links to the following references will be helpful only if your computer’s IP address gives you access to the electronic versions of the publications in question. That’s why a written References section is provided.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...