slmfit: Fits a Spatial Linear Model

Description Usage Arguments Value Examples

View source: R/slmfit.R

Description

Estimates regression coefficients and spatial autocorrelation parameters.

Usage

1
2
3
slmfit(formula, data, xcoordcol, ycoordcol, CorModel = "Exponential",
  estmethod = "REML", covestimates = c(NA, NA, NA),
  detectionobj = NULL, coordtype = "TM", areacol = NULL)

Arguments

formula

is an R linear model formula specifying density as the response variable as well as covariates for predicting densities on the unsampled sites.

data

is the data set with the response column of densities, the covariates to be used for the block kriging, and the spatial coordinates for all of the sites.

xcoordcol

is the name of the column in the data frame with x coordinates or longitudinal coordinates

ycoordcol

is the name of the column in the data frame with y coordinates or latitudinal coordinates

CorModel

is the covariance structure. By default, CorModel is Exponential but other options include the Spherical and Gaussian.

estmethod

is either the default "REML" for restricted maximum likelihood to estimate the covariance parameters and regression coefficients or "ML" to estimate the covariance parameters and regression coefficients.

covestimates

is an optional vector of covariance parameter estimates (nugget, partial sill, range). If these are given and estmethod = "None", the the provided vector are treated as the estimators to create the covariance structure.

detectionobj

is a fitted model obj from get_detection. The default is for this object to be NULL, resulting in spatial prediction that assumes perfect detection.

coordtype

specifies whether the coordinates are in Lat/Lon or already in TM or UTM

areacol

is the name of the column with the areas of the sites. By default, we assume that all sites have equal area, in which case a vector of 1's is used as the areas.

Value

a list with

Examples

1
2
slmfit(formula = Moose ~ CountPred + Stratum, data = vignettecount,
xcoordcol = "Xcoords", ycoordcol = "Ycoords")

highamm/FPBK-with-Detection documentation built on Jan. 2, 2022, 6:35 a.m.