NMixPredCondCDFMarg: Univariate conditional predictive cumulative distribution...

View source: R/NMixPredCondCDFMarg.R

NMixPredCondCDFMargR Documentation

Univariate conditional predictive cumulative distribution function

Description

This function serves as an inference tool for the MCMC output obtained using the function NMixMCMC. It computes (posterior predictive) estimates of univariate conditional cumulative distribution functions.

Usage

NMixPredCondCDFMarg(x, ...)

## Default S3 method:
NMixPredCondCDFMarg(x, icond, prob, scale, K, w, mu, Li, Krandom=FALSE, ...)

## S3 method for class 'NMixMCMC'
NMixPredCondCDFMarg(x, icond, prob, grid, lgrid=50, scaled=FALSE, ...)

## S3 method for class 'GLMM_MCMC'
NMixPredCondCDFMarg(x, icond, prob, grid, lgrid=50, scaled=FALSE, ...)

Arguments

x

an object of class NMixMCMC for NMixPredCondCDFMarg.NMixMCMC function.

An object of class GLMM_MCMC for NMixPredCondCDFMarg.GLMM_MCMC function.

A list with the grid values (see below) for NMixPredCondCDFMarg.default function.

icond

index of the margin by which we want to condition

prob

a numeric vector. If given then also the posterior pointwise quantiles of the conditional cdf's are computed for probabilities given by prob. These can be used to draw pointwise credible intervals.

scale

a two component list giving the shift and the scale. If not given, shift is equal to zero and scale is equal to one.

K

either a number (when Krandom=FALSE) or a numeric vector with the chain for the number of mixture components.

w

a numeric vector with the chain for the mixture weights.

mu

a numeric vector with the chain for the mixture means.

Li

a numeric vector with the chain for the mixture inverse variances (lower triangles only).

Krandom

a logical value which indicates whether the number of mixture components changes from one iteration to another.

grid

a list with the grid values for each margin in which the cdf should be evaluated. The value of grid[[icond]] determines the values by which we condition.

If grid is not specified, it is created automatically using the information from the posterior summary statistics stored in x.

lgrid

a length of the grid used to create the grid if that is not specified.

scaled

if TRUE, the cdf of shifted and scaled data is summarized. The shift and scale vector are taken from the scale component of the object x.

...

optional additional arguments.

Value

An object of class NMixPredCondCDFMarg which has the following components:

x

a list with the grid values for each margin. The components of the list are named x1, ... or take names from grid argument.

icond

index of the margin by which we condition.

cdf

a list with the computed conditional cdf's for each value of x[[icond]]. Each cdf[[j]] is again a list with conditional cdf's for each margin given margin icond equal to x[[icond]][j]. The value of cdf[[j]][[imargin]] gives a value of a marginal cdf of the imargin-th margin at x[[icond]][j].

prob

a value of the argument prob.

qXX%

if prob is given then there is one additional component named qXX%, e.g., q50% for each value of prob which has the same structure as the component cdf and keeps computed posterior pointwise quantiles.

There is also a plot method implemented for the resulting object.

Author(s)

Arnošt Komárek arnost.komarek@mff.cuni.cz

See Also

plot.NMixPredCondCDFMarg, NMixMCMC, GLMM_MCMC.


mixAK documentation built on Sept. 25, 2023, 5:08 p.m.