qqplot: Quantile-Quantile Plots

Description Usage Arguments Author(s) References Examples

Description

This function produces Q-Q plot with envelopes for a time series following conditional symmetric distribution.

Usage

1
qqplot(model, envelope = 0.95 , B = 400)

Arguments

model

a result of a call to elliptical.ts.

envelope

confidence level for point-wise confidence envelope, or FALSE for no envelope.

B

integer; number of bootstrap replications for confidence envelope. Default is 400 iterations.

Author(s)

Vinicius Quintas Souto Maior and Francisco Jose A. Cysneiros

Maintainer: Vinicius Quintas Souto Maior <vinicius@de.ufpe.br>

References

Cleveland, W.S. (1994). The Elements of Graphing Data, Hobart Press.

Thode, Henry C. (2002). Testing for normality, New York: Marcel Dekker.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
data(assets)
attach(assets)

# Return in the prices on Microsoft and SP500 index

N = length(msf)
.sp500 = ((sp500[2:N]-sp500[1:(N-1)])/sp500[1:(N-1)])*100
.msf = ((msf[2:N]-msf[1:(N-1)])/msf[1:(N-1)])*100

# The T-bill rates were divided by 253 to convert to a daily rate

.tbill = tbill/253

# Excess return in the d prices on Microsoft and SP500 index

Y = .msf - .tbill[1:(N-1)]
X = .sp500 - .tbill[1:(N-1)]

# Period from April 4, 2002 to October 4, 2002

serie = Y[2122:2240]
aux = cbind(X[2122:2240])

# Fit SYMARMA models

fit.1 = elliptical.ts(serie,order=c(0,0,1),xreg=aux,include.mean=FALSE,
 family="Normal")
fit.2 = elliptical.ts(serie,order=c(0,0,1),xreg=aux,include.mean=FALSE,
 family="Student",index1=4)

# Q-Q Plots

qqplot(fit.1, B = 50)
qqplot(fit.2, envelope = FALSE)

Example output

Attaching package: 'sym.arma'

The following objects are masked from 'package:stats':

    influence, predict, qqplot

                               
Call:                          
symarma(0,0,1) - family: Normal
             
Coefficients:
    Estimate Std. Error
aux   1.2835     0.0952
ma1  -0.1531     0.0930
                                                      
Varphi estimated: 3.9693  (Std. Error: 0.5168)        
Log-likelihood: -248.77                               
RMSE: 3.35                                            
Number of iterations in Fisher scoring optimization: 5
                                                      
                                
Call:                           
symarma(0,0,1) - family: Student
             
Coefficients:
    Estimate Std. Error
aux   1.2448     0.0885
ma1  -0.1917     0.0865
                                                       
Varphi estimated: 2.4537  (Std. Error: 0.4226)         
Log-likelihood: -247.25                                
RMSE: 3.08                                             
Number of iterations in Fisher scoring optimization: 10
                                                       

sym.arma documentation built on May 2, 2019, 8:30 a.m.