R: Maximization of the loglikelihood under the Guilds Model,...

maxLikelihood.Guilds.Conditional {GUILDS} | R Documentation

## Maximization of the loglikelihood under the Guilds Model, conditioned on guild size.

### Description

This function computes the maximum likelihood estimates of the parameters of the guilds model, conditioned on guild size.

### Usage

    maxLikelihood.Guilds.Conditional(init_vals, model, method, sadx, sady, verbose = TRUE)

### Arguments

`init_vals` | `init_vals` corresponds to a vector of parameter values in which to start the Maxmimum Likelihood algorithm, 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 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: - "D0" - "D1"
`method` | Optimization of the Likelihood can be done using two different methods: - "simplex": this method makes use of the "Nelder Mead" optimization method - "subplex": makes use of the subplex method from the package "subplex" - Note 2016-09-23: Because the subplex method is generating errors, for the time being, the subplex method has been disabled. Please note that we have explicitly not used the "optim" method, since this method tends to provide less reliable outcomes.
`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

if the method used was "simplex", the output is a list containing the following:

`par` | a vector containing the parameter values at the maximum likelihood
`fvalues` | the likelihood at the corresponding parameter values
`conv` | gives a message on convergence of optimization; conv = 0 means convergence

if the method used was "subplex", 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 -1: number of maximum function evaluations exceeded 0: success: convergence 1: limit of machine precision reached
`message` | A character string giving a diagnostic message from the optimizer,
`hessian` | Hessian matrix (not implemented for this package)

### Author(s)

Thijs Janzen

### Examples

    initParams <- c(20,0.1); #Initial parameters for the D0 model, c(theta,alpha)
    maxLikelihood.Guilds.Conditional(initParams,model="D0", method="simplex",
    				 sadx = 1:20, sady = 1:20, verbose = TRUE)

[Package GUILDS version 1.3 Index]