confregion: It computes the confidence region in the ternary space

View source: R/conf_region.R

confregionR Documentation

It computes the confidence region in the ternary space

Description

Given the parameters of the confidence ellipse in the space of covariate coefficiets, it returns the confidence region of the effect.

Usage

confregion(mu, Sig, conf = 0.95, npoints = 100)

Arguments

mu

centre of the ellipse.

Sig

covariance matrix of the ellipse.

conf

confidence level of the region.

npoints

number of points of the border.

Value

data.frame with three columns (named p1, p2, and p3) with ternary coordinates of the points of the ellipse.

Examples

Ternary::TernaryPlot()
Ternary::TernaryPolygon(
  coordinates = plot3logit:::confregion(1:2, 0.3 * diag(2:1)),
  col = grDevices::rgb(0, 0, 0.5, 0.2),
  border = NA
)
Ternary::TernaryPolygon(
  coordinates = plot3logit:::confregion(1:2, 0.1 * diag(2:1)),
  col = grDevices::rgb(0, 0, 0.5, 0.2),
  border = NA
)


plot3logit documentation built on July 19, 2022, 9:07 a.m.