urTable: Generates a table with Unit Roor test results

Description Usage Arguments Details Value Examples

Description

Returns a datatable and generates a .csv or .tex file with Unit Root test results.

Usage

1
2
urTable(df, tests = c("adf", "pp", "kpss"), order = 1, file = NULL,
  format = "csv")

Arguments

df

Dataframe with series to test

tests

List of tests to be performed, by default tests are c("adf","pp","kpss").

order

Maximum order of integration to test, usually noted as I(?). It can be c(0,1,2).

file

(Optional) Filename to be generated according to format.

format

(Optional) Format of the output table, can be c("csv","latex"). Defaults to "txt".

Details

Supports ADF, PP and KPSS unit root tests.

Value

A dataframe with the test results and a file (optional).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(tseries)
data(USeconomic,package="tseries")
data <- data.frame( USeconomic ) 

dft1 <- urTable( data, tests=c("adf","pp","kpss"), file="US.csv" )

dft2 <- urTable( data, tests=c("pp","kpss"), order=2, file="US.tex", format="latex" )

# Even series with missing observations can be tested
bad <- data.frame( var1=rnorm(100), var2=cumsum(rnorm(100)) ) 
bad[seq(95,100),"var1"] <- bad[1,"var2"] <- bad[2,"var2"] <- NA
dft3 <- urTable( bad )

fcbarbi/macroR documentation built on May 16, 2019, 12:05 p.m.