latent_hellinger: Hellinger distance for the latent variables of the estimation...

View source: R/latent_hellinger.R

latent_hellingerR Documentation

Hellinger distance for the latent variables of the estimation process.

Description

Returns the Hellinger distance for the latent variables, which are used in estimation process, and it could indicate possible outlying observations.

Usage

latent_hellinger(
  object,
  burnin = 50,
  plot_div = TRUE,
  scales.free = FALSE,
  all.obs = TRUE,
  obs = 1
)

Arguments

object

This is an object of the class "bqr", produced by a call to the bayesQR function.

burnin

Initial part of the chain, which is to be discarded. Default value is 50.

plot_div

If TRUE, the function prints the plot with all probabilities. Default is set to TRUE.

scales.free

If FALSE, the default, then all plots will use the same y scale. If TRUE, for each tau the plot will use the best possible scale in order to visualize the probability information for all observations.

all.obs

if TRUE, calculates KL divergence for all observations

obs

if all.obs is FALSE, specifies the observation to calculate the KL divergence.

Value

Prints a plot of the posterior probability of being an outlier for all observations and returns a data.frame with all values of the probabilities.


brsantos/baquantreg documentation built on Feb. 8, 2023, 8:18 a.m.