THIS README IS FOR THE INLA_w_MCMC/USCITIESIwM DIRECTORY.

THIS DIRECTORY CONTAINS THE R SCRIPTS THAT CALL THE UNIVARIATE OR MULTIVARIATE INLA WITHIN MCMC FUNCTIONS FROM ../IwMFUNCTIONS IN ORDER TO IMPLEMENT THE RESPECTIVE ALGORITHMS TO THE LOS ANGELES AND NEW YORK MOTOR VEHICLE THEFT DATA (1km scale) AS WELL AS IMPLEMENTING THE INLA-ONLY RUNS FOR THE TWO CITIES.
THE DATA (COUNT DATA, MESHES etc.) WAS BROUGHT OVER FROM BALENA WHICH HAD ORIGINALLY BEEN COPIED TO THE HPC FROM DATA/PROCESSED_DATA/CRIME/COUNT_DATA_FINAL.

- MultiCityUniIwM_final.R: this implements the Univariate INLA within MCMC algorithm for the Los Angeles Motor Vehicle Theft count data. First, the MH runs are implemented, with re-starts possible and then once these are complete the BMA step can be completed with options for setting the burn-in and thinning variables before the BMA is implemented. 

- MultiCityMultiIwM_final.R: this implements the Multivariate INLA within MCMC algorithm for the Los Angeles and New York Motor Vehicle Theft count data. As with the Univariate IwM, the Metropolis-Hastings iterations are first completed and then the BMA step is implemented separately. There are options with which we can tell the function to also approximate the covariate contrasts between study regions and we can define which study region is the `base' study region.

- MultiCityMultiIwM_INLARuns_final.R: this contains the code with which we can implement the INLA algorithm to the two cities separately.

- PlottingUSCitiesData_final.R: this considers the Los Angeles and New York data at the resolutions of data aggregation and mesh of interest for the INLA, Univariate and Multivariate INLA within MCMC implementations and produces some simple plots of the grids, meshes, variables and crime for each city individually and for both cities combined.

AS FOR THE NAMING CONVENTIONS OF THE DATA FOR THE CITIES:
	-- *_projFinalScale.rda: this denotes the count data and meshes originally produce from the R scripts in DATA/PROCESSED_DATA/CRIME/COUNT_DATA_FINAL and copied over to Balena to implement the algorithms. These were then copied back into this directory.

AS FOR THE NAMING CONVENTIONS OF THE OUTPUTS:
	-- MultiCity*IwM_MH_*.rda: this denotes the output from the Metropolis-hastings step only, where the number of runs is included in the filename, in the suffix, while the specification of the Univariate or Multivariate run is defined by the * = Uni or Multi before the `*IwM...'.
	-- MultiCity*IwM_BMA_*_*.rda: this denotes the output from the BMA implementation, the output includes the MCMC chains with the removed burn-in iterations as well as the INLA marginals for the remaining iterations and the final approximated posterior marginals for the fixed, hyperpar (internal rep., transformed internal rep. and INLA output external rep.) as well as the combination of the MH samples with the marginals for its respective fixed effect (only for the Multvariate outputs of course and for the non-base study region). The total iterations of the original MH run as well as the number of iterations taken as a burn-in are given in the filename in the suffix where `...BMA_MHiterations_burnin.rda' and as for the * before teh `IwM', this speficies where it is the result for the Univariate (*=Uni) or Multivariate (*=Multi) INLA within MCMC results.
	-- *INLA.rda: this denotes the INLA-only runs.
	-- *.pdf : these are the plots of the data, output from the above plotting script.