MyNixOS website logo
Description

Tabular Reporting of 'EViews' Unit Root Tests.

Conduct unit root tests based on 'EViews' (<https://eviews.com>) routines and report them in tables. 'EViews' (Econometric Views) is a commercial software for econometrics.

URooTab: URooTab: Tabular Reporting of ‘EViews’ Unit Root Tests

Wednesday: August 30, 2023

Please do not forget to cite the package as follows:

Plain text:

Mati S. (2023). URooTab: Tabular Reporting of 'EViews' Unit Root Tests. CRAN, https://github.com/sagirumati/URooTab

Bibtex:

  @Manual{Mati2023,
    title = {{URooTab}: Tabular Reporting of {EViews} Unit Root Tests},
    author = {Sagiru Mati},
    publisher = {CRAN},
    url = {https://github.com/sagirumati/URooTab},
  }

1 About the Author

The author of this package, Sagiru Mati, obtained his PhD in Economics from the Near East University, North Cyprus. He works at the Department of Economics, Yusuf Maitama Sule (Northwest) University, Kano, Nigeria. Please visit his website for more details.

Please follow his publications on:

Google Scholar

Web of Science

ORCID: 0000-0003-1413-3974

2 About URooTab

URooTab is an R package that can conducts EViews unit root tests and report them in tabular form.

3 Why URooTab?

While there are R packages and EViews add-ins available for presenting unit root tests in tabular form, none of them incorporates EViews procedures within the R environment. Specifically:

  • I wish I could conduct unit root using EViews routines in R, R Markdown or Quarto document

  • I wish I could dynamically import the results of the unit root tests individually or at once into R, R Markdown or Quarto document without switching between these applications back and forth.

  • I wish I could use an R function to report unit root test in a table style suitable for publication.

  • I wish I could automatically format the table in Latex, html, pandoc and markdown.

  • I wish I could do all of the above from R, R Markdown or Quarto without opening the EViews!!!

4 Installation

URooTab can be installed using the following commands in R.

install.packages("URooTab")
OR
devtools::install_github("sagirumati/URooTab")

5 Setup

To run the package successfully, you need to do one of the following

  • Add EViews installation folder to path (Environment Variables).

  • Don’t do anything if the name of EViews executable is one of the following: EViews13_x64, EViews13_x86, EViews12_x64, EViews12_x86, EViews11_x64, EViews11_x86, EViews10_x64, EViews10_x86, EViews9_x64, EViews9_x86, EViews10. The package will find the executable automatically.

  • Rename the Eviews executable to eviews or one of the names above.

  • Alternatively, you can use set_eviews_path() function to set the path the EViews executable as follows:

library(EviewR)
set_eviews_path("C:/Program Files (x86)/EViews 10/EViews10.exe")

6 Usage

Please load the URooTab package as follows:

```{r}                                                                .
library(URooTab)
```

7 Ways to use URooTab

The package can work with base R, R Markdown or Quarto document.

8 URooTab along with R Markdown or Quarto document

You can use URooTab in an R chunk in R Markdown or Quarto document:

The uroot() function reports all the available test (ADF and PP) at once. It is more suitable for Quarto document, which has both tbl-cap and tbl-subcap chunk options.

To produce Table 8.1, use the R chunk below:

Notice the chunk option results: asis because uroot() is designed to print all the tables (ADF and PP) in the chunk. If you are producing multiple kable tables, results: asis is necessary. You can also use kableExtra package to further customise the table.

```{r}
#| label: URooTab
#| eval: true
#| results: asis
    
library(URooTab)
set.seed(1234) # for reproducibility
x=rnorm(100)
y=cumsum(x)
z=cumsum(y)

dataFrame=data.frame(x,y,z)
uroot(dataFrame, caption = "Unit Root Tests for x, y and Z")
```
Table 8.1: Unit Root Tests for x, y and Z
VariablesNoneConstantConstant and trendNoneConstantConstant and trendDecision
X-8.300***-8.396***-8.815***-8.274***-8.239***-8.214***I(0)
Y0.417-1.9070.026-8.148***-8.259***-8.721***I(1)
Z-2.379**-2.084-2.9380.417-2.013-0.033I(2)
Table 8.1: Unit Root Tests for x, y and Z
VariablesNoneConstantConstant and trendNoneConstantConstant and trendDecision
X-8.327***-8.418***-8.815***-42.502***-51.961***-74.206***I(0)
Y0.275-1.857-0.066-8.170***-8.275***-8.721***I(1)
Z6.6593.450-3.516**0.274-1.956-0.109I(2)

In R Markdown or Quarto document, URooTab is smart enough to recognise the document format and select the suitable table format.

9 URooTab along with base R.

In base R, you can get the table printed in console in the format you specify by the format argument.

We can create a dataframe as follows:

library(URooTab)
set.seed(1234)  # for reproducibility
x = rnorm(100)
y = cumsum(x)
z = cumsum(y)
dataFrame = data.frame(x, y, z)

9.1 The adf() function

To print ADF test results in latex format:

adf(dataFrame, format = "latex", info = "aic", caption = "ADF Unit Root Tests for x, y and Z")

Or

uroot(dataFrame, format = "latex", test = "adf", info = "aic",
    caption = "ADF Unit Root Tests for x, y and Z")

The above code produces the following latex code:

\begin{table}[h]

\caption{ADF Unit Root Tests for x, y and Z}
\centering
\begin{tabular}[t]{llllllll}
\toprule
Variables & None & Constant & Constant and trend & None & Constant & Constant and trend & Decision\\
\midrule
X & -8.300*** & -8.396*** & -8.815*** & -7.494*** & -7.460*** & -7.445*** & I(0)\\
Y & 0.224 & -1.934 & 0.026 & -8.148*** & -8.259*** & -8.721*** & I(1)\\
Z & -2.379** & -2.084 & -2.938 & 0.233 & -2.221 & -0.033 & I(2)\\
\bottomrule
\end{tabular}
\end{table}

9.2 The pp() function

To print PP test results in html format:

pp(dataFrame, format = "html", info = "aic", caption = "PP Unit Root Tests for x, y and Z")

Or

uroot(dataFrame, format = "html", info = "aic", test = "pp",
    caption = "PP Unit Root Tests for x, y and Z")

The above code produces the following html codes in console:

<table>
<caption>PP Unit Root Tests for x, y and Z</caption>
 <thead>
  <tr>
   <th style="text-align:left;"> Variables </th>
   <th style="text-align:left;"> None </th>
   <th style="text-align:left;"> Constant </th>
   <th style="text-align:left;"> Constant and trend </th>
   <th style="text-align:left;"> None </th>
   <th style="text-align:left;"> Constant </th>
   <th style="text-align:left;"> Constant and trend </th>
   <th style="text-align:left;"> Decision </th>
  </tr>
 </thead>
<tbody>
  <tr>
   <td style="text-align:left;"> X </td>
   <td style="text-align:left;"> -8.327*** </td>
   <td style="text-align:left;"> -8.418*** </td>
   <td style="text-align:left;"> -8.815*** </td>
   <td style="text-align:left;"> -42.502*** </td>
   <td style="text-align:left;"> -51.961*** </td>
   <td style="text-align:left;"> -74.206*** </td>
   <td style="text-align:left;"> I(0) </td>
  </tr>
  <tr>
   <td style="text-align:left;"> Y </td>
   <td style="text-align:left;"> 0.275 </td>
   <td style="text-align:left;"> -1.857 </td>
   <td style="text-align:left;"> -0.066 </td>
   <td style="text-align:left;"> -8.170*** </td>
   <td style="text-align:left;"> -8.275*** </td>
   <td style="text-align:left;"> -8.721*** </td>
   <td style="text-align:left;"> I(1) </td>
  </tr>
  <tr>
   <td style="text-align:left;"> Z </td>
   <td style="text-align:left;"> 6.659 </td>
   <td style="text-align:left;"> 3.450 </td>
   <td style="text-align:left;"> -3.516** </td>
   <td style="text-align:left;"> 0.274 </td>
   <td style="text-align:left;"> -1.956 </td>
   <td style="text-align:left;"> -0.109 </td>
   <td style="text-align:left;"> I(2) </td>
  </tr>
</tbody>
</table>

9.3 The uroot() function

The uroot() function is a generic function that can be used to conduct any unit root test. Setting test="adf" conducts ADF test, while test="pp" conducts PP test. If test argument is not specified, the uroot() function conducts all the test at once.

Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows