cmtest {micsr}R Documentation

Conditional moments test

Description

Conditional moments tests for maximum likelihood estimators, particularly convenient for the probit and the tobit model to test relevance of functional form, omitted variables, heteroscedasticity and normality.

Usage

cmtest(
  x,
  test = c("normality", "reset", "heterosc", "skewness", "kurtosis"),
  powers = 2:3,
  heter_cov = NULL,
  opg = FALSE
)

## S3 method for class 'tobit'
cmtest(
  x,
  test = c("normality", "reset", "heterosc", "skewness", "kurtosis"),
  powers = 2:3,
  heter_cov = NULL,
  opg = FALSE
)

## S3 method for class 'micsr'
cmtest(
  x,
  test = c("normality", "reset", "heterosc", "skewness", "kurtosis"),
  powers = 2:3,
  heter_cov = NULL,
  opg = FALSE
)

## S3 method for class 'censReg'
cmtest(
  x,
  test = c("normality", "reset", "heterosc", "skewness", "kurtosis"),
  powers = 2:3,
  heter_cov = NULL,
  opg = FALSE
)

## S3 method for class 'glm'
cmtest(
  x,
  test = c("normality", "reset", "heterosc", "skewness", "kurtosis"),
  powers = 2:3,
  heter_cov = NULL,
  opg = FALSE
)

Arguments

x

a fitted model, currently a tobit model either fitted by AER::tobit, censReg::censReg or micsr::tobit1 or a probit model fitted by glm with family = binomial(link = "probit") or by micsr::binomreg with link = "probit"

test

the kind of test to be performed, either a normality test (or separately a test that the skewness or kurtosis are 0 and 3), a heteroscedasticity test or a reset test,

powers

the powers of the fitted values that should be used in the reset test,

heter_cov

a one side formula that indicates the covariates that should be used for the heteroscedasticity test (by default all the covariates used in the regression are used),

opg

a boolean, if FALSE (the default), the analytic derivatives are used, otherwise the outer product of the gradient formula is used

Value

an object of class "htest" containing the following components:

Author(s)

Yves Croissant

References

Newey WK (1985). “Maximum Likelihood Specification Testing and Conditional Moment Tests.” Econometrica, 53(5), 1047–1070.

Pagan A, Vella F (1989). “Diagnostic Tests for Models Based on Individual Data: A Survey.” Journal of Applied Econometrics, 4, S29–S59.

Tauchen G (1985). “Diagnostic testing and evaluation of maximum likelihood models.” Journal of Econometrics, 30(1), 415-443.

Wells C (2003). “Retesting Fair's (1978) Model on Infidelity.” Journal of Applied Econometrics, 18(2), 237–239.

Examples

charitable$logdon <- with(charitable, log(donation) - log(25))
ml <- tobit1(logdon ~ log(donparents) + log(income) + education +
             religion + married + south, data = charitable)
cmtest(ml, test = "heterosc")
cmtest(ml, test = "normality", opg = TRUE)

[Package micsr version 0.1-1 Index]