Learn R Programming

wle (version 0.5)

wle.binomial: Robust Estimation in the Binomial Model

Description

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

Usage

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

Arguments

x
a vector contain the number of success in each size trials.
size
number of trials.
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.

Value

  • wle.binomial returns an object of class "wle.binomial".

    Only print method is implemented for this class.

    The object returned by wle.binomial are:

  • pthe estimator of the proportion parameter, one value for each root found.
  • tot.weightsthe sum of the weights divide by the number of observations, one value for each root found.
  • weightsthe weights associated to each observation, one column vector for each root found.
  • callthe match.call().
  • tot.solthe number of solutions found.
  • not.convthe number of starting points that does not converge after the max.iter iteration are reached.

Examples

Run this code
library(wle)

set.seed(1234)

x_rbinom(20,p=0.2,size=10)
wle.binomial(x,size=10)

x_c(rbinom(20,p=0.2,size=10),rbinom(10,p=0.9,size=10))
wle.binomial(x,size=10)

Run the code above in your browser using DataLab