predict.cjs: predict.cjs

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/predict.cjs.R

Description

Predictor method for CJS capture-recapture objects. Return expected values for all active cells in the model.

Usage

1
2
## S3 method for class 'cjs'
predict(object, ...)

Arguments

object

CJS capture-recapture model as output from F.cjs.estim

...

Additional arguments to other functions. Not used, but must be here for compatibility with the generic predict function.

Details

The only components of cjsobj needed are $histories, $p.hat, $s.hat

Value

A nan X ns matrix of fitted values (=cell expected value), where nan=number of animals and ns=number of samples. Fitted values in the non-active cells are set to NA. Non-active cells are those prior to and including the initial capture, and after the occasion on which an animal is known to have died. Computation of expected values is described in the details section of the help file for F.cjs.gof.

Author(s)

Trent McDonald, WEST Inc., tmcdonald@west-inc.com

See Also

F.cjs.estim, F.cjs.gof

Examples

1
2
3
4
5
6
# Fit CJS model to dipper data, time-varying capture and survivals.
data(dipper.histories)
xy <- F.cjs.covars( nrow(dipper.histories), ncol(dipper.histories) )
for(j in 1:ncol(dipper.histories)){ assign(paste("x",j,sep=""), xy$x[,,j]) } 
dipper.cjs <- F.cjs.estim( ~x2+x3+x4+x5+x6, ~x1+x2+x3+x4+x5, dipper.histories )
dipper.expected <- predict(dipper.cjs)

mra documentation built on May 1, 2019, 6:50 p.m.