epinowcast
Loading...
Searching...
No Matches
expected_obs.stan
Go to the documentation of this file.
1
102vector expected_obs(real tar_obs, vector lh, int l, int ref_as_p, int agg_probs, matrix agg_indicator) {
103 vector[l] p;
104 if (ref_as_p == 1) {
105 p = lh;
106 }else{
107 profile("model_likelihood_expected_obs_inv_logit") {
108 p = inv_logit(lh);
109 }
110 profile("model_likelihood_expected_obs_hazard_to_prob") {
111 p = hazard_to_log_prob(p, l);
112 }
113 }
114 if (agg_probs == 1) {
115 p = log(agg_indicator * exp(p));
116 }
117 return(tar_obs + p);
118}
vector expected_obs(real tar_obs, vector lh, int l, int ref_as_p, int agg_probs, matrix agg_indicator)
vector hazard_to_log_prob(vector h, int l)
Definition hazard.stan:78