s-news
[Top] [All Lists]

Re: Negative Binomial Distribution

To: Marc Choisy <Marc.CHOISY@mpl.ird.fr>
Subject: Re: Negative Binomial Distribution
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Thu, 29 Apr 2004 20:00:51 +0100 (BST)
Cc: "'S Plus'" <s-news@lists.biostat.wustl.edu>
In-reply-to: <000801c42e14$2ecfcb10$b76cd6c2@mpl.ird.fr>
library(MASS)
?rnegbin

should help you.  If your version of S-PLUS does not have MASS, it is not 
current and see http://www.stats.ox.ac.uk/pub/MASS4.

On Thu, 29 Apr 2004, Marc Choisy wrote:

> Dear s-plus users,
>  
> I have two questions related to the negative binomial distribution.
> Thanks for help.
>  
> There are two different ways of looking at the negative binomial
> distribution:
> The first considers 2 parameters: the mean and a clumping parameter.
> The second considers 2 parameters too but which are the number of
> successes and the probability of one success.
> It is the second one which is coded in the s-plus function rnbinom.
> First question:
> I don't have a clear picture of the relations between the two
> expressions.
> Can anybody help me in defining the relation between the parameters of
> the two expressions?
> Second question:
> I intend to simulate a negative binomial distribution of specified mean
> and clumping parameter.
> Can anybody give me some clues to do that with s-plus?


-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


<Prev in Thread] Current Thread [Next in Thread>