Learn R Programming

mra (version 2.16.4)

predict.cjs: predict.cjs

Description

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

Usage

"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 compatability with the generic predict function.

Value

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.

Details

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

See Also

F.cjs.estim, F.cjs.gof

Examples

Run this code

# 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)

Run the code above in your browser using DataLab