# Space-Time Principal Component Analysis with Missing Lat/Long Data [closed]

I am looking to run a space-time Principal Component Analysis on Shotspotter data from Brockton, MA: http://justicetechlab.org/data/. Shotspotter sensors record the timing, location, and number of gunshots. There are gaps in the data when no shots were detected.

I would like to include the gaps in my PCA. At the temporal scale of a day, I have filled in the gaps and assigned a value of zero rounds to days when there were no gunshots detected (e.g. row six of the table below).

I am confused about how to handle the missing lat/lon data for these zero shots-fired days. When there are no shots detected, there are no shots detected everywhere, so assigning a lat/lon seems strange. But I would like to include the zero shots detected data points.

Statistically speaking, would the best solution be to? :

`````` 1. ignore the zero data completely
2. use the mean lat/lon for the observed data
3. randomly generate lat/lon data within the region of study and substitute these for missing lat/lon
4. use another statistical method well suited to my problem
``````

I have found some papers on how to impute missing measurements, but have not found much explaining how to handle missing lat/lon data:

• What exactly do you mean by "space-time PCA"? I googled it but didn't turn up much. Your question could also be extended to the time domain--do you enter zeros for every minute, second, millisecond, etc.? You arbitrarily choose day. – Jon May 19 '18 at 20:48
• Thanks Jon, I chose days to simplify my analysis - I am using padr in r to fill in the gaps, and was unable to get thicken( ) to work with hours. cran.r-project.org/web/packages/padr/vignettes/padr.html . Days are a fine enough temporal scale for my analysis. Space-time PCA refers to one of the three applications for PCA. As I understand it, these applications are: multiple sites and multiple times for one variable, multiple variables and multiple times at one site, and multiple variables and multiple sites at one time. – IsaacLS May 20 '18 at 4:14
• I think to answer this we need to rewind a bit - what's the underlying question you are trying to answer? What are you modelling? – Spacedman May 20 '18 at 14:49
• @Spacedman, I am looking to visualize space-time patterns in the data. Does gun violence data in Brockton follow a monopolar, dipolar or other space-time structure? – IsaacLS May 22 '18 at 5:43
• What do monopolar and dipolar mean? What are you hoping that PCA will tell you? – Spacedman May 22 '18 at 7:15