Physical activity facilities
The national agency for sport in Scotland, sportscotland, supplied a list of the names, types and the British National Grid Reference  of all fixed indoor and outdoor PA facilities in Scotland . Duplicate facilities of the same type were omitted from the dataset prior to the analysis, as documented in our previous paper . Each of the PA facilities, which consisted of amenities such as swimming pools, football pitches and golf courses, was assigned a typical energy expenditure value according to the metabolic equivalent of task (MET) intensity value from the compendium of Ainsworth et al.. One MET is defined as the energy cost of a person at rest. The compendium provides a comprehensive list of activities and their corresponding MET values and was created to enable a consistent classification of energy expenditure from self-report activity data across studies. Standard cut-points defined by Pate et al.  of less than 3 METs for light intensity activity, 3 to 6 METs for moderate intensity activity and greater than 6 METs for vigorous intensity activity were adopted and the facilities were grouped into light, moderate and vigorous intensity categories according to the typical activity which was assumed to be undertaken at the facility. Light intensity activities include, for example, hunting with a bow and arrow and pistol shooting which both have MET values of 2.5. Facilities such as ballistics halls were therefore grouped in the light category. Moderate intensity activities consist of those which perhaps in principle could involve an average MET of greater than 6 but for which this value would be atypical and include golf (compendium values for all golfing activities are less than 5 METs), bowling (3 METs) and cricket (5 METs). Facilities such as golf courses, bowling greens and cricket squares were therefore grouped in the moderate intensity category. Athletics tracks are commonly used for hard training purposes and a MET of greater than 6 is within the limits of normal usage of a swimming pool. Facilities such as athletics tracks and swimming pools were therefore classified as vigorous intensity facilities. Activities such as shinty (a team sport mainly played in the Highlands of Scotland) and Gaelic football, which did not feature in the compendium, were classed as vigorous as these activities would typically be performed at vigorous intensity. Some fixed PA facilities, such as occasional sports halls and church halls, were difficult to match to a particular activity from the METs compendium. It was assumed that in practice people were most likely to participate in activities such as badminton and table tennis (moderate intensity activities) in these spaces. These facilities were therefore assigned to the moderate intensity classification. Of the 10,032 fixed PA facilities, only 10 (0.1%) — comprising ballistics halls, croquet lawns and indoor small bore rifle ranges — were classified as light intensity facilities. This category of facilities was therefore not considered in subsequent analysis. 3,872 (38.6%) were classified as facilities in which, in general, moderate intensity activity would be conducted and 6,150 (61.3%) were classified as facilities in which vigorous intensity activity would predominantly be undertaken.
The PA facilities were mapped using Geographic Information System (GIS) software and the number of light, moderate and vigorous intensity activity facilities accessible, with accessible defined to be within a 20 or 30 minute journey, on foot, by bicycle, by car and by bus from the population weighted centroid of each datazone (DZ) was calculated, as detailed below.
DZs are the key small area measure in Scotland and are created from groups of output areas in the 2001 Census  and are nested within Scottish local authorities. DZs were created to respect natural boundaries and communities and consist of households with similar socioeconomic characteristics. There are 6,505 DZs in Scotland with a mean population of 778 individuals (range 476–2813) and mean area of 11.9km2. The most important criterion adopted in the initial definition of DZs was to have roughly equal population sizes of between 500 and 1,000 individuals and so the DZs are variable in terms of the area they cover. The smallest DZ is located in Edinburgh and covers an area of only 12,367m2 whilst the largest data zone is located in the Highlands and covers an area of 1,159km2. 6,412 (98.6%) of the 6,505 DZs are located within mainland Scotland local authorities. The Western Isles, Shetland and Orkney Islands were not considered in this analysis as the transport network did not include these island local authorities.
A transport network was created using TransCAD software version 5.0  which combines a GIS with transport planning functionality. Data from the Ordnance Survey Integrated Transport Network layer covering mainland Scotland were imported into TransCAD. In addition, the population weighted centroids of DZs and the locations of the PA facilities were imported into TransCAD, with dummy links added to connect these point features to the nearest node on the Integrated Transport Network layer.
For walking and cycling, routes in which these modes are not possible (such as motorways) were removed. An average walking speed of 5km/hr  and an average cycling speed of 14km/hr  were assumed. Considering the car and bus transport networks, the car network was created to represent uncongested road conditions, with the estimated free flow speed of the road type (motorway, A road, B road, minor road, local street) adopted as the travel speed in the analysis. Time penalties were allocated to left and right turning traffic movements at junctions to reflect the delay experienced by vehicles negotiating the geometry of the junction in accordance with values estimated by McDonald et al. . Further details of the car and bus network adopted in this analysis are documented elsewhere .
Bus routes were created using bus timetable information obtained from the National Public Transport Data Repository . This dataset contained details of all bus stop locations and scheduled bus journeys in Scotland during a selected week in October 2007. The bus schedule data were examined and routes which followed a common sequence of stops were identified, resulting in 12,371 unique routes. Each route was checked for errors in either the original data or the route creation process to verify the route system. In this analysis, bus routes operating between 10 am and 4 pm on a Wednesday were selected to represent bus services on a weekday inter-peak period. For this period a bus network was created which incorporated the surrounding road network for access, egress and interchange trip stages.
A matrix of travel times between the population weighted centroid and each of the PA facilities was determined for each mode of transport assuming that the travellers would take the shortest possible path by distance for walking and cycling and by time for bus and car travel. Population weighted centroids were chosen as this is the point in the DZ which minimises the distance for all of the households in the area . For bus networks, the maximum number of transfers between bus services was restricted to two and the maximum access and egress walk times were limited to 30 minutes. The bus stop waiting times were allowed to be no greater than five minutes, under an assumption that passengers would know the bus timetable and ensure an arrival time at the bus stop which would avoid excessive waiting times. Each matrix was then used to determine the number of moderate and vigorous intensity activity facilities accessible within 20 and 30 minute thresholds from the population weighted centroid of each DZ for each mode of transport.
Data zone level variables
Three publicly available DZ measures were considered in the analysis of the distribution of facilities in Scotland. The 2006 Scottish Index of Multiple Deprivation (SIMD) Current Income sub-domain  was obtained in order to explore the distribution of accessibility to facilities by small area deprivation. The SIMD provides a measure of compound social and material deprivation and is calculated using data on education, employment, welfare benefits, health, housing and other population characteristics for each DZ. The full SIMD contains information about access to services which would perhaps introduce a degree of circularity into an analysis looking at the accessibility of PA facilities. We therefore used the Current Income sub-domain and grouped the continuous measure into quintiles ranging from the most affluent DZs in quintile 1 to the most deprived DZs in quintile 5. The Scottish Executive six-fold Urban Rural Classification  and the 2001 Census population numbers  were also acquired for adjustment in the analysis. The Urban Rural Classification consists of three types of area; urban areas (category 1=large urban areas, category 2=other urban areas), small towns (category 3=accessible small towns, category 4=remote small towns) and rural areas (category 5=accessible rural areas, category 6=remote rural areas), with mean areas of 0.5km2, 2.4km2 and 62.1km2 respectively. The six-fold Urban Rural Classification defines areas according to population size as well as drive time to the nearest urban area. Large urban areas consist of areas with over 125,000 residents whilst other urban areas are those with between 10,000 and 125,000 residents. Small towns, both accessible and remote, consist of areas with between 3,000 and 10,000 residents with accessible small towns defined to be within a 30 minute drive of a settlement of an urban area and remote small towns defined to have more than a 30 minute drive to an urban area. Rural areas have fewer than 3,000 residents with accessible rural areas defined to be within a 30 minute drive of an urban area and remote rural areas defined to have more than a 30 minute drive to an urban area.
The median, minimum and maximum number of moderate and vigorous intensity activity facilities accessible by each mode of transport within 20 and 30 minute thresholds from the population weighted centroid was calculated for each Current Income sub-domain SIMD quintile.
Multilevel negative binomial regression was used to model the relationship between the number of accessible facilities and Income SIMD for each sub-category of facility type and each time threshold separately, taking into account the hierarchical structure with DZs located within local authorities. Significant interaction effects were identified between Urban Rural Classification and Income SIMD. Therefore, separate models were fitted for the urban, small town and rural areas to aid interpretation of the results. A poisson multilevel model was adopted when modelling the moderate intensity activity facilities accessible within a 20 minute walk of small towns as no overdispersion was found to be present for this particular outcome.
Although multilevel modelling allows for the clustering of DZs within local authorities, it does not take into account the spatial location of the DZs. Spatial data are often affected by positive spatial correlation by which areas near one another have more attributes in common with each other than with areas located further away . If spatial autocorrelation is not taken into account in the modelling, the resulting parameter estimates may be biased.
Using the approach adopted in our previous paper , the Moran’s I permutation test was carried out to test for the presence of spatial autocorrelation. This tests the null hypothesis of no spatial autocorrelation between DZs sharing a common border [33, 34]. Where statistically significant positive spatial autocorrelation was present, a spatial weighting variable dependent on the response variable in each model was included in the regression to take account of the spatial location of the DZs, as documented in a previous analysis . The spatial variable was not adopted in the modelling of the number of moderate intensity facilities accessible within a 20 minute bus journey of urban areas or the number of vigorous intensity facilities accessible within a 20 minute cycle of rural areas as it was not found to reduce the residual spatial autocorrelation.
Even after the inclusion of the spatial weighting variable, where appropriate, statistically significant residual spatial autocorrelation remained. For this reason, a more conservative 99% level of significance was used.
The statistical analysis was carried out using R version 2.11.1 . The modelling results are presented as graphs of the rate ratio (RR) of accessible facilities with 99% confidence intervals. The most affluent Income SIMD quintile was the baseline category in the modelling. A rate ratio of greater than one indicates higher accessibility than the most affluent quintile.