Learn R Programming

pvrank (version 1.0)

VGGFR: Vianelli density

Description

Plots Vianelly (generalized Gaussian) density with finite range in [-1,1].

Usage

VGGFR(L1, L2, add = FALSE, lwd = 2, lty = 5, col = "blue", np = 201)

Arguments

L1
positive shape parameter.
L2
positive shape parameter. Impacts more on the tails.
add
when add=TRUE the plot is superimposed to an existing graph.
lwd
weight of the line.
lty
the type of the line.
col
color of the curve.
np
number of points to be plotted.

Value

  • The value returned is a list contaning:
  • st.devstandard deviation
  • kurtkurtosis
  • oamordinate at the mode

Details

The VGGFR density is given by $$f(r;\lambda_1,\lambda_2)=\lambda_1(1-|r|^{\lambda_2})^{\lambda_1}/[2B(1/\lambda_1,\lambda_2+1)]$$ where $\lambda_1,\lambda_2>0$ and $B()$ is the beta function.

References

Tarsitano, A. and Amerise, I. L. (2013). Approximation of the null distribution of rank correlations. Submitted. Vianelli, S. (1983). The family of normal and lognormal distributions of order r. Metron, 41, 3-10.

Examples

Run this code
# Density curve of a VGGFR model
VGGFR(2,12)
#
a<-ranktes(0.5, 28, "r4", "vg",FALSE, "two", FALSE)
b<-VGGFR(a$Lambda, add = FALSE, lwd = 2, lty = 5, col = "blue", np = 201)
#
# A family of density curves
VGGFR(1,2,col="black")
La<-seq(1,6,0.5);Lg<-seq(0,1,1/12)
for (L1 in La){
	c2<-gray(Lg, alpha= 2/6)
	for (L2 in seq(1,12,1)){
	VGGFR(L1,L2,add=TRUE,col=c2[L2])}}
# Save and use the results 
res<-VGGFR(1.5,5.5)
res$kurt-res$oam/res$st.dev

Run the code above in your browser using DataLab