powered by
Posterior Predictive Replication p-value Calculation
posterior_prp( beta, se, L = 1000, r_vec = c(0, 8e-04, 0.006, 0.024), test = Q, print_test_dist = FALSE )
A vector, containing the estimates in the original study and the replication study.
A vector, containing the standard errors of the estimates in the original study and the replication study.
A value, determining the times of repeating simulation.
A vector, defining the prior reproducible model. Each r value corresponds to a probability of sign consistency.
A function designed to calculate the test quantity, the default one is the Cochran's Q test statistics.
A boolean, determining whether the simulated test statistics value difference will be plot as a histogram or not. Default is False.
A list with the following components:
Detailed grid values for the hyperparameters.
The test statistics used in calculating the replication p-value.
The L value.
The difference between the simulated test statistics quantity and the original value.
The resulting posterior predictive replicaiton p-value.
# NOT RUN { data("mortality") res = posterior_prp(beta = mortality$beta, se = mortality$se, test=Q) names(res) print(res$pvalue) # }
Run the code above in your browser using DataLab