Diff of /src/modules/glm/samplers/KS.h [01a998] .. [081fbe] Maximize Restore

  Switch to unified view

a/src/modules/glm/samplers/KS.h b/src/modules/glm/samplers/KS.h
...
...
2
#define KS_H_
2
#define KS_H_
3
3
4
class RNG;
4
class RNG;
5
5
6
namespace glm {
6
namespace glm {
7
    /**
8
     * Utility function used by the HolmesHeld and AlbertChib sampling
9
     * methods in binary logistic regression models.
10
     *
11
     * A variable "Z" with logistic distribution may be considered as
12
     * a scale mixture of normal distributions with variance lambda,
13
     * where lambda=(2*psi)^2 and "psi" has a Kolmogorov-Smirnov
14
     * distribution. Given Z, this function draws a sample from the
15
     * posterior distribution of lambda.
16
     *
17
     * Although the posterior distribution of lambda given Z cannot
18
     * be expressed in closed form, it can be efficiently sampled using
19
     * a series approximation as described by Devroye (1986) Non-Uniform
20
     * Random Variate Generation, Springer-Verlag, New York. Note that
21
     * this book is currently available for free on line at
22
     * http://luc.devroye.org/rnbookindex.html
23
     *
24
     * @param Z value of a random variable with logistic distribution
25
     *
26
     * @param rng Random number generator used for sampling
27
     */
7
    double sample_lambda(double delta, RNG *rng);
28
    double sample_lambda(double Z, RNG *rng);
8
}
29
}
9
30
10
#endif /* KS_H_ */
31
#endif /* KS_H_ */