maxLikelihood.Guilds {GUILDS} | R Documentation |
Maximization of the loglikelihood under the Guilds Model.
Description
This function computes the maximum likelihood estimates of the parameters of the guilds model.
Usage
maxLikelihood.Guilds(init_vals, model = "D0",
sadx, sady, verbose = FALSE)
Arguments
init_vals |
|
model |
The chosen model to calculate the maximum 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: |
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
The output is a list containing the following:
par |
a vector containing the parameter values at the maximum likelihood |
value |
the likelihood at the corresponding parameter values |
counts |
Number of function evaluations required |
convergence |
-2: invalid input |
message |
A character string giving a diagnostic message from the optimizer, |
hessian |
Hessian matrix (not implemented for this package) |
Author(s)
Thijs Janzen
Examples
## Not run:
J <- 10000
theta <- 100
alpha_x <- 0.1
simul_data <- generate.Guilds(theta, alpha_x, alpha_x, J)
#initial parameters for the D0 model c(theta,alpha)
LL <- maxLikelihood.Guilds(init_vals = c(theta, alpha_x),
model = "D0",
sadx = simul_data$guildX,
sady = simul_data$guildY)
## End(Not run)