21 arma::Col<T> nuisance;
23 arma::Col<T> propensity;
25 arma::Col<T> _response;
26 arma::Mat<T> _exposure;
30 arma::Col<T> _weights;
40 Target(
const arma::Col<T> &y,
const arma::Mat<T> &a,
41 const arma::Mat<T> &x1,
const arma::Mat<T> &x2,
const arma::Mat<T> &x3,
42 const arma::Col<T> ¶meter,
43 const arma::Col<T> &weights);
45 Target(
const arma::Col<T> &y,
const arma::Mat<T> &a,
46 const arma::Mat<T> &x1,
const arma::Mat<T> &x2,
47 const arma::Col<T> ¶meter,
48 const arma::Col<T> &weights);
50 Target(
const arma::Col<T> &y,
const arma::Mat<T> &a,
51 const arma::Mat<T> &x1,
const arma::Mat<T> &x2,
const arma::Mat<T> &x3,
52 const arma::Col<T> ¶meter);
54 Target(
const arma::Col<T> &y,
const arma::Mat<T> &a,
55 const arma::Mat<T> &x1,
const arma::Mat<T> &x2,
56 const arma::Col<T> ¶meter);
60 void weights(
const arma::Col<T> &weights) { _weights = weights; }
61 arma::Col<T> weights() {
return (_weights); }
62 arma::Col<T> A() {
return (_exposure); }
63 arma::Col<T> Y() {
return (_response); }
64 arma::Mat<T> X1() {
return _x1; }
65 arma::Mat<T> X2() {
return _x2; }
66 arma::Mat<T> X3() {
return _x3; }
67 void update_data(
const arma::Col<T> &y,
68 const arma::Mat<T> &a,
69 const arma::Mat<T> &x1,
70 const arma::Mat<T> &x2,
71 const arma::Mat<T> &x3) {
78 virtual void calculate(
bool target =
true,
80 bool propensity =
false);
81 void update_par(
const arma::Col<T> ¶meter);
90 virtual arma::Col<T> H() = 0;
91 virtual arma::Mat<T> dp() = 0;
94 virtual arma::Mat<T> pa();
95 virtual arma::Mat<T> p(
bool exposure = 0) {
return pr.col(exposure); }
96 virtual arma::Col<T> loglik(
bool indiv =
false);
97 virtual arma::Mat<T> score(
bool indiv =
false);
98 virtual arma::Mat<T> est(arma::Col<T> alpha,
99 const arma::Col<T> &propensity);
100 virtual arma::Mat<T> est(arma::Col<T> alpha);
101 void calculate(
bool target =
true,
102 bool nuisance =
true,
103 bool propensity =
false)
override;
112 arma::Mat<T> dp()
override;
115 RD(
const arma::Col<T> &y,
const arma::Mat<T> &a,
116 const arma::Mat<T> &x1,
const arma::Mat<T> &x2,
const arma::Mat<T> &x3,
117 const arma::Col<T> ¶meter,
118 const arma::Col<T> &weights);
122 void calculate(
bool target =
true,
123 bool nuisance =
true,
124 bool propensity =
false)
override;
130 arma::Col<T> H()
override {
133 arma::Mat<T> dp()
override;
137 RR(
const arma::Col<T> &y,
const arma::Mat<T> &x,
138 const arma::Mat<T> &z1,
const arma::Mat<T> &z2,
const arma::Mat<T> &z3,
139 const arma::Col<T> ¶meter,
140 const arma::Col<T> &weights);
144 void calculate(
bool target =
true,
145 bool nuisance =
true,
146 bool propensity =
false)
override;
157 ACE(
const arma::cx_vec &y,
158 const arma::cx_mat &a,
159 const arma::cx_mat &x2,
160 const arma::cx_mat &x3,
161 const arma::cx_vec ¶meter,
162 const arma::cx_vec &weights,
164 ACE(
const arma::vec &y,
168 const arma::vec ¶meter,
169 const arma::vec &weights,
172 void calculate(
bool target =
true,
173 bool nuisance =
true,
174 bool propensity =
true)
override;
178 arma::cx_mat est(arma::cx_vec par,
180 const cx_dbl &value = 1);
181 arma::cx_mat est(
bool indiv =
false,
182 const cx_dbl &value = 1);
183 arma::mat deriv(
const cx_dbl &value = 1);
190 arma::Mat<T>
rd2prob(
const arma::Col<T> &rd,
const arma::Col<T> &op);
193 arma::Mat<T>
rr2prob(
const arma::Col<T> &rd,
const arma::Col<T> &op);
void update_par(const arma::Col< T > ¶meter)
update_par -
arma::Mat< T > rr2prob(const arma::Col< T > &rd, const arma::Col< T > &op)
rr2prob - Computes risk probabilities given exposure 0 or 1.
arma::Mat< T > rd2prob(const arma::Col< T > &rd, const arma::Col< T > &op)
rd2prob - Computes risk probabilities given exposure 0 or 1.
Utility functions for Generalized Linear Models.