lines.cjs

Share:

Description

Add a line to an existing CJS capture-recapture plot showing either N or survival estimates.

Usage

1
2
3
 
## S3 method for class 'cjs'
lines( x, what="n", animals=-1, occasions=-1, ... )

Arguments

x

CJS object from F.cr.estim

what

Indicator for what to plot. what = "n" plots estimates of size (i.e,. \$n.hat). what = "s" plots estimates of survival.

animals

Index of animals to plot. This is the row number for animals to include. E.g., if animals = c(1,4,10), the 1st, 4th, and 10th animals represented in the 1st, 4th, and 10th rows of the capture history matrix are plotted. Applies to survival estimates only.

occasions

Sampling occasions to plot. This must match the occasions argument to the last plot.cjs. If the first element of occasions is <= 0, all occasions are plotted. Otherwise, only occasions listed in occasions are plotted.

...

Additional arguments to lines (for N estimates) or matlines (for survival estimates). Arguments like col= and lty= may prove useful.

Details

This is a utility function for plotting. Lines are added to the current plot. A current plot must be displayed.

Value

Nothing. A value of 1 is invisibly returned.

Author(s)

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

See Also

plot.cjs, lines, matlines

Examples

1
2
3
4
5
6
7
8
9
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]) } 

# Fit constant capture probability, period (i.e., flood) effects on survival
dipper.cjs <- F.cjs.estim( ~1, ~x2+x3, dipper.histories )  

plot(dipper.cjs, type="s", animals=1)
lines(dipper.cjs, what="s", animals=c(4, 10))