marginalFreq {singleRcapture} | R Documentation |
Observed and fitted marginal Frequencies
Description
A function that given a fitted singleR
class object
computed marginal frequencies by as sum of probability density functions
for each unit in data at each point i.e. kth element of marginal frequency
table is given by \(\sum_{j=1}^{N_{obs}}\mathbb{P}(Y_{j}=k|\eta_{j})\).
For k=0 only (if specified at call) they are computed as
\(\hat{N}-N_{obs}\) because
\(\boldsymbol{f}_{0}\) is assumed to
the unobserved part of the studied population.
These frequencies are useful in diagnostics for count data regression, such as assessment of fit.
Usage
marginalFreq(
object,
includeones = TRUE,
includezeros = TRUE,
onecount = NULL,
range,
...
)
Arguments
object |
object of |
includeones |
logical value indicating whether to include the estimated number of zero counts. |
includezeros |
logical value indicating whether to include one counts in the zero-one truncated models. |
onecount |
a numeric value indicating number of one counts if null |
range |
optional argument specifying range of selected Y values. |
... |
currently does nothing. |
Value
A list with observed name of the fitted model family degrees of freedom and observed and fitted marginal frequencies.
Author(s)
Piotr Chlebicki
See Also
estimatePopsize()
– where example of usage is provided