Learn R Programming

mleur (version 1.0-6)

GetPower: Simulation function to compute power for AR(1) alternative

Description

Compares the empirical power of unit-root tests using simulation. Various non-normal distributions may be selected.

Usage

GetPower(phi, n, NSIM = 1000, tests = c("DF", "MLEp", "MLEn", "MCT"), noiseDist = c("normal", "t", "stable", "GARCH11"), df = 5, ALPHA = 1.5, BETA = 0, alpha = 0.2, beta = 0.7)

Arguments

phi
AR(1) parameter or phi=1 if null is true
n
length of series
NSIM
Number of simulations
tests
available tests include: DF for Dickey-Fuller, MLEp for exact MLE using pivotal, MLEn - exact MLEn using normalized, MCT using Monte-Carlo test
noiseDist
distribution of innovations: "normal" for Gaussian; "t" for t-distribution; "stable" for stable distribution; "GARCH11" for GARCH
df
df for t-distribution
ALPHA
shape parameter of stable distribution in (0,2]
BETA
skewness parameter of stable in [-1,1]
alpha
GARCH(1,1) first parameter
beta
GARCH(1,1) second parameter

Value

List with the following components:
power
vector with estimated power for selected tests
phi
AR(1) parameter value
NSIM
Number of simulations used
MOE
margin of error for level 0.95 c.i.

See Also

mleur, dftest

Examples

Run this code
GetPower(phi=0.8, n=50, NSIM=100, tests=c("DF", "MLEp"))
 

Run the code above in your browser using DataLab