Search code examples
rsummary

How to read an item from summary in R


I am using Aparch/Garch model (library: "fGarch") and want to read (& use later) the objects like AIC, t-values of the coefficients in the summary of the model fit. How can I do this?

m3<-(garchFit(~arma(1,0)+aparch(1,1), cond.dist= "sged" ,data=t2, trace=FALSE))

summary(m3)

Title: GARCH Modelling

Call:

 garchFit(formula = ~arma(1, 0) + aparch(1, 1), data = t2, cond.dist = "sged", 
    trace = FALSE) 

Mean and Variance Equation:

 data ~ arma(1, 0) + aparch(1, 1)
 [data = t2]

Conditional Distribution:

 sged 

Coefficient(s):
        mu         ar1       omega      alpha1      gamma1       beta1       delta        skew       shape  
0.00063936  0.07745422  0.00116542  0.24170185  0.19179650  0.74430731  1.11902269  1.06401615  1.23013925  

Std. Errors:
 based on Hessian 

Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)    
mu     0.0006394   0.0004789    1.335 0.181828    
ar1    0.0774542   0.0256070    3.025 0.002489 ** 
omega  0.0011654   0.0003097    3.763 0.000168 ***
alpha1 0.2417019   0.0368264    6.563 5.26e-11 ***
gamma1 0.1917965   0.0699436    2.742 0.006104 ** 
beta1  0.7443073   0.0383066   19.430  < 2e-16 ***
delta  1.1190227   0.2569665    4.355 1.33e-05 ***
skew   1.0640162   0.0295095   36.057  < 2e-16 ***
shape  1.2301392   0.0592616   20.758  < 2e-16 ***

Information Criterion Statistics:
      AIC       BIC       SIC      HQIC 
-4.835325 -4.803583 -4.835395 -4.823503 


Solution

  • I think you'll have to extract those from the output of garchFit, not its summary. Start by looking at:

    > attributes(m3)
    

    Then you can access something like $fit$tval by doing

    > m3@fit$tval