Learn R Programming

mdir (version 0.9.0)

calcFusionProbabiliy: Calculate fusion probability

Description

The mean of the number of MCMC samples for which each item has the same label in views v and w.

Usage

calcFusionProbabiliy(mcmc, v, w, processed = FALSE)

Value

A vector of probabilities

Arguments

mcmc

Output from ``runMCMCChain``

v

First view considered.

w

Second view considered.

processed

Has the chain been processed already (defaults to FALSE).

Examples

Run this code

N <- 100
X <- matrix(c(rnorm(N, 0, 1), rnorm(N, 3, 1)), ncol = 2, byrow = TRUE)
Y <- matrix(c(rnorm(N, 0, 1), rnorm(N, 3, 1)), ncol = 2, byrow = TRUE)

truth <- c(rep(1, N / 2), rep(2, N / 2))
data_modelled <- list(X, Y)

V <- length(data_modelled)

# This R is much too low for real applications
R <- 100
thin <- 5
burn <- 10

K_max <- 10
K <- rep(K_max, V)
types <- rep("G", V)

mcmc_out <- callMDI(data_modelled, R, thin, types, K = K)
calcFusionProbabiliy(mcmc_out, 1, 2)

Run the code above in your browser using DataLab