Revision 1110 trunk/src/df1b2-separable/df1b2negb.cpp

df1b2negb.cpp (revision 1110)
2 2
 * $Id$
3 3
 *
4 4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California 
5
 * Copyright (c) 2008-2012 Regents of the University of California
6 6
 */
7 7
/**
8 8
 * \file
......
11 11
#define HOME_VERSION
12 12
#include "df1b2fun.h"
13 13

  
14
/*/** Log negative bionomial density; random effects objects. 
14
/*/** Log negative bionomial density; random effects objects.
15 15
 A local parameter r is used to make it robust.
16 16
 \f$ r=\frac{\mu}{\tau-1.0} \f$
17 17
 \ingroup PDF
......
21 21
 \return Log of NegativeBinomial density. \f$ log(\Gamma(x+r))-log(\Gamma(r))-log(x!)+rlog(r)+xlog(\mu)-(r+x)log(r+\mu) \f$
22 22
 */
23 23
/*
24
  df1b2variable log_negbinomial_density(double x,const df1b2variable& mu, 
24
  df1b2variable log_negbinomial_density(double x,const df1b2variable& mu,
25 25
    const df1b2variable& tau)
26 26
  {
27 27
    if (value(tau)<=1.0)
......
46 46
 \param mu
47 47
 \param tau
48 48
 \return NegativeBinomial density. \f$ \frac{\Gamma(x+r)}{\Gamma(r)x!}(\frac{r}{r+\mu})^r(\frac{\mu}{r+\mu})^x \f$
49
 */ 
50
df1b2variable negbinomial_density(double x,const df1b2variable& mu, 
49
 */
50
df1b2variable negbinomial_density(double x,const df1b2variable& mu,
51 51
    const df1b2variable& tau)
52 52
  {
53 53
    if (value(tau)-1<0.0)

Also available in: Unified diff