Usage

Arguments

an object of class "formula" (or one that can be coerced to that class):a symbolic description of the model to be fitted. The response variable is arbitary, all the responses are in sp.data.

sp.data

a data frame containing the species information. The frame is arranged so that each row is a site and each column is a species. Species names should be included as column names otherwise numbers from 1:S are assigned.

covar.data

a data frame containng the covariate data for each site. Names of columns must match that given in sp.form

G

number of archetype species to fit

pars

vector of parameters order is additive logisic transform of pi, glm coefficents by column (ie all intercepts first, etc)

Details

SpeciesMix is a wrapper for fitmix.cpp that allows for easier data input. The data frames are merged into the appropriate format for the use in fitmix.cpp. Minima is found using vmmin (BFGS) and the gradients are calculated using CPPAD (auto differentiation)

Value

logl

loglikelihood

aic

AIC

bic

BIC

tau

posterior probabilities giving group membership. These values indicate which archetype each species belongs to.

pi

prior probabilities of archetype membership.

coef

coefficents for each species archetype

covar

variance co-variance matrix at the maxima. Calculated if est.var is TRUE