getBF: Estimates the bayes factor for continous and categorical...

Description Usage Arguments Details Value Note Examples

Description

This adds pseudo counts to each bin count to give df effective degrees of freedom. Must have all possible factor levels and must be of factor class.

Usage

1
getBF(x, y, weights, breaks = NULL, df = 5)

Arguments

x

predictor vector (continuous or categorical/factors)

y

binary vector indicating linkage (1 = linked, 0 = unlinked) or logical vector (TRUE = linked, FALSE = unlinked)

weights

a vector of observation weights or the column name in data that corresponds to the weights.

breaks

set of break point for continuous predictors or NULL for categorical or discrete

df

the effective degrees of freedom for the cetegorical density estimates

Details

Continous predictors are first binned, then estimates shrunk towards zero.

Value

data.frame containing the levels/categories with estimated Bayes factor

Note

Give linked and unlinked a different prior according to sample size

Examples

1
# See vignette: "Statistical Methods for Crime Series Linkage" for usage.

Example output



crimelinkage documentation built on May 2, 2019, 1:36 a.m.