Skip to contents

The expected cost of an offence under certainty \(p\), severity \(s\) and delay \(c\) with discount rate \(\rho\) is \(p s e^{-\rho c}\), whose logarithm is \(\log p + \log s - \rho c\) (Research.P8.Instrument.logcost_linear). A response linear in the log design \((\log p, \log s, c)\) is this model with a common elasticity, and the ratio of the celerity to the certainty coefficient identifies \(-\rho\) (ratio_is_discount). Identification of the three coefficients is the rank condition of morie_deterrence_design_check on the transformed design.

Usage

morie_deterrence_logcost(p, s, c, y = NULL, rho = NULL)

Arguments

p, s, c

Certainty (in (0, 1]), severity (positive) and delay of the sanction, one observation each.

y

Optional response; when given the log-design least-squares fit is returned.

rho

Optional discount rate at which the expected cost is evaluated.

Value

A list with the log design check (identified, rank), and, with y, coefficients and implied_discount; with rho, expected_cost and log_expected_cost.

Examples

set.seed(2)
p <- runif(40, 0.1, 0.9); s <- runif(40, 1, 10); c <- runif(40, 0, 12)
y <- 2 - 0.8 * log(p) - 0.8 * log(s) + 0.8 * 0.1 * c + rnorm(40, sd = 0.1)
morie_deterrence_logcost(p, s, c, y)$implied_discount
#> [1] 0.09283505