species_mix.fit is similar to glm.fit and does all the heavy lifting when it comes to estimating species mix models. If you are unfamilar with how to use glm.fit it is recommended that you use species_mix which is the user friendly wrapper around this function.
species_mix.fit( y, X, W, U, G, S, spp_weights, site_spp_weights, offset, y_is_na, disty, size, powers, control, inits = NULL )
y | is a matrix generated from model.response containing the species information. The matrix has the dimensions n_sites * n_species. |
---|---|
X | is a design matrix for the archetype_formula dimension n_sites * n_covariates. |
W | is a design matrix for species_formula and will be implemented if species_formula has covariates. |
U | is a design matrix for all_formula and will be implemented if not NULL. |
G | is the number of species archetypes that are being estimated. |
S | is the number of species to be modelled (this will be calculated internally in species_mix()) |
spp_weights | These are weights on the species logls and are specifically used in the Bayesian Bootstrap. |
site_spp_weights | These are site and species specific weights. For most distributions these will be the same across all species. But this form is required to correctly estiamte the IPPMs. See species_mix for more details. |
offset | this is a vector of site specific offsets, this might be something like area sampled at sites. |
y_is_na | This is a logical matrix used specifically with 'ippm' modelling - don't worry about this, it'll be worked out for you. Yay! |
disty | the error distribution to used in species_mix estimation. Currently, 'bernoulli', 'poisson', 'ippm' (Poisson point process), 'negative.binomial' and 'guassian' are available - internal conversion of distribution to a integer. |
size | The size of each of binomial sample at each site. Length should be the number of sites. |
powers | The power parameters for the Tweedie distribution. |
control | this is a list of control parameters that alter the specifics of model fitting. |
inits | This will be a vector of starting values for species_mix (i.e you've fitted a model and want to refit it). |