OptSig.F: Optimal Significance Level for an F-test

View source: R/OptSig.F.R

OptSig.FR Documentation

Optimal Significance Level for an F-test

Description

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

Usage

OptSig.F(df1, df2, ncp, p = 0.5, k = 1, Figure = TRUE)

Arguments

df1

the first degrees of freedom for the F-distribution

df2

the second degrees of freedom for the F-distribution

ncp

a value of of the non-centality paramter

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

Figure

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

Details

See Kim and Choi (2020)

Value

alpha.opt

Optimal level of significance

crit.opt

Critical value at the optimal level

beta.opt

Type II error probability at the optimal level

Note

Applicable to any F-test, following F-distribution

The black curve in the figure is the line of enlightened judgement: see Kim and Choi (2020). The red dot inticates the optimal significance level that minimizes the expected loss: (alpha.opt,beta.opt). The blue horizontal line indicates the case of alpha = 0.05 as a reference point.

Author(s)

Jae. H Kim

References

Kim and Choi, 2020, Choosing the Level of Significance: A Decision-theoretic Approach: Abacus: a Journal of Accounting, Finance and Business Studies. Wiley. <https://doi.org/10.1111/abac.12172>

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>

Kim, Jae H., 2020, Decision-theoretic hypothesis testing: A primer with R package OptSig, The American Statistician. <https://doi.org/10.1080/00031305.2020.1750484.>

Examples


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)
# Model Estimation and F-test
M=R.OLS(y,x,Rmat,rvec) 

# Degrees of Freedom and estimate of non-centrality parameter 
K=ncol(x)+1; T=length(y)
df1=nrow(Rmat);df2=T-K; NCP=M$ncp

# Optimal level of Significance: Under Normality
OptSig.F(df1,df2,ncp=NCP,p=0.5,k=1, Figure=TRUE)

OptSig documentation built on July 3, 2022, 5:05 p.m.

Related to OptSig.F in OptSig...