Skip to contents

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 _j=1^N_obsP(Y_j=k|_j). For k=0 only (if specified at call) they are computed as N-N_obs because 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 singleR class.

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 trcount from object will be assumed to be a number one counts.

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.

See also

estimatePopsize() – where example of usage is provided

Author

Piotr Chlebicki