Learn R Programming

event (version 1.1.1)

pbirth: Fit Overdispersed Count Data as a Birth Process

Description

pbirth fits binomial, binomial exponential, binomial logistic, binomial total, Poisson, Poisson exponential, negative binomial, gen(eralized) negative binomial, and generalized negative binomial processes as a birth process.

Usage

pbirth(frequencies, p, intensity="negative binomial",
	type="spectral decomposition", print.level=0, ndigit=10,
	gradtol=0.00001, steptol=0.00001, fscale=1, iterlim=100,
	typsize=abs(p), stepmax=10*sqrt(p%*%p))

Arguments

frequencies

Vector of frequencies or a matrix with each row a different series of frequencies.

p

Vector of initial estimates.

intensity

The intensity function of the process: binomial, binomial exdponential, binomial logistic, binomial total, Poisson, Poisson exponential, negative binomial, or gen(eralized) negative binomial.

type

Algorithm used for matrix exponentiation: spectral decomposition or series approximation.

print.level

nlm control options.

ndigit

nlm control options.

gradtol

nlm control options.

steptol

nlm control options.

iterlim

nlm control options.

fscale

nlm control options.

typsize

nlm control options.

stepmax

nlm control options.

References

Faddy, M.J. and Fenlon, J.S. (1999) Stochastic modelling of the invasion process of nematodes in fly larvae. Applied Statistics 48: 31-37.

Examples

Run this code
# NOT RUN {
y <- rnbinom(100,2,0.6)
fr <- tabulate(y)
pbirth(fr, p=log(-log(0.7)), intensity="Poisson", type="series")
pbirth(fr, p=c(log(-log(0.7)),log(5)),
	intensity="negative binomial", type="series")
pbirth(fr, p=c(log(-log(0.7)),log(5),-1),
	intensity="gen negative binomial", type="series")
# }

Run the code above in your browser using DataLab