dpairbeta.grid: PB and NL spectral densities on the two-dimensional simplex

View source: R/dpairbeta.grid.r

dnestlog.gridR Documentation

PB and NL spectral densities on the two-dimensional simplex

Description

The two functions compute respectively the NL and PB spectral densities, in the three-dimensional case, on a discretization grid. A plot is issued (optional).

Usage

dnestlog.grid(
  par,
  npoints = 50,
  eps = 0.001,
  equi = TRUE,
  displ = TRUE,
  invisible = TRUE,
  ...
)

dpairbeta.grid(
  par,
  npoints = 50,
  eps = 0.001,
  equi = TRUE,
  displ = TRUE,
  invisible = TRUE,
  ...
)

Arguments

par

The parameter for the Pairwise Beta or the Nested Logistic density.

  • In the Pairwise Beta model, par is of length choose(p,2)+1. The first element is the global dependence parameter, the subsequent ones are the pairwise dependence parameters, in lexicographic order (e.g. \beta_{12}, \beta_{13}, \beta_{23}).

  • In the NL model, par is a vector of length four with components between zero and one. The first one is the global dependence parameter, the three subsequent ones are the pairwise dependence parameters, again in lexicographic order.

npoints

The number of grid nodes on the squared grid containing the desired triangle.

eps

Positive number: minimum distance from any node inside the simplex to the simplex boundary

equi

logical. Is the simplex represented as an equilateral triangle (if TRUE) or a right triangle (if FALSE) ?

displ

logical. Should a plot be produced ?

invisible

logical. If TRUE, the result is returned as invisible.

...

Additional arguments to be passed to dgridplot

Value

A npoints*npoints matrix containing the considered density's values on the grid. The row (resp. column) indices increase with the first (resp. second) coordinate on the simplex.

Note

If equi==TRUE, the density is relative to the Hausdorff measure on the simplex itself: the values obtained with equi = FALSE are thus divided by \sqrt 3.

Examples


dpairbeta.grid(par=c( 0.8, 8, 5, 2),
npoints=70, eps = 1e-3, equi = TRUE, displ = TRUE, invisible=TRUE)

##  or ...

Dens <- dpairbeta.grid(par=c(0.8, 8, 5, 2),
npoints=70, eps = 1e-3, equi = TRUE, displ = FALSE)
Grid=discretize(npoints=70,eps=1e-3,equi=TRUE)
dev.new()
image(Grid$X, Grid$Y, Dens)
contour(Grid$X, Grid$Y, Dens, add=TRUE)
add.frame(equi=TRUE, npoints=70, axes=FALSE)



BMAmevt documentation built on April 21, 2023, 9:07 a.m.