Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Nonparametric testing of parametric specifications R package

License

NotificationsYou must be signed in to change notification settings

HippolyteBoucher/SpeTestNP

Repository files navigation

This R package performs nonparametric tests of parametric specifications. Five heteroskedasticity-robust tests are available: Bierens (1982), Zheng (1996), Escanciano (2006), Lavergne and Patilea (2008), and Lavergne and Patilea (2012). Specific bandwidth and kernel methods can be chosen along with many other options. Allows parallel computing to quickly compute p-values based on the bootstrap.

Hippolyte Boucher (Hippolyte.Boucher@outlook.com) is the author ofSpeTestNP and Pascal Lavergne (lavergnetse@gmail.com) is a contributor. Both Hippolyte Boucher and Pascal Lavergne are maintainers and any question or bug should be reported to one of them.

Installation

To installSpeTestNP from CRAN simply run the following command:

install.packages("SpeTestNP")

To installSpeTestNP from Github the packagedevtools should be installed and the following commands should be run:

library(devtools) install_github("HippolyteBoucher/SpeTestNP")

SpeTestNP requires the packagesstats (already installed and loaded by default in Rstudio),foreach anddoParallel (if parallel computing is used to derive p-values based on the bootstrap) to be installed.

Examples

library(SpeTestNP)### Create artificial data, choose a parametric specification, and perform the test# Example 1: The true model is linear and we estimate the model linearlyn<-500x<-rnorm(n)y<-x+rnorm(n)*0.7eq<-lm(y~x+0)# The test of Bierens (1982) is used with 300 wild bootstrap samples used# to compute the p-valueSpeTest(eq=eq,type="icm",rejection="bootstrap",boot="wild",nboot=300)# Example 2: The true model is nonlinear and we estimate the model linearlyn<-500x<-rnorm(n)y<-x^2+rnorm(n)*0.7eq<-lm(y~x+0)# The test of Lavergne and Patilea (2012) is used with a p-value based on the# asymptotic distribution of the normalized test statistic under the null hypothesissummary(SpeTest(eq=eq,type="sicm",rejection="asymptotics"))

References

H.J. Bierens (1982),"Consistent Model Specification Test",Journal of Econometrics, 20 (1), 105-134

J. C. Escanciano (2006),"A Consistent Diagnostic Test for Regression Models Using Projections",Econometric Theory, 22 (6), 1030-1051

P. Lavergne and V. Patilea (2008),"Breaking the Curse of Dimensionality in Nonparametric Testing",Journal of Econometrics, 143 (1), 103-122

P. Lavergne and V. Patilea (2012),"One for All and All for One: Regression Checks with Many Regressors",Journal of Business & Economic Statistics, 30 (1), 41-52

J.X. Zheng (1996),"A Consistent Test of Functional Form via Nonparametric Estimation Techniques",Journal of Econometrics, 75 (2), 263-289

About

Nonparametric testing of parametric specifications R package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp