Last data update: 2014.03.03

R: Equal Correlation Matrix
equicorrR Documentation

Equal Correlation Matrix

Description

Construction of an equal correlation matrix

Usage

equicorr(d, rho)

Arguments

d

integer, dimension of matrix

rho

numeric, value of correlation

Value

matrix

Examples

equicorr(7, 0.5)
ll <- c(0.01, 0.99)
BiDensPlot(func = dcopula.gauss, xpts = ll, ypts = ll,
           Sigma = equicorr(2,0.5))
BiDensPlot(func = dcopula.t, xpts = ll, ypts = ll , df = 4,
           Sigma = equicorr(2, 0.5)) 

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(QRM)
Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

    lbeta

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/QRM/equicorr.Rd_%03d_medium.png", width=480, height=480)
> ### Name: equicorr
> ### Title: Equal Correlation Matrix
> ### Aliases: equicorr
> ### Keywords: array
> 
> ### ** Examples
> 
> equicorr(7, 0.5)
     [,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]  1.0  0.5  0.5  0.5  0.5  0.5  0.5
[2,]  0.5  1.0  0.5  0.5  0.5  0.5  0.5
[3,]  0.5  0.5  1.0  0.5  0.5  0.5  0.5
[4,]  0.5  0.5  0.5  1.0  0.5  0.5  0.5
[5,]  0.5  0.5  0.5  0.5  1.0  0.5  0.5
[6,]  0.5  0.5  0.5  0.5  0.5  1.0  0.5
[7,]  0.5  0.5  0.5  0.5  0.5  0.5  1.0
> ll <- c(0.01, 0.99)
> BiDensPlot(func = dcopula.gauss, xpts = ll, ypts = ll,
+            Sigma = equicorr(2,0.5))
> BiDensPlot(func = dcopula.t, xpts = ll, ypts = ll , df = 4,
+            Sigma = equicorr(2, 0.5)) 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>