Skip to contents

Maximises \(g(\theta) + d(C - \theta)\) over \(\theta \in [0, C]\) on a grid; with concave g and d the objective is concave (Research.P8.Budget.concave_sum) and the maximiser is interior as soon as some interior point beats both corners (interior_optimum).

Usage

morie_budget_optimum(g, d, C, grid = 201L)

Arguments

g, d

Rehabilitation and deterrence response functions of the spend.

C

Budget.

grid

Number of grid points.

Value

A list: theta (maximiser), value, interior, corner_values and the grid data frame.

References

D'Orsogna MR, Perc M (2015). Statistical physics of crime: a review. Physics of Life Reviews 12.

Examples

morie_budget_optimum(g = sqrt, d = function(s) 2 * log1p(s), C = 10)
#> $theta
#> [1] 3.5
#> 
#> $value
#> [1] 5.900635
#> 
#> $interior
#> [1] TRUE
#> 
#> $corner_values
#>    stick   carrot 
#> 4.795791 3.162278 
#> 
#> $grid
#>     theta objective
#> 1    0.00  4.795791
#> 2    0.05  5.010286
#> 3    0.10  5.093753
#> 4    0.15  5.155628
#> 5    0.20  5.206306
#> 6    0.25  5.249812
#> 7    0.30  5.288210
#> 8    0.35  5.322728
#> 9    0.40  5.354164
#> 10   0.45  5.383072
#> 11   0.50  5.409857
#> 12   0.55  5.434824
#> 13   0.60  5.458208
#> 14   0.65  5.480199
#> 15   0.70  5.500948
#> 16   0.75  5.520581
#> 17   0.80  5.539203
#> 18   0.85  5.556902
#> 19   0.90  5.573754
#> 20   0.95  5.589825
#> 21   1.00  5.605170
#> 22   1.05  5.619840
#> 23   1.10  5.633878
#> 24   1.15  5.647323
#> 25   1.20  5.660210
#> 26   1.25  5.672569
#> 27   1.30  5.684427
#> 28   1.35  5.695811
#> 29   1.40  5.706742
#> 30   1.45  5.717242
#> 31   1.50  5.727328
#> 32   1.55  5.737019
#> 33   1.60  5.746330
#> 34   1.65  5.755276
#> 35   1.70  5.763869
#> 36   1.75  5.772123
#> 37   1.80  5.780048
#> 38   1.85  5.787655
#> 39   1.90  5.794954
#> 40   1.95  5.801954
#> 41   2.00  5.808663
#> 42   2.05  5.815089
#> 43   2.10  5.821240
#> 44   2.15  5.827123
#> 45   2.20  5.832743
#> 46   2.25  5.838107
#> 47   2.30  5.843221
#> 48   2.35  5.848090
#> 49   2.40  5.852718
#> 50   2.45  5.857110
#> 51   2.50  5.861271
#> 52   2.55  5.865205
#> 53   2.60  5.868915
#> 54   2.65  5.872405
#> 55   2.70  5.875679
#> 56   2.75  5.878739
#> 57   2.80  5.881588
#> 58   2.85  5.884230
#> 59   2.90  5.886667
#> 60   2.95  5.888901
#> 61   3.00  5.890934
#> 62   3.05  5.892769
#> 63   3.10  5.894407
#> 64   3.15  5.895851
#> 65   3.20  5.897102
#> 66   3.25  5.898161
#> 67   3.30  5.899031
#> 68   3.35  5.899712
#> 69   3.40  5.900205
#> 70   3.45  5.900513
#> 71   3.50  5.900635
#> 72   3.55  5.900572
#> 73   3.60  5.900327
#> 74   3.65  5.899898
#> 75   3.70  5.899287
#> 76   3.75  5.898495
#> 77   3.80  5.897521
#> 78   3.85  5.896366
#> 79   3.90  5.895031
#> 80   3.95  5.893516
#> 81   4.00  5.891820
#> 82   4.05  5.889944
#> 83   4.10  5.887888
#> 84   4.15  5.885652
#> 85   4.20  5.883235
#> 86   4.25  5.880638
#> 87   4.30  5.877859
#> 88   4.35  5.874899
#> 89   4.40  5.871757
#> 90   4.45  5.868432
#> 91   4.50  5.864925
#> 92   4.55  5.861233
#> 93   4.60  5.857357
#> 94   4.65  5.853295
#> 95   4.70  5.849048
#> 96   4.75  5.844612
#> 97   4.80  5.839989
#> 98   4.85  5.835176
#> 99   4.90  5.830172
#> 100  4.95  5.824976
#> 101  5.00  5.819587
#> 102  5.05  5.814003
#> 103  5.10  5.808223
#> 104  5.15  5.802244
#> 105  5.20  5.796067
#> 106  5.25  5.789688
#> 107  5.30  5.783105
#> 108  5.35  5.776318
#> 109  5.40  5.769323
#> 110  5.45  5.762119
#> 111  5.50  5.754704
#> 112  5.55  5.747075
#> 113  5.60  5.739230
#> 114  5.65  5.731166
#> 115  5.70  5.722881
#> 116  5.75  5.714372
#> 117  5.80  5.705636
#> 118  5.85  5.696671
#> 119  5.90  5.687473
#> 120  5.95  5.678039
#> 121  6.00  5.668366
#> 122  6.05  5.658450
#> 123  6.10  5.648288
#> 124  6.15  5.637877
#> 125  6.20  5.627212
#> 126  6.25  5.616289
#> 127  6.30  5.605105
#> 128  6.35  5.593655
#> 129  6.40  5.581935
#> 130  6.45  5.569939
#> 131  6.50  5.557665
#> 132  6.55  5.545105
#> 133  6.60  5.532256
#> 134  6.65  5.519111
#> 135  6.70  5.505666
#> 136  6.75  5.491914
#> 137  6.80  5.477850
#> 138  6.85  5.463467
#> 139  6.90  5.448759
#> 140  6.95  5.433719
#> 141  7.00  5.418340
#> 142  7.05  5.402615
#> 143  7.10  5.386536
#> 144  7.15  5.370095
#> 145  7.20  5.353284
#> 146  7.25  5.336094
#> 147  7.30  5.318517
#> 148  7.35  5.300543
#> 149  7.40  5.282162
#> 150  7.45  5.263364
#> 151  7.50  5.244139
#> 152  7.55  5.224475
#> 153  7.60  5.204361
#> 154  7.65  5.183784
#> 155  7.70  5.162732
#> 156  7.75  5.141192
#> 157  7.80  5.119150
#> 158  7.85  5.096590
#> 159  7.90  5.073498
#> 160  7.95  5.049858
#> 161  8.00  5.025652
#> 162  8.05  5.000863
#> 163  8.10  4.975471
#> 164  8.15  4.949458
#> 165  8.20  4.922803
#> 166  8.25  4.895483
#> 167  8.30  4.867476
#> 168  8.35  4.838756
#> 169  8.40  4.809298
#> 170  8.45  4.779075
#> 171  8.50  4.748057
#> 172  8.55  4.716214
#> 173  8.60  4.683513
#> 174  8.65  4.649919
#> 175  8.70  4.615394
#> 176  8.75  4.579900
#> 177  8.80  4.543394
#> 178  8.85  4.505831
#> 179  8.90  4.467161
#> 180  8.95  4.427335
#> 181  9.00  4.386294
#> 182  9.05  4.343981
#> 183  9.10  4.300328
#> 184  9.15  4.255268
#> 185  9.20  4.208724
#> 186  9.25  4.160613
#> 187  9.30  4.110847
#> 188  9.35  4.059328
#> 189  9.40  4.005949
#> 190  9.45  3.950595
#> 191  9.50  3.893137
#> 192  9.55  3.833435
#> 193  9.60  3.771331
#> 194  9.65  3.706654
#> 195  9.70  3.639211
#> 196  9.75  3.568786
#> 197  9.80  3.495138
#> 198  9.85  3.417995
#> 199  9.90  3.337047
#> 200  9.95  3.251942
#> 201 10.00  3.162278
#> 
#> attr(,"theorem")
#> [1] "Research.P8.Budget.interior_optimum"