sample.betas: Sample betas

Description Usage Arguments Value

View source: R/SAM_gibbs_functions.R

Description

This function generates samples of betas, the regression slope parameters

Usage

1
sample.betas(ngroups, cs, nparam, xtx, t.xmat, alpha, nloc, nspp, omega)

Arguments

ngroups

maximum number of species groups (KS)

cs

vector of size S with group assignment for each species

nparam

overall number of covariates (P)

xtx

equal to t(X)*X

t.xmat

equal to tranpose of the design matrix t(X)

alpha

vector of size S with intercept for each species

nloc

overall number of locations (L)

nspp

overall number of species (S)

omega

a matrix L x S containing the underlying latent variables omega

Value

this function returns a P x KS matrix with regression slope parameters betas


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