View source: R/maxlikelihood_guilds.R
maxLikelihood.Guilds | R Documentation |
This function computes the maximum likelihood estimates of the parameters of the guilds model.
maxLikelihood.Guilds(init_vals, model = "D0",
sadx, sady, verbose = FALSE)
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 |
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) |
Thijs Janzen
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.