-
Notifications
You must be signed in to change notification settings - Fork 1
/
modelfunctions.hpp
92 lines (64 loc) · 4.32 KB
/
modelfunctions.hpp
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include <iostream>
using namespace std;
#ifndef MODEL_FUNCTIONS_HPP
#define MODEL_FUNCTIONS_HPP
/*Likelihood ratio on log scale for Binomial model with success probability on logit scale
modelled by monotonic function*/
void Binomial_model(const double &level_proposed, const double &level_current,
const double &baseline, const double &response, const int &number_trials,
const double ¶m, double &result);
/*Likelihood ratio on log scale for Poisson model with rate on log scale modelled by monotonic
function*/
void Poisson_model(const double &level_proposed, const double &level_current,
const double &baseline, const double &response, const int &number_trials,
const double ¶m, double &result);
/*Likelihood ratio on log scale for Gaussian model with mean modelled by monotonic function*/
void Gaussian_model(const double &level_proposed, const double & level_current,
const double &baseline, const double &response, const int &number_trials,
const double &variance, double &result);
/*Likelihood ratio on log scale for Binomial model truncated at 0 with success probability on
logit scale modelled by monotonic function*/
void trBinomial_model(const double &level_proposed, const double &level_current,
const double &baseline, const double &response, const int &number_trials,
const double ¶m, double &result);
/*Likelihood ratio on log scale for Generalized Pareto model with scale on log scale modelled
by monotonic function*/
void GPD_model(const double &level_proposed, const double &level_current,
const double &baseline, const double &response, const int &number_trials,
const double &shape, double &result);
/*Likelihood ratio on log scale for Bernoulli model with succes probability on logit scale modelled
by monotonic function*/
void Bernoulli_model(const double &level_proposed, const double &level_current,
const double &baseline, const double &response,
const int &number_trials, const double ¶m, double &result);
/*Likelihood ratio on log scale for Binomial model with success probability on logit scale
modelled by monotonic function for proposed new baseline*/
void Binomial_model_re(const int &n, const vector<double> &level, const double &baseline_current,
const double &baseline_proposed, const vector<double> &response,
const vector<int> &number_trials, const double ¶m, double &result);
/*Likelihood ratio on log scale for Poisson model with rate on log scale modelled by monotonic
function for proposed new baseline*/
void Poisson_model_re(const int &n, const vector<double> &level, const double &baseline_current,
const double &baseline_proposed, const vector<double> &response,
const vector<int> &number_trials, const double ¶m, double &result);
/*Likelihood ratio on log scale for Gaussian model with mean modelled by monotonic function
for proposed new baseline*/
void Gaussian_model_re(const int &n, const vector<double> &level, const double &baseline_current,
const double &baseline_proposed, const vector<double> &response,
const vector<int> &number_trials, const double &variance, double &result);
/*Likelihood ratio on log scale for Binomial model truncated at 0 with success probability on
logit scale modelled by monotonic function for proposed new baseline*/
void trBinomial_model_re(const int &n, const vector<double> &level, const double &baseline_current,
const double &baseline_proposed, const vector<double> &response,
const vector<int> &number_trials, const double ¶m, double &result);
/*Likelihood ratio on log scale for Generalized Pareto model with scale on log scale modelled
by monotonic function for proposed new baseline*/
void GPD_model_re(const int &n, const vector<double> &level, const double &baseline_current,
const double &baseline_proposed, const vector<double> &response,
const vector<int> &number_trials, const double &shape, double &result);
/*Likelihood ratio on log scale for Bernoulli model with succes probability on logit scale modelled
by monotonic function for proposed new baseline*/
void Bernoulli_model_re(const int &n, const vector<double> &level, const double &baseline_current,
const double &baseline_proposed, const vector<double> &response,
const vector<int> &number_trials, const double ¶m, double &result);
#endif