Skip to content

Commit

Permalink
Agregar sims de coeficientes
Browse files Browse the repository at this point in the history
  • Loading branch information
felipegonzalez committed Apr 23, 2024
1 parent bd43e30 commit 0c0f1f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion notas/src/bangladesh-3.stan
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ generated quantities {
prob_distrito_urbano[i] = inv_logit(alpha[i] + beta[i]);
prob_distrito_rural[i] = inv_logit(alpha[i]);
}

// Simular de a priori poblacional
vector[2] beta_sim;
beta_sim[1] = normal_rng(alpha_bar, sigma_alpha);
beta_sim[2] = normal_rng(beta_bar, sigma_beta);
}
3 changes: 3 additions & 0 deletions notas/src/bangladesh-4.stan
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,7 @@ generated quantities {
prob_distrito_urbano[i] = inv_logit(beta[i][1] + beta[i][2]);
prob_distrito_rural[i] = inv_logit(beta[i][1]);
}
// Simular de a priori poblacional
vector[2] beta_sim;
beta_sim = multi_normal_rng(beta_bar, Sigma);
}
5 changes: 5 additions & 0 deletions notas/src/bangladesh-5.stan
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ generated quantities {
prob_distrito_urbano[i] = inv_logit(beta[1,i] + beta[2,i]);
prob_distrito_rural[i] = inv_logit(beta[1,i]);
}

// Simular de a priori poblacional
vector[2] beta_sim;
beta_sim = multi_normal_rng(beta_bar, Sigma);

}

0 comments on commit 0c0f1f5

Please sign in to comment.