File: plot-pairs.Rd

package info (click to toggle)
fassets 3011.83-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 428 kB
  • sloc: makefile: 1
file content (128 lines) | stat: -rw-r--r-- 2,994 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
\name{plot-pairs}


\alias{pairsPlot}

\alias{assetsPairsPlot}
\alias{assetsCorgramPlot}
\alias{assetsCorTestPlot}
\alias{assetsCorImagePlot}   


\title{Assets Pairs Plot}


\description{
  
    Display several aspects of correlation bettween pairs of
    assets.   
    
}


\usage{
assetsPairsPlot(x, \dots)
assetsCorgramPlot(x,
    method = c("pie", "shade"), \dots)
assetsCorTestPlot(x, \dots)
assetsCorImagePlot(x, labels = TRUE, show = c("cor", "test"), 
    use = c("pearson", "kendall", "spearman"), abbreviate = 3, \dots)
}


\arguments{
  
    \item{x}{
        any rectangular time series object which can be converted by the 
        function \code{as.matrix()} into a matrix object, e.g. like an 
        object of class \code{timeSeries}, \code{data.frame}, or \code{mts}. 
        } 
    \item{labels}{
        a logical flag, if \code{TRUE} then default labels will be used,
        otherwise the plots will be displayed without labels and the user
        can add his own labels.
        }
    \item{method}{
        a character string, the type of graph used in the lower panel.
        }
    \item{show}{
        a character string, what should be pressented, correlations or
        results from correlation tests?
        }
    \item{use}{
        a character string indicating which correlation coefficient or 
        covariance is to be computed. One of \code{"pearson"}, the default, 
        \code{"kendall"}, or \code{"spearman"}.
        }
    \item{abbreviate}{
        allows to abbreviate strings to at least \code{abbreviate} 
        characters, such that they remain unique, if they were. 
        }
    \item{\dots}{
        optional arguments to be passed.
        }   
        
}


\details{


    \code{assetsPairsPlot}\cr
    displays pairs of scatterplots of individual assets,
    
    \code{assetsCorgramPlot}\cr
    displays correlations between assets, 
    
    \code{assetsCorTestPlot}\cr
    displays and tests pairwise correlations,
    
    \code{assetsCorImagePlot}\cr
    displays an image plot of a correlations.
    
}


\author{

    Diethelm Wuertz for the Rmetrics port.
    
}


\references{

Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009);
    \emph{Portfolio Optimization with R/Rmetrics}, 
    Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.
    
}


\examples{
## LPP2005REC -
   # Load Swiss Pension Fund Data:
   LPP <- LPP2005REC[, 1:6]
   head(LPP)   
   
## assetsPairsPlot -
   # Create Pairs Plot:  
   assetsPairsPlot(LPP)
  
## assetsCorgramPlot - 
   # Create Corellogram Plot:  
   assetsCorgramPlot(LPP, method = "pie")
   assetsCorgramPlot(LPP, method = "shade")
   
## assetsCorTestPlot - 
   # Create Correlation Test Plot: 
   assetsCorTestPlot(LPP)
   
## assetsCorImagePlot -
   # Create Correlation Image Plot: 
   assetsCorImagePlot(LPP)    
}


\keyword{models}