Learn R Programming

NAP (version 1.1)

Non-Local Alternative Priors in Psychology

Description

Conducts Bayesian Hypothesis tests of a point null hypothesis against a two-sided alternative using Non-local Alternative Prior (NAP) for one- and two-sample z- and t-tests (Pramanik and Johnson, 2022). Under the alternative, the NAP is assumed on the standardized effects size in one-sample tests and on their differences in two-sample tests. The package considers two types of NAP densities: (1) the normal moment prior, and (2) the composite alternative. In fixed design tests, the functions calculate the Bayes factors and the expected weight of evidence for varied effect size and sample size. The package also provides a sequential testing framework using the Sequential Bayes Factor (SBF) design. The functions calculate the operating characteristics (OC) and the average sample number (ASN), and also conducts sequential tests for a sequentially observed data.

Copy Link

Version

Install

install.packages('NAP')

Version

1.1

License

GPL (>= 2)

Last Published

January 6th, 2022

Functions in NAP (1.1)

HajnalBF_twot

Hajnal's ratio in two-sample \(t\) tests
NAP-package

NAP
SBFHajnal_onet

Sequential Bayes Factor using the Hajnal's ratio for one-sample \(t\)-tests
HajnalBF_onet

Hajnal's ratio in one-sample \(t\) tests
HajnalBF_twoz

Hajnal's ratio in two-sample \(z\) tests
NAPBF_onez

Bayes factor in favor of the NAP in one-sample \(z\) tests
NAPBF_onet

Bayes factor in favor of the NAP in one-sample \(t\) tests
NAPBF_twoz

Bayes factor in favor of the NAP in two-sample \(z\) tests
HajnalBF_onez

Hajnal's ratio in one-sample \(z\) tests
NAPBF_twot

Bayes factor in favor of the NAP in two-sample \(t\) tests
SBFHajnal_onez

Sequential Bayes Factor using the Hajnal's ratio for one-sample \(z\)-tests
SBFNAP_onet

Sequential Bayes Factor using the NAP for one-sample \(t\)-tests
SBFHajnal_twoz

Sequential Bayes Factor using the Hajnal's ratio for two-sample \(z\)-tests
SBFNAP_twoz

Sequential Bayes Factor using the NAP for two-sample \(z\)-tests
fixedHajnal.onet_es

Fixed-design one-sample \(t\)-tests using Hajnal's ratio for varied sample sizes
SBFNAP_twot

Sequential Bayes Factor using the NAP for two-sample \(t\)-tests
SBFNAP_onez

Sequential Bayes Factor using the NAP for one-sample \(z\)-tests
fixedNAP.onet_n

Fixed-design one-sample \(t\)-tests with NAP and a pre-fixed sample size
fixedHajnal.onet_n

Fixed-design one-sample \(t\)-tests using Hajnal's ratio and a pre-fixed sample size
fixedNAP.onez_es

Fixed-design one-sample \(z\)-tests with NAP for varied sample sizes
fixedHajnal.onez_es

Fixed-design one-sample \(z\)-tests using Hajnal's ratio for varied sample sizes
fixedHajnal.twoz_n

Fixed-design two-sample \(z\)-tests using Hajnal's ratio and a pre-fixed sample size
fixedNAP.onet_es

Fixed-design one-sample \(t\)-tests with NAP for varied sample sizes
SBFHajnal_twot

Sequential Bayes Factor using the Hajnal's ratio for two-sample \(t\)-tests
fixedNAP.twot_es

Fixed-design two-sample \(t\)-tests with NAP for varied sample sizes
fixedNAP.onez_n

Fixed-design one-sample \(z\)-tests with NAP and a pre-fixed sample size
implement.SBFHajnal_onez

Implement Sequential Bayes Factor using the Hajnal's ratio for one-sample \(z\)-tests
implement.SBFHajnal_twot

Implement Sequential Bayes Factor using the NAP for two-sample \(t\)-tests
implement.SBFHajnal_onet

Implement Sequential Bayes Factor using the Hajnal's ratio for one-sample \(t\)-tests
fixedNAP.twoz_n

Fixed-design two-sample \(z\)-tests with NAP and a pre-fixed sample size
fixedHajnal.onez_n

Fixed-design one-sample \(z\)-tests using Hajnal's ratio and a pre-fixed sample size
implement.SBFHajnal_twoz

Implement Sequential Bayes Factor using the NAP for two-sample \(z\)-tests
fixedHajnal.twot_es

Fixed-design two-sample \(t\)-tests with NAP for varied sample sizes
fixedNAP.twot_n

Fixed-design two-sample \(t\)-tests with NAP and a pre-fixed sample size
fixedNAP.twoz_es

Fixed-design two-sample \(z\)-tests with NAP for varied sample sizes
fixedHajnal.twot_n

Fixed-design two-sample \(t\)-tests using Hajnal's ratio and a pre-fixed sample size
mycombine.seq.twosample

Helper function
mycombine.seq.onesample

Helper function
implement.SBFNAP_onez

Implement Sequential Bayes Factor using the NAP for one-sample \(z\)-tests
fixedHajnal.twoz_es

Fixed-design two-sample \(z\)-tests with NAP for varied sample sizes
implement.SBFNAP_twoz

Implement Sequential Bayes Factor using the NAP for two-sample \(z\)-tests
implement.SBFNAP_onet

Implement Sequential Bayes Factor using the NAP for one-sample \(t\)-tests
mycombine.fixed

Helper function
implement.SBFNAP_twot

Implement Sequential Bayes Factor using the NAP for two-sample \(t\)-tests