prior_prp {PRP}R Documentation

Prior Predictive Replication p-value Calculation

Description

Assessing the prior predictive distribution and calculating the replication p-value based on it.

Usage

prior_prp(
  beta,
  se,
  r_vec = c(0, 8e-04, 0.006, 0.024),
  test = "two_sided",
  report_PI = FALSE
)

Arguments

beta

A 2-D vector, containing the estimates in the original study and the replication study.

se

A 2-D vector, containing the standard errors of the estimates in the original study and the replication study.

r_vec

A vector, defining the prior reproducible model. Each r value corresponds to a probability of sign consistency.

test

A string, determining which test statistics to utilize. If not specified, the default two-sided one will be used.

report_PI

A boolean, denoting whether the 95% predictive interval for the estimates be reported or not. This option is only valid for two-sided test statistics. The default is FALSE.

Value

A list with the following components:

grid

The detailed grid values for the hyperparameters.

test_statistics

The test statistics used in calculating the replication p-value.

pvalue

The resulting prior predictive replicaiton p-value.

predictive_interval

The 95% predictive interval if required.

Examples

data("RPP_filtered")
attach(RPP_filtered)
rpp_pval<-sapply(1:nrow(RPP_filtered),function(x)
  prior_prp(beta=c(beta_orig[x], beta_rep[x]),se=c(se_orig[x],  se_rep[x]))$pvalue)


[Package PRP version 0.1.1 Index]