bayesian_linear_indep: Bayesian estimator for linear with binary classification as...

Description Usage Arguments Value

View source: R/ccer.r

Description

This functions takes binary classification as independent variables, apply Bayesian estimator, and returned corrected coefficient estimates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
bayesian_linear_indep(
  formula,
  data,
  fn = fn,
  fp = fp,
  tp = tp,
  tn = tn,
  npv = npv,
  ppv = ppv,
  predicted_col_name = "xeb",
  tau_prior = 0.001,
  working_dir = "",
  n.iter = n.iter
)

Arguments

formula

R formula, such as y ~ x

data

a data.frame object

fn

number of false negatives in validation data

fp

number of false positives in validation data

tp

number of true positives in validation data

tn

number of true negatives in validation data

predicted_col_name

string or integer indicating the column of the variable that is predicted

tau_prior

prior values of hyperparameters of Bayesian regression variance

working_dir

directory to store JAGS temporary files

n.iter

number of Bayesian draws

fnr

false negative rate

fpr

false positive rate

Value

a dataframe contining estimated values, standard errors, z values and p values


philohistoria/CCER documentation built on Dec. 22, 2021, 7:50 a.m.