[669123]: src / modules / bugs / distributions / DLogis.h  Maximize  Restore  History

Download this file

36 lines (29 with data), 840 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef DLOGIS_H_
#define DLOGIS_H_
#include <distribution/RScalarDist.h>
namespace jags {
namespace bugs {
/**
* Logistic distribution
* <pre>
* X ~ dlogis(mu, tau)
* P(X <= x | mu, tau) = 1/(1 + exp(-(x - mu) * tau))
* </pre>
*/
class DLogis : public RScalarDist {
public:
DLogis();
double d(double x, PDFType type,
std::vector<double const *> const &parameters, bool give_log) const;
double p(double q, std::vector<double const *> const &parameters, bool lower,
bool give_log) const;
double q(double p, std::vector<double const *> const &parameters, bool lower,
bool log_p) const;
double r(std::vector<double const *> const &parameters, RNG *rng) const;
/**
* Checks that tau > 0
*/
bool checkParameterValue(std::vector<double const *> const &parameters) const;
};
}}
#endif /* DLOGIS_H_ */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks