get.logl: Calculate the log-likelihood

Description Usage Arguments Value

View source: R/SAM_gibbs_functions.R

Description

This function calculates the log-likelihood based on the current parameter estimates

Usage

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

Arguments

y

L x S matrix, with the presence-absence data

omega

L x S matrix with the underlying latent variables omega

nspp

overall number of species (S)

nloc

overall number of locations (L)

xmat

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)

cs

vector of length S wth group assignment for each species

alpha

vector of length S with intercept for each species

Value

log-likelihood of probit regression models


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