# [R-SIG-Finance] How to extract the standardized residuals tests from the summary report

WEN SONG-QIAO wen.songqiao at gmail.com
Mon May 25 04:47:49 CEST 2015

```I am using the Rmarkdown to produce a  html slides automatically, and I
want to known
How to extract the standardized residuals tests section from the summary
report?

Here are the R-code:

>library("fGarch")
>N = 200
>x.vec = as.vector(garchSim(garchSpec(rseed = 1985), n = N)[,1])
>fit=garchFit(~ garch(1,1), data = x.vec, trace = FALSE)

> summary(fit)

Title:
GARCH Modelling

Call:
garchFit(formula = ~garch(1, 1), data = x.vec, trace = FALSE)

Mean and Variance Equation:
data ~ garch(1, 1)
<environment: 0x000000002df6b330>
[data = x.vec]

Conditional Distribution:
norm

Coefficient(s):
mu       omega      alpha1       beta1
3.5418e-05  1.0819e-06  8.8855e-02  8.1200e-01

Std. Errors:
based on Hessian

Error Analysis:
Estimate  Std. Error  t value Pr(>|t|)
mu     3.542e-05   2.183e-04    0.162    0.871
omega  1.082e-06   1.051e-06    1.030    0.303
alpha1 8.885e-02   5.450e-02    1.630    0.103
beta1  8.120e-01   1.242e-01    6.538 6.25e-11 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Log Likelihood:
861.9494    normalized:  4.309747

Description:
Mon May 25 09:10:52 2015 by user: WENSQ

Standardised Residuals Tests:
Statistic p-Value
Jarque-Bera Test   R    Chi^2  1.114092  0.5728988
Shapiro-Wilk Test  R    W      0.9932317 0.4911085
Ljung-Box Test     R    Q(10)  7.303961  0.6964713
Ljung-Box Test     R    Q(15)  8.712829  0.8920477
Ljung-Box Test     R    Q(20)  9.766984  0.972203
Ljung-Box Test     R^2  Q(10)  11.88455  0.2928573
Ljung-Box Test     R^2  Q(15)  14.93927  0.4558006
Ljung-Box Test     R^2  Q(20)  20.08937  0.4523516
LM Arch Test       R    TR^2   11.57234  0.480607

Information Criterion Statistics:
AIC       BIC       SIC      HQIC
-8.579494 -8.513527 -8.580273 -8.552798

--
---------------------------------------------------------------------------
*Dr.  WEN SONG-QIAO*
SHENZHEN UNIVERSITY
SHENZHEN,CHINA
---------------------------------------------------------------------------

[[alternative HTML version deleted]]

```