OptSig (version 1.0)

Opt.SigBootWeight: Weighted Optimal Significance Level for the F-test based on the bootstrap

Description

The function calculates the weighted optimal level of significance for the F-test

The weights are obtained from the bootstrap distribution of the non-centrality parameter estimates

Usage

Opt.SigBootWeight(y,x,Rmat,rvec,p=0.5,k=1,nboot=3000,wild=FALSE,Figure=TRUE)

Arguments

y

a matrix of dependent variable, T by 1

x

a matrix of K independent variable, T by K

Rmat

a matrix for J restrictions, J by (K+1)

rvec

a vector for restrictions, J by 1

p

prior probability for H0, default is p = 0.5

k

relative loss from Type I and II errors, k = L2/L1, default is k = 1

nboot

the number of bootstrap iterations, the default is 3000

wild

if TRUE, wild bootsrap is conducted (default); if FALSE, bootstrap is based on iid resampling

Figure

show graph if TRUE . No graph if FALSE (default)

Value

alpha.opt

Optimal level of significance

crit.opt

Critical value at the optimal level

Details

The bootstrap can be conducted using either iid resampling or wild bootstrap.

References

Kim and Choi, 2017, Choosing the Level of Significance: A Decision-theoretic Approach: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2652773

See Also

Leamer, E. 1978, Specification Searches: Ad Hoc Inference with Nonexperimental Data, Wiley, New York.

Kim, JH and Ji, P. 2015, Significance Testing in Empirical Finance: A Critical Review and Assessment, Journal of Empirical Finance 34, 1-14. <DOI:http://dx.doi.org/10.1016/j.jempfin.2015.08.006>

Examples

Run this code
# NOT RUN {
data(data1)
# Define Y and X
y=data1$lnoutput; x=cbind(data1$lncapital,data1$lnlabor)
# Restriction matrices to test for constant returns to scale
Rmat=matrix(c(0,1,1),nrow=1); rvec=matrix(0.94,nrow=1)

Opt.SigBoot(y,x,Rmat,rvec,p=0.5,k=1,nboot=2000,Figure=TRUE)
# }

Run the code above in your browser using DataCamp Workspace