Learn R Programming

CountsEPPM (version 3.1)

Faddyprob.general: Calculation of vector of probabilities for a Faddy distribution.

Description

Given a vector of parameters and a scalar of the maximum count the function calculates the vector of lambdas for a Faddy distribution and returns a vector of probabilities.

Usage

Faddyprob.general(parameter, nmax)

Value

Vector of probabilities

Arguments

parameter

A vector of the parameters of the Faddy distribution.

nmax

The value of the maximum count.

Author

David M. Smith <dmccsmith@verizon.net>

References

Faddy M, Smith D. (2011). Analysis of count data with covariate dependence in both mean and variance. Journal of Applied Statistics, 38, 2683-2694. tools:::Rd_expr_doi("10.1002/bimj.201100214").

Examples

Run this code
all.counts=c(rep(0,5),352,479,530,291,101,17)
nmax   <- length(all.counts) - 1
parameter <- c(exp(53.047752),exp(3.801599),-13.205655)
names(parameter) <- c("a","b","c") 
probability <- Faddyprob.general(parameter,nmax) 
print(probability)

Run the code above in your browser using DataLab