Learn R Programming

crimelinkage (version 0.0.3)

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

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

getBF(X, var, breaks = NULL, df = 5)

Arguments

X
data.frame of predictors, can include continuous and categorical/factors along with X$type (linked or unlinked) and X$weight
var
the names or column number of one specific predictor
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

Value

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

Details

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

Examples

Run this code
# See vignette: "Statistical Methods for Crime Series Linkage" for usage.

Run the code above in your browser using DataLab