Skip to content

Code used in a time-series analysis of daily ambient temperature and firearm violence incidents across 100 US cities.

Notifications You must be signed in to change notification settings

Epi-Emma/2022_temperature_and_firearm_violence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

2022_temperature_and_firearm_violence

This repository contains code from a time-series analysis of daily ambient temperature and firearm violence incidents across 100 US cities from 2015 - 2020.

If you use this code, please cite the following publication:

Lyons VH, Gause EL, Spangler KR, Wellenius GA, Jay J. Analysis of Daily Ambient Temperature and Firearm Violence in 100 US Cities. JAMA Netw Open. 2022;5(12).


The files:

  • DLNM_0dayLag_Median_Ref.R contains the analysis code for the primary analysis investigating the relationship between daily temperature and firearm incidents with a 0-day lag.

  • DLNM_2dayLag_Median_Ref.R contains the analysis code for one of the sensitivity analyses using a 2-day lag. This code includes arguments for specifying a lag in the DLNM model.

NOTE: The DLNM analysis code requires that you download the "Attributable Risk from a DLNM" function code from Antonio Gasparrini (attrdl.R): https://github.com/gasparrini/2015_gasparrini_Lancet_Rcodedata


This analysis benefited from the R code examples written by Antonio Gasparrini and made available on his personal website.

About

Code used in a time-series analysis of daily ambient temperature and firearm violence incidents across 100 US cities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages