Skip to contents

Performs the standard log-log OLS scaling fit $$\log y_i = \log Y_0 + \beta \log p_i + \varepsilon_i,$$ where \(y_i\) is the crime count and \(p_i\) is the population of ward i. \(\beta > 1\) indicates super-linear (crime grows faster than population), \(\beta = 1\) linear, and \(\beta < 1\) sub-linear (protective) scaling (Bettencourt et al. 2007; D'Orsogna & Perc 2015 sec. 4.1).

Usage

morie_tps_urban_scaling_beta(
  category = "Assault",
  year = 2024L,
  save_fig = TRUE
)

Arguments

category

TPS category name.

year

Reference year used to choose the appropriate population and crime columns.

save_fig

Whether to write a log-log scatter + fit PNG.

Value

A morie_rich_result with \(\hat\beta\), its standard error, R-squared, the back-transformed prefactor \(Y_0\), and a regime label (sub-linear, linear, super-linear).

References

Bettencourt LMA, Lobo J, Helbing D, Kuhnert C, West GB (2007). Growth, innovation, scaling, and the pace of life in cities. PNAS 104: 7301-7306.

Examples

if (FALSE) { # \dontrun{
  rr <- morie_tps_urban_scaling_beta("Assault", year = 2024,
                                      save_fig = FALSE)
  print(rr$summary_lines)
} # }