sugsclusterProbcpp: A C++ accelerated version of sugsclusterProb

Description Usage Arguments Value

Description

A C++ accelerated version of sugsclusterProb

Usage

1
sugsclusterProbcpp(x, K, i, D, n, betaHat, phi, m, nu, S, lambda)

Arguments

x

A numeric vector containing data of the observation

K

An integer specifiying the number of clusters

i

An integer specifying the current iteration of SUGS algorithm

D

An integer specifiying the number of variables

n

A numeric vector contain the number of people already allocated to each cluster

betaHat

A numeric vector containing the grid of hyperpriors for the dirichlet concentration parameter

phi

A numeric matrix containing the weights for the dirichlet hyperpiors

m

A numeric matrix containing the means for each component

nu

A numeric vector containg the degrees of freedom for each component

S

A numeric matrix containing the scale prior for each component

lambda

A numeric vector containing the mean variance hyperparamter for each component

Value

An arma::vec containg the probability that observation x belongs to each component


ococrook/sugsvarsel documentation built on May 27, 2019, 12:12 p.m.