sample.alpha: Sample alpha

Description Usage Arguments Value

View source: R/SAM_gibbs_functions.R

Description

This function generates samples alpha, the intercept for each species

Usage

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

Arguments

nloc

overall number of locations (L)

xmat

this is the L x P design 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) and each group (column)

omega

a matrix L x S containing the underlying latent variables omega

cs

vector of size S containing the group assignment for each species

nspp

overall number of species (S)

Value

this function returns a vector of size S with the intercept of each species


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