prinia.RdA data frame with yellow-bellied Prinia.
data(prinia)A data frame with 151 observations on the following 23 variables.
a numeric vector, the scaled wing length (zero mean and unit variance).
a numeric vector, fat index; originally 1 (no fat) to 4 (very fat) but converted to 0 (no fat) versus 1 otherwise.
a numeric vector, number of times the bird was captured or recaptured.
a numeric vector, number of times the bird was not captured.
a numeric vector of 0s and 1s; for noncapture and capture resp.
same as above.
same as above.
The yellow-bellied Prinia Prinia flaviventris is a common bird species located in Southeast Asia. A capture–recapture experiment was conducted at the Mai Po Nature Reserve in Hong Kong during 1991, where captured individuals had their wing lengths measured and fat index recorded. A total of 19 weekly capture occasions were considered, where 151 distinct birds were captured.
More generally, the prinias are a genus of small insectivorous birds, and are sometimes referred to as wren-warblers. They are a little-known group of the tropical and subtropical Old World, the roughly 30 species being divided fairly equally between Africa and Asia.
Thanks to Paul Yip for permission to make this data available.
Hwang, W.-H. and Huggins, R. M. (2007) Application of semiparametric regression models in the analysis of capture–recapture experiments. Australian and New Zealand Journal of Statistics 49, 191–202.
head(prinia)
#> length fat cap noncap y01 y02 y03 y04 y05 y06 y07 y08 y09 y10 y11 y12
#> 1 1.00650390 1 5 14 0 0 0 0 0 0 0 0 1 1 1 1
#> 2 1.26462566 1 3 16 0 0 0 0 0 0 0 0 1 0 1 1
#> 3 -0.02598312 1 6 13 0 0 0 0 0 0 1 0 1 0 0 0
#> 4 3.07147795 0 1 18 0 0 0 0 0 0 0 0 1 0 0 0
#> 5 0.43863604 1 5 14 0 1 0 0 0 0 0 0 0 0 1 1
#> 6 0.74838215 0 1 18 0 0 0 0 0 0 0 0 0 0 0 0
#> y13 y14 y15 y16 y17 y18 y19
#> 1 1 0 0 0 0 0 0
#> 2 0 0 0 0 0 0 0
#> 3 0 1 0 0 1 1 1
#> 4 0 0 0 0 0 0 0
#> 5 0 1 0 0 1 0 0
#> 6 0 0 1 0 0 0 0
summary(prinia)
#> length fat cap noncap
#> Min. :-2.34908 Min. :0.0000 Min. :1.000 Min. :13.00
#> 1st Qu.:-0.80035 1st Qu.:0.0000 1st Qu.:1.000 1st Qu.:18.00
#> Median :-0.02598 Median :1.0000 Median :1.000 Median :18.00
#> Mean : 0.00000 Mean :0.5762 Mean :1.477 Mean :17.52
#> 3rd Qu.: 0.74838 3rd Qu.:1.0000 3rd Qu.:1.000 3rd Qu.:18.00
#> Max. : 3.07148 Max. :1.0000 Max. :6.000 Max. :18.00
#> y01 y02 y03 y04
#> Min. :0.000000 Min. :0.0000 Min. :0.00000 Min. :0.00000
#> 1st Qu.:0.000000 1st Qu.:0.0000 1st Qu.:0.00000 1st Qu.:0.00000
#> Median :0.000000 Median :0.0000 Median :0.00000 Median :0.00000
#> Mean :0.006622 Mean :0.1325 Mean :0.02649 Mean :0.01324
#> 3rd Qu.:0.000000 3rd Qu.:0.0000 3rd Qu.:0.00000 3rd Qu.:0.00000
#> Max. :1.000000 Max. :1.0000 Max. :1.00000 Max. :1.00000
#> y05 y06 y07 y08
#> Min. :0.00000 Min. :0.0000 Min. :0.0000 Min. :0.00000
#> 1st Qu.:0.00000 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.00000
#> Median :0.00000 Median :0.0000 Median :0.0000 Median :0.00000
#> Mean :0.04636 Mean :0.0596 Mean :0.1854 Mean :0.06623
#> 3rd Qu.:0.00000 3rd Qu.:0.0000 3rd Qu.:0.0000 3rd Qu.:0.00000
#> Max. :1.00000 Max. :1.0000 Max. :1.0000 Max. :1.00000
#> y09 y10 y11 y12
#> Min. :0.00000 Min. :0.0000 Min. :0.000 Min. :0.000
#> 1st Qu.:0.00000 1st Qu.:0.0000 1st Qu.:0.000 1st Qu.:0.000
#> Median :0.00000 Median :0.0000 Median :0.000 Median :0.000
#> Mean :0.09272 Mean :0.1457 Mean :0.106 Mean :0.106
#> 3rd Qu.:0.00000 3rd Qu.:0.0000 3rd Qu.:0.000 3rd Qu.:0.000
#> Max. :1.00000 Max. :1.0000 Max. :1.000 Max. :1.000
#> y13 y14 y15 y16
#> Min. :0.00000 Min. :0.0000 Min. :0.0000 Min. :0.00000
#> 1st Qu.:0.00000 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.00000
#> Median :0.00000 Median :0.0000 Median :0.0000 Median :0.00000
#> Mean :0.09272 Mean :0.0596 Mean :0.1722 Mean :0.03311
#> 3rd Qu.:0.00000 3rd Qu.:0.0000 3rd Qu.:0.0000 3rd Qu.:0.00000
#> Max. :1.00000 Max. :1.0000 Max. :1.0000 Max. :1.00000
#> y17 y18 y19
#> Min. :0.00000 Min. :0.00000 Min. :0.00000
#> 1st Qu.:0.00000 1st Qu.:0.00000 1st Qu.:0.00000
#> Median :0.00000 Median :0.00000 Median :0.00000
#> Mean :0.03974 Mean :0.03974 Mean :0.05298
#> 3rd Qu.:0.00000 3rd Qu.:0.00000 3rd Qu.:0.00000
#> Max. :1.00000 Max. :1.00000 Max. :1.00000
rowSums(prinia[, c("cap", "noncap")]) # 19s
#> [1] 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
#> [26] 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
#> [51] 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
#> [76] 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
#> [101] 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
#> [126] 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19
#> [151] 19
# Fit a positive-binomial distribution (M.h) to the data:
fit1 <- vglm(cbind(cap, noncap) ~ length + fat, posbinomial, prinia)
# Fit another positive-binomial distribution (M.h) to the data:
# The response input is suitable for posbernoulli.*-type functions.
fit2 <- vglm(cbind(y01, y02, y03, y04, y05, y06, y07, y08, y09, y10,
y11, y12, y13, y14, y15, y16, y17, y18, y19) ~
length + fat, posbernoulli.b(drop.b = FALSE ~ 0), prinia)