Skip to contents

Generate the cutoffs at every change of density in the fever, but first category is for density 0, and last category if possible have no subjects with no fever.

Usage

make_cutoffs(v.fever, v.density, add1 = TRUE)

Arguments

v.fever

numeric vector of 0/1 indicating fever or equivalent

v.density

numeric vector of values >= 0 indicating the density

add1

a logical value to indicate the category started with 1 is included

Value

a vector with the cutoff points

Examples

{
 make_cutoffs(malaria_df1$fever, malaria_df1$density, add1 = TRUE)
}
#>   [1]      0      1     11     31     35     43     44     50     73     84
#>  [11]     90    125    126    135    166    168    176    198    199    215
#>  [21]    223    229    244    276    297    356    357    635    643    648
#>  [31]    654    682    686    728    733    734    735    759    772    823
#>  [41]    928   1018   1188   1193   1294   1302   1307   1343   1360   1417
#>  [51]   1424   1587   1590   1649   1664   1786   1802   2128   2135   2337
#>  [61]   2352   2361   2525   2551   2568   2661   2846   2934   2969   2992
#>  [71]   3139   3237   3240   3252   3281   3418   3446   3458   3745   3747
#>  [81]   3869   3985   4089   4120   4168   4182   4347   4352   4362   4398
#>  [91]   4441   4472   4508   4517   4526   4598   4928   5006   5121   5430
#> [101]   5502   5523   5688   5721   5792   5891   5986   6107   6263   6427
#> [111]   6619   6740   6935   6944   7187   7227   7423   7483   7519   7647
#> [121]   7662   7690   7951   8151   8168   8183   8254   8286   8313   8378
#> [131]   8477   8825   8852   9024   9262   9414   9566   9632   9731   9838
#> [141]   9855  10267  10305  10667  10730  10824  10990  11154  11173  11373
#> [151]  11656  12201  12207  12228  12314  12598  12862  13084  13090  13250
#> [161]  13281  13290  13453  13872  13920  13928  13940  14444  14527  14528
#> [171]  14683  15009  15115  16019  16226  17553  17572  17600  17809  17859
#> [181]  18227  18522  19008  20133  20562  20760  20828  22178  22356  24012
#> [191]  24322  24335  25708  25743  25817  25908  26111  27036  27176  27340
#> [201]  27360  28124  28623  30018  30763  34782  35160  35222  35733  36700
#> [211]  36933  38411  39108  40262  41649  42966  43152  43573  45033  46848
#> [221]  47707  50164  50192  51132  51748  56928  57410  63172  64298  67206
#> [231]  67500  67833  68500  78788  79459  79741  79914  82297  82397  95031
#> [241]  95757 269251 269349