
posbernoulli.t(link = "logit", parallel.t = FALSE ~ 1, iprob = NULL,
p.small = 1e-4, no.warning = FALSE)
CommonVGAMffArguments
for information.
By default, the parallelism assumption does not apply to the intercept.
Setting parallel.t = FALSE ~ -1
,
or equivalently par
p.small
will
result in a warning, however, setting no.warning = TRUE
will suppress this warni"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.
Upon fitting the extra
slot has a (list) component
called N.hat
which is a point estimate of the population size $N$
(it is the Horvitz-Thompson (1952) estimator).
And there is a component called SE.N.hat
containing its standard error.
The number of linear/additive predictors is equal to the number of sampling occasions, i.e., $M = \tau$, say. The default link functions are $(logit \,p_{1},\ldots,logit \,p_{\tau})^T$ where each $p_{j}$ denotes the probability of capture at time point $j$. The fitted value returned is a matrix of probabilities of the same dimension as the response matrix.
A conditional likelihood is maximized here using Fisher scoring.
Each sampling occasion has a separate probability that
is modelled here. The probabilities can be constrained
to be equal by setting parallel.t = FALSE ~ 0
;
then the results are effectively the same as
posbinomial
except the binomial constants are
not included in the log-likelihood.
If parallel.t = TRUE ~ 0
then each column should have
at least one 1 and at least one 0.
It is well-known that some species of animals are affected
by capture, e.g., trap-shy or trap-happy. This posbernoulli.b
and posbernoulli.tb
do) because the
denominator of the likelihood function must be free of
behavioral effects.
Huggins, R. M. and Hwang, W.-H. (2011) A review of the use of conditional likelihood in capture--recapture experiments. International Statistical Review, 79, 385--400.
Otis, D. L. and Burnham, K. P. and White, G. C. and Anderson, D. R. (1978) Statistical inference from capture data on closed animal populations, Wildlife Monographs, 62, 3--135.
posbernoulli.b
,
posbernoulli.tb
,
Select
,
deermice
,
Huggins89table1
,
Huggins89.t1
,
dposbern
,
rposbern
,
posbinomial
,
AICvlm
,
BICvlm
,
prinia
.M.t <- vglm(cbind(y1, y2, y3, y4, y5, y6) ~ 1, posbernoulli.t,
data = deermice, trace = TRUE)
coef(M.t, matrix = TRUE)
constraints(M.t, matrix = TRUE)
summary(M.t, presid = FALSE)
M.h.1 <- vglm(Select(deermice, "y") ~ sex + weight, trace = TRUE,
posbernoulli.t(parallel.t = FALSE ~ -1), data = deermice)
coef(M.h.1, matrix = TRUE)
constraints(M.h.1)
summary(M.h.1, presid = FALSE)
head(depvar(M.h.1)) # Response capture history matrix
dim(depvar(M.h.1))
M.th.2 <- vglm(cbind(y1, y2, y3, y4, y5, y6) ~ sex + weight, trace = TRUE,
posbernoulli.t(parallel.t = FALSE), data = deermice)
lrtest(M.h.1, M.th.2) # Test the parallelism assumption wrt sex and weight
coef(M.th.2)
coef(M.th.2, matrix = TRUE)
constraints(M.th.2)
summary(M.th.2, presid = FALSE)
head(model.matrix(M.th.2, type = "vlm"), 21)
M.th.2@extra$N.hat # Estimate of the population size; should be about N
M.th.2@extra$SE.N.hat # SE of the estimate of the population size
# An approximate 95 percent confidence interval:
round(M.th.2@extra$N.hat + c(-1, 1) * 1.96 * M.th.2@extra$SE.N.hat, 1)
# Fit a M_h model, effectively the parallel M_t model, using posbinomial()
deermice <- transform(deermice, ysum = y1 + y2 + y3 + y4 + y5 + y6,
tau = 6)
M.h.3 <- vglm(cbind(ysum, tau - ysum) ~ sex + weight,
posbinomial(omit.constant = TRUE), data = deermice, trace = TRUE)
max(abs(coef(M.h.1) - coef(M.h.3))) # Should be zero
logLik(M.h.3) - logLik(M.h.1) # Difference is due to the binomial constants
Run the code above in your browser using DataLab