Robust Estimation in the Negative Binomial Model

Share:

Description

wle.negativebinomial is used to robust estimate the proportion parameters via Weighted Likelihood.

Usage

1
2
3
wle.negativebinomial(x, size, boot=30, group, num.sol=1,
             raf="HD", tol=10^(-6), equal=10^(-3),
             max.iter=500, verbose=FALSE)

Arguments

x

a vector contain the number of failures which occur in a sequence of Bernoulli trials before a target number of successes size is reached.

size

target number of successes.

boot

the number of starting points based on boostrap subsamples to use in the search of the roots.

group

the dimension of the bootstap subsamples. The default value is max(round(length(x)/4),2).

num.sol

maximum number of roots to be searched.

raf

type of Residual adjustment function to be use:

raf="HD": Hellinger Distance RAF,

raf="NED": Negative Exponential Disparity RAF,

raf="SCHI2": Symmetric Chi-Squared Disparity RAF.

tol

the absolute accuracy to be used to achieve convergence of the algorithm.

equal

the absolute value for which two roots are considered the same. (This parameter must be greater than tol).

max.iter

maximum number of iterations.

verbose

if TRUE warnings are printed.

Value

wle.negativebinomial returns an object of class "wle.negativebinomial".

Only print method is implemented for this class.

The object returned by wle.negativebinomial are:

p

the estimator of the proportion parameter, one value for each root found.

tot.weights

the sum of the weights divide by the number of observations, one value for each root found.

weights

the weights associated to each observation, one column vector for each root found.

f.density

the non-parametric density estimation.

m.density

the smoothed model.

delta

the Pearson residuals.

call

the match.call().

tot.sol

the number of solutions found.

not.conv

the number of starting points that does not converge after the max.iter iteration are reached.

Author(s)

Claudio Agostinelli

References

Markatou, M., Basu, A., and Lindsay, B.G., (1997) Weighted likelihood estimating equations: The discrete case with applications to logistic regression, Journal of Statistical Planning and Inference, 57, 215-232.

Agostinelli, C., (1998) Inferenza statistica robusta basata sulla funzione di verosimiglianza pesata: alcuni sviluppi, Ph.D Thesis, Department of Statistics, University of Padova.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(wle)

set.seed(1234)

x <- rnbinom(20, size=10, prob=0.2)
wle.negativebinomial(x, size=10)

x <- c(rnbinom(20, size=10, prob=0.2),rnbinom(10, size=10, p=0.9))
result <- wle.negativebinomial(x, size=10)
print(result)
plot(result$weights)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.