sample.omega: Sample omega

Description Usage Arguments Value

View source: R/SAM_gibbs_functions.R

Description

This function generates samples of omega (the underlying latent continuous variable)

Usage

1
sample.omega(y, nspp, nloc, xmat, betas, cs, alpha)

Arguments

y

L x S matrix, containing the presence-absence data

nspp

overall number of species S

nloc

overall number of locations L

xmat

L x P matrix containing the covariates (columns) for each location (rows). Notice that this matrix does not contain a column of 1's for the intercept

betas

P x KS matrix containing slope parameters for each covariate (row) for each group (column)

cs

group assignment for each species

alpha

intercept for each species

n

number of samples to generate

Value

this function returns a L x S matrix containing the underlying latent variables omega


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