| cmtest | R Documentation | 
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.
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
)
## S3 method for class 'weibreg'
cmtest(
  x,
  test = c("normality", "reset", "heterosc", "skewness", "kurtosis"),
  powers = 2:3,
  heter_cov = NULL,
  opg = FALSE
)
| x | a fitted model, currently a tobit model either fitted by
 | 
| 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  | 
an object of class "htest" containing the following components:
data.mane: a character string describing the fitted model
statistic: the value of the test statistic
parameter: degrees of freedom
p.value: the p.value of the test
method: a character indicating what type of test is performed
Yves Croissant
NEWE:85micsr
\insertRefPAGA:VELL:89micsr
\insertRefTAUC:85micsr
\insertRefWELL:03micsr
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.