goodn_of_fit_test,fEGarch_fit-method {fEGarch} | R Documentation |
Adjusted Pearson Goodness-of-Fit Test for Standardized Model Residuals
Description
Consider a probability integral transform on the standardized residuals of a fitted model and apply a Pearson goodness-of-fit test to the binned data using a selection of predefined number of bins.
Usage
## S4 method for signature 'fEGarch_fit'
goodn_of_fit_test(object, n_bins = c(20, 30, 40, 50), silent = FALSE, ...)
Arguments
object |
an object of class |
n_bins |
a numeric vector giving the number of bins to use. |
silent |
a logical indicating whether or not to print the test results in a well-formatted manner to the console. |
... |
currently without purpose. |
Details
Use a probability integral transform on the standardized residuals of a fitted model. This is then the basis to conduct a Pearson goodness-of-fit chi-square test.
Value
Returns a numeric matrix invisibly.
Examples
window.zoo <- get("window.zoo", envir = asNamespace("zoo"))
rt <- window.zoo(SP500, end = "2002-12-31")
spec <- fEGarch_spec()
model <- fEGarch(spec, rt)
goodn_of_fit_test(model)
[Package fEGarch version 1.0.1 Index]