unmarkedFit-class: Class "unmarkedFit"

Description Slots Methods Note Examples

Description

Contains fitted model information which can be manipulated or extracted using the methods described below.

Slots

fitType:

Object of class "character"

call:

Object of class "call"

formula:

Object of class "formula"

data:

Object of class "unmarkedFrame"

sitesRemoved:

Object of class "numeric"

estimates:

Object of class "unmarkedEstimateList"

AIC:

Object of class "numeric"

opt:

Object of class "list" containing results from optim

negLogLike:

Object of class "numeric"

nllFun:

Object of class "function"

knownOcc:

unmarkedFitOccu only: sites known to be occupied

K:

unmarkedFitPCount only: upper bound used in integration

mixture:

unmarkedFitPCount only: Mixing distribution

keyfun:

unmarkedFitDS only: detection function used by distsamp

unitsOut:

unmarkedFitDS only: density units

Methods

[

signature(x = "unmarkedFit", i = "ANY", j = "ANY", drop = "ANY"): extract one of names(obj), eg 'state' or 'det'

backTransform

signature(obj = "unmarkedFit"): back-transform parameters to original scale when no covariate effects are modeled

coef

signature(object = "unmarkedFit"): returns parameter estimates. type can be one of names(obj), eg 'state' or 'det'. If altNames=TRUE estimate names are more specific.

confint

signature(object = "unmarkedFit"): Returns confidence intervals. Must specify type and method (either "normal" or "profile")

fitted

signature(object = "unmarkedFit"): returns expected values of Y

getData

signature(object = "unmarkedFit"): extracts data

getP

signature(object = "unmarkedFit"): calculates and extracts expected detection probabilities

hessian

signature(object = "unmarkedFit"): Returns hessian matrix

linearComb

signature(obj = "unmarkedFit", coefficients = "matrixOrVector"): Returns estimate and SE on original scale when covariates are present

mle

signature(object = "unmarkedFit"): Same as coef(fit)?

names

signature(x = "unmarkedFit"): Names of parameter levels

nllFun

signature(object = "unmarkedFit"): returns negative log-likelihood used to estimate parameters

parboot

signature(object = "unmarkedFit"): Parametric bootstrapping method to assess goodness-of-fit

plot

signature(x = "unmarkedFit", y = "missing"): Plots expected vs. observed values

predict

signature(object = "unmarkedFit"): Returns predictions and standard errors for original data or for covariates in a new data.frame

profile

signature(fitted = "unmarkedFit"): used by confint method='profile'

residuals

signature(object = "unmarkedFit"): returns residuals

sampleSize

signature(object = "unmarkedFit"): returns number of sites in sample

SE

signature(obj = "unmarkedFit"): returns standard errors

show

signature(object = "unmarkedFit"): concise results

summary

signature(object = "unmarkedFit"): results with more details

update

signature(object = "unmarkedFit"): refit model with changes to one or more arguments

vcov

signature(object = "unmarkedFit"): returns variance-covariance matrix

smoothed

signature(object="unmarkedFitColExt"): Returns the smoothed trajectory from a colonization-extinction model fit. Takes additional logical argument mean which specifies whether or not to return the average over sites.

projected

signature(object="unmarkedFitColExt"): Returns the projected trajectory from a colonization-extinction model fit. Takes additional logical argument mean which specifies whether or not to return the average over sites.

Note

This is a superclass with child classes for each fit type

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
showClass("unmarkedFit")

# Format removal data for multinomPois 
data(ovendata)
ovenFrame <- unmarkedFrameMPois(y = ovendata.list$data,
	siteCovs = as.data.frame(scale(ovendata.list$covariates[,-1])), 
	type = "removal")

# Fit a model
(fm1 <- multinomPois(~ 1 ~ ufp + trba, ovenFrame))

# Apply a bunch of methods to the fitted model

names(fm1)
fm1['state']
fm1['det']

backTransform(fm1, type ='det')

coef(fm1, type='state')

confint(fm1, type='state', method='profile')

fitted(fm1)

getData(fm1)

getP(fm1)

# Return predicted abundance at specified covariate values
linearComb(fm1, c(Int = 1, ufp = 0, trba = 0), type='state')

# Assess goodness-of-fit
parboot(fm1)

plot(fm1)

# Predict abundance at specified covariate values.
newdat <- data.frame(ufp = 0, trba = seq(-1, 1, length=10))

predict(fm1, type='state', newdata=newdat)

sampleSize(fm1)

summary(fm1)

(fmNull <- update(fm1, formula = ~1 ~1))

vcov(fm1, type='state')

ianfiske/unmarked documentation built on May 18, 2019, 1:28 a.m.