[081fbe]: src / modules / glm / samplers / IWLSFactory.h  Maximize  Restore  History

Download this file

54 lines (48 with data), 1.6 kB

 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef IWLS_FACTORY_H_
#define IWLS_FACTORY_H_
#include "GLMFactory.h"
namespace glm {
/**
* @short Factory object for iteratively weighted least squares
*/
class IWLSFactory : public GLMFactory
{
public:
IWLSFactory();
/**
* Checks that the outcome variable is a normal, binomial, or
* Poisson variable. For normal outcomes, checks that the link
* is identity.
*
* The IWLS method is potentially open to other distributional
* families, but in the BUGS language, these are not
* parameterized in terms of their mean and precision.
*/
bool checkOutcome(StochasticNode const *snode,
LinkNode const *lnode) const;
/**
* Returns a newly allocated object of class IWLS
*/
GLMMethod *newMethod(GraphView const *view,
std::vector<GraphView const *> const &sub_views,
unsigned int chain) const;
/**
* Returns false if any parents of the candidate node are
* unobserved. The IWLS method relies on an asymptotic
* approximation which holds only for fixed effects models.
* In order to exclude random effects, we reject candidate
* nodes that have unobserved parents.
*/
bool canSample(StochasticNode const *snode) const;
/**
* Returns true. The IWLS method relies on an asymptotic
* approximation that holds only for fixed effects models. In
* order to exclude random effects, we require the design
* matrix to be fixed. This is because it is possible to
* reparameterize a random effect as a fixed effect with a
* varying coefficient.
*/
bool fixedDesign() const;
};
}
#endif /* IWLS_FACTORY_H_ */

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

Sign up for the SourceForge newsletter:





No, thanks