sample.psi: Sample psi parameters

Description Usage Arguments Value

View source: R/SBM_gibbs_functions.R

Description

Sample the presence probability for each location and species group (psi) from it's full conditional distribution

Usage

1
sample.psi(z, w, dat, ngroup.loc, ngroup.spp)

Arguments

z

vector of length L, storing the current membership of each location

w

vector of length S, storing the current membership of each species

dat

L x S matrix containing the presence-absence data

ngroup.loc

maximum number of location groups (KL)

ngroup.spp

maximum number of species groups (KS)

Value

a KL x KS matrix of psi parameters


drvalle1/EcoCluster documentation built on Jan. 25, 2022, 12:46 a.m.