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

Density, and random generation for multiple Bernoulli responses where each row in the response matrix has at least one success.

1 2 3 4 |

`x` |
response vector or matrix. Should only have 0 and 1 values, at least two columns, and each row should have at least one 1. |

`nTimePts` |
Number of sampling occasions.
Called |

`n` |
number of observations.
Usually a single positive integer, else the length of the vector is used.
See argument |

`is.popn` |
Logical.
If |

`Xmatrix` |
Optional |

`cap.effect` |
Numeric, the capture effect. Added to the linear predictor if captured previously. A positive or negative value corresponds to a trap-happy and trap-shy effect respectively. |

`pvars` |
Number of other numeric covariates that make up
the linear predictor.
Labelled |

`xcoeff` |
The regression coefficients of the linear predictor.
These correspond to |

`link, earg.link` |
The former is used to generate the probabilities for capture
at each occasion.
Other details at |

`prob, prob0` |
Matrix of probabilities for the numerator and denominators
respectively.
The default does |

`log` |
Logical. Return the logarithm of the answer? |

The form of the conditional likelihood is described in
`posbernoulli.b`

and/or
`posbernoulli.t`

and/or
`posbernoulli.tb`

.
The denominator is equally shared among the elements of
the matrix `x`

.

`rposbern`

returns a data frame with some attributes.
The function generates random deviates
(*τ* columns labelled `y1`

, `y2`

, ...)
for the response.
Some indicator columns are also included
(those starting with `ch`

are for previous capture history).
The default setting corresponds to a *M_{bh}* model that
has a single trap-happy effect.
Covariates `x1`

, `x2`

, ... have the same
affect on capture/recapture at every sampling occasion
(see the argument `parallel.t`

in, e.g.,
`posbernoulli.tb`

).

The function `dposbern`

gives the density,

The `r`

-type function is experimental only and does not follow the
usual conventions of `r`

-type R functions.
It may change a lot in the future.
The `d`

-type function is more conventional and is less
likely to change.

Thomas W. Yee.

`posbernoulli.tb`

,
`posbernoulli.b`

,
`posbernoulli.t`

.

1 2 3 4 5 6 | ```
rposbern(n = 10)
attributes(pdata <- rposbern(n = 100))
M.bh <- vglm(cbind(y1, y2, y3, y4, y5) ~ x2 + x3, posbernoulli.b(I2 = FALSE),
data = pdata, trace = TRUE)
constraints(M.bh)
summary(M.bh)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.