Learn R Programming

evidence (version 0.8.10)

Analysis of Scientific Evidence Using Bayesian and Likelihood Methods

Description

Bayesian (and some likelihoodist) functions as alternatives to hypothesis-testing functions in R base using a user interface patterned after those of R's hypothesis testing functions. See McElreath (2016, ISBN: 978-1-4822-5344-3), Gelman and Hill (2007, ISBN: 0-521-68689-X) (new edition in preparation) and Albert (2009, ISBN: 978-0-387-71384-7) for good introductions to Bayesian analysis and Pawitan (2002, ISBN: 0-19-850765-8) for the Likelihood approach. The functions in the package also make extensive use of graphical displays for data exploration and model comparison.

Copy Link

Version

Install

install.packages('evidence')

Monthly Downloads

296

Version

0.8.10

License

GPL (>= 2)

Maintainer

Robert Hulst

Last Published

May 15th, 2018

Functions in evidence (0.8.10)

B1Nsir

Bayesian analysis of a Normal sample using a SIR prior.
Aspirin

A contingency table for heart attacks and aspirin use.
B1Nmean

Bayesian analysis of one sample from a Normal distribution with imprecise priors.
Glasses

A contingency table of 16 British youths categorized as juvenile delinquents or not, and as wearing glasses or not.
Fat

Human body fat and several covariates for calculating it.
HSCrab

Morphology of horseshoe crabs.
L1prop

Likelihood analysis of the binomial parameter for one sample.
HPDcrd

generates the 100 * (1 - alpha)% most probable interval of a distribution of empirical values
NPV

computes the Negative Predictive Value.
PPV

calculates the positive predictive value (PPV) of a diagnostic test.
BnNsir

Bayesian analysis of n >= 2 Normal means with standard improper reference priors.
looicplot

A dot plot is produced for several related models showing for each model its LOOIC-value with its credible interval.
meansplot

Plots a simple strip chart of the observations with group means and grand mean.
Bregbf

Bayesian regression model comparison with Bayes factors.
SSQ

A support function that calculates the sum of squares of a data vector.
nineplot

produces a Normality plot for the argument surrounded by eight other Normality plots for Normal distributions having the same mean and standard deviation as the argument
overdispersionCheck

A robust comparison of the location and the scale of the input vector.
B2props

Bayesian analysis of the binomial parameters for two samples.
SRb94

Data of the growth of tissue cultures on five different media.
fev

Data on lung capacity of 654 children and adolescents.
lightspeed

Simon Newcomb's measurements of the speed of light
B1propSim

simulates Bayesian updating of the binomial parameter \(\pi\).
Bft2x2

Bayesian analysis of a 2 x 2 contingency table.
rats

Carcinogenesis data on rats exposed to a carcinogen.
Bt.test

Bayesian t-test using reference priors.
B2Nsir

Bayesian analysis of the means of two Normal samples using SIR priors.
CTA

Contingency Table Analysis in different ways
sigtestCI

Universal Fisherian significance test with confidence interval.
bodytemp

Data on body temperature, heart rate, and gender of 130 human subjects.
weightgain

weight gain in rats
binPriorsPlot

function to plot diverse Beta distributions for use as Binomial priors
BiasVarTO

a simple example of the bias--variance trade-off.
BirdsCS

Simulated clutch size data for birds with different nesting locations.
Smoking

Mortality due to heart infarct in smokers and non-smokers.
Snoring

Data on the incidence of hypertension and three indicator variables.
budworm

Mortality data of moth larvae due to increasing doses of insecticide.
crickets

Made-up data that are not unlike the actual data collected by Nespolo et al.(2003).
sumchart

Plotting routine for dataframes of looic values.
L2prop

Likelihood analysis of the binomial parameters for two samples.
sn2ft2x2

Conversion of 2 props input to 2x2 contingency table
MedDiagn

Computes the posterior probability of having a certain disease from prevalence, sensitivity, and specificity data.
darwin

Charles Darwin's (1876) data on the fecundity of selfed and crossed corn plants.
p2BF

Conversion of a frequentist p-value to the lower bound of the Bayes factor against the null hypothesis assuming equal odds of the null and the alternative
p2minpp

Conversion of a frequentist p-value to a lower bound of the posterior probability that the null hypothesis is true assuming equal odds of the null and the alternative
evidence-package

evidence: Functions and Data for Bayesian and Likelihood Analysis
AOV1

Made-up data for a balanced one-way anova.
AOV2

Made-up data for an unbalanced one-way anova.
Clin

Made-up data to illustrate Simpson's paradox.
B1prop

Bayesian analysis of the binomial parameter for one sample.