Methods for efficient inference in high-dimensional statistical models with applications to spatiotemporal neural data analysis