calcN: calcN

View source: R/estimates.R

calcNR Documentation

calcN

Description

calcN estimates abundance for a defined region from a fitted model. The default is for the population defined by the sampling units. The user can optionally supply a data.frame of covariate values for any spatial unit of interest.

Usage

calcN(obj, ...)

## S3 method for class 'efit'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, ...)

## S3 method for class 'efitS'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, ...)

## S3 method for class 'efitM'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, ...)

## S3 method for class 'efitR'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, ...)

## S3 method for class 'efitGP'
calcN(
  obj,
  CI.level = 0.95,
  CI.calc = c("norm", "lnorm", "boot"),
  nboot = 500,
  ...
)

## S3 method for class 'efitGPlist'
calcN(
  obj,
  CI.level = 0.95,
  CI.calc = c("norm", "lnorm", "boot"),
  nboot = 500,
  ...
)

## S3 method for class 'efitMS'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, npost = 500, ...)

## S3 method for class 'efitMNS'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, ...)

## S3 method for class 'efitGRMS'
calcN(obj, newdata, off.set = NULL, CI.level = 0.95, ...)

Arguments

obj

A fitted model object.

newdata

An (optional) data.frame of covariates for spatial units of interest. There must by covariate values for every parameter in obj.

off.set

Either a scalar offset value to apply to each spatial unit for prediction (e.g. cell area) or a vector of the same length as nrow(newdata).

Value

a data.frame giving the predictions for each spatial unit as well as the overall abundance estimate for the region with associated SE and confidence intervals.

Examples

 counts<- san_nic_pre$counts
 emf <- eFrame(y=counts)
 mod <- nmix(~1, ~1, data=emf)
 Nhat<- calcN(mod)


dslramsey/eradicate documentation built on March 16, 2024, 1:40 p.m.