pairwise.probs: Posterior Pair-wise Probabilities

View source: R/inputoutput.R

pairwise.probsR Documentation

Posterior Pair-wise Probabilities

Description

pairwise.probs returns estimates of pairwise posterior probabilities of any two variables belonging to the same component. Specifically, it outputs: the matrix PXX, whose i,j element gives the relative incidence of the covariates X_i, X_j occurring in the same component, across components and configurations; the matrix PYY, whose i,j element estimates the probability that the responses Y_i, Y_j are in the same component; the matrix PXY, whose i,j element estimates the probability that the predictor X_i and response Y_j are in the same component.

Usage

pairwise.probs(filename, p, q, burn.in = 0)

Arguments

filename

the file where the sampled configurations are saved. The file must be (in the same format as) the file with suffix "_conf.txt" output by spavs.

p, q

the number of regressors and responses, respectively.

burn.in

the number of sampled configurations that are omitted in the computation of the pairwise probabilities (i.e., the first burn.in configurations are not used to compute the probabilities). If configurations are written out at every iteration, this is the standard burn-in.

Value

The output is a list with elements:

$samples  number of configurations on which the inference is based
          (number of configurations saved in the input file minus burn.in) 

$total_comp total number of components on which the inference is based
           
$pxx the matrix PXX 

$pyy the matrix PYY 

$pxy the matrix PXY

Examples

  pairwise.probs("run1_t1_conf.txt", p=12, q=7)

stefanomonni/spavs documentation built on April 5, 2022, 1:26 a.m.