Learn R Programming

prabclus (version 2.3-4)

prab.sarestimate: Estimates SAR model from log-abundance matrix of prab-object.

Description

This is either an interface for the function errorsarlm for abundance data stored in an object of class prab implemented for use in abundtest, or, in case that spatial information should be ignored, it estimates a two-way additive unreplicated linear model for log-abundances on factors species and region.

Usage

prab.sarestimate(abmat, prab01=NULL,sarmethod="eigen",
                             weightstyle="C",
                             quiet=TRUE, sar=TRUE,
                             add.lmobject=TRUE)

Value

A list with the following components:

sar

see above.

intercept

numeric. Estimator of the intercept.

sigma

numeric. Estimator of error standard deviation.

regeffects

numeric vector. Estimator for region effects.

speceffects

numeric vector. Estimator for species effects.

lamda

numeric. Governs the degree of spatial autocorrelation. See errorsarlm.

size

integer. Length of neighborhood list generated by nb2listw used by errorsarlm.

nbweight

numeric. Average weight of neighbors.

lmobject

if add.lmobject=TRUE, output object of either lm or errorsarlm.

Arguments

abmat

object of class prab.

prab01

presence-absence matrix of same dimensions than the abundance matrix of prabobj. This specifies the presences and absences on which the presence/absence step of abundance-based tests is based (see details). If NULL (which is usually the only reasonable choice), prab01 is computed in order to indicate the nonzeroes of prabobj$prab.

sarmethod

this is passed on as parameter method to errorsarlm and documented there. We don't have experience with any other choice than "eigen".

weightstyle

can take values "W", "B", "C", "U", and "S" though tests suggest that "C" should be chosen. See nb2listw.

quiet

this is passed on as parameter quiet to errorsarlm and documented there.

sar

logical. If TRUE, a simultaneous autoregression model is fitted by calling errorsarlm. If FALSE, a two-way additive unreplicated linear model for log-abundances on factors species and region is computed by lm, ignoring the spatial arrangement of the regions.

add.lmobject

logical. If TRUE, the whole output object of errorsarlm (or lm) is given out.

See Also

errorsarlm, abundtest

Examples

Run this code
  options(digits=4)
  data(siskiyou)
  x <- prabinit(prabmatrix=siskiyou, neighborhood=siskiyou.nb,
             distance="none")
#  Not run; this needs package spdep 
#  prab.sarestimate(x)
  prab.sarestimate(x, sar=FALSE)

Run the code above in your browser using DataLab