logLikelihood.Guilds {GUILDS}R Documentation

Likelihood of the Guilds sampling formula

Description

This function calculates the likelihood of the guilds model, provided abundance data and parameter values.

Usage

logLikelihood.Guilds(parameters, model, sadx, sady, verbose = TRUE)

Arguments

parameters

parameters corresponds to a vector of parameter values depending on the provided model:
- model: "D0" parameters = c(theta, alpha)
- model: "D1" parameters = c(theta, alpha X, alpha Y)

model

The chosen model to calculate the likelihood for, please note that the vector of parameters should contain the corresponding parameters in the right order. The user can pick one of these models:
- "D0"
- "D1"

sadx

The Species Abundance Distribution of guild X

sady

The Species Abundance Distribution of guild Y

verbose

TRUE/FALSE flag, indicates whether intermediate output is shown on screen

Value

returns the LogLikelihood

Author(s)

Thijs Janzen

Examples

exampleData <- generate.Guilds(theta = 200,
                               alpha_x = 0.005,
                               alpha_y = 0.001,
                               J = 1000)
#theta = 200, alpha X = 0.005, alpha Y = 0.001
parametervals <- c(200, 0.005, 0.001)
LL = logLikelihood.Guilds(parametervals,
                          model = "D1",
			                    exampleData$guildX,
			                    exampleData$guildY,
			                    verbose = TRUE)

[Package GUILDS version 1.4.6 Index]