The figures and tables below explore patterns of non-response to the religion question in the census of population in Northern Ireland. The decennial census waves of interest are those of 2001, 2011, and 2021. The analysis below focuses on 2021 for now, pending further preparation of data from preceding years. Our preceding paper (Coulter, Shirlow, and Flaherty 2023) examined the ‘bio-politics’ of the Northern Irish Census, and in doing so, suggested an anomaly in the presumed count of a Catholic majority. Leaving aside the accuracy of the final recorded count (which we do not contest), we focus instead on the processes that may have led to an increase in those now opting to report their religion, who may previously have refused. There is precedent for this in Northern Ireland, with its history of organised census boycotts, particularly in 1971 on the back of the Civil Rights Movement, and again in 1981 following hunger strikes among Republican prisoners. The effects of these boycotts are still being uncovered through historical research (Cooley 2024). We suggest that something of this may be detectable in the data, more specifically the geography of religion and non-response, and the characteristics of those areas where changes in response patterns may be strongest.
Those recorded as ‘not stated’ are categorically, and geographically diffuse, and these are the rates of interest. One working hypothesis suggests that the effect may be limited to specific areas where compliance with past census boycotts may have been highest (acknowledging that this is difficult in itself to infer). If this is true, then the increase in Catholics in 2021 is more to do with greater affirmative response to the religion question, net of Catholic births and Protestant out-migration. A more diffuse effect is also possible, whereby more widespread declines in nonresponse across all religious categories, coupled with diverging birth and migration rates between the main religious group, may be responsible in aprt for the recorded increase in the Catholic population. The following document displays and discusses some preliminary headline findings from some of the main census categories.
# 1 - Catholic
p1.1 <- ggplot(ni_sp@data, aes(per_cat, after_stat(density))) +
geom_histogram(col = "#000000", fill = "darkgray", bins = 60) +
theme_classic() +
xlab(NULL) +
geom_vline(aes(xintercept = mean(per_cat)), color = "#000000", size = 0.75) +
labs(subtitle = "Catholic")
# 2 - Protestant
p1.2 <- ggplot(ni_sp@data, aes(per_pro, after_stat(density))) +
geom_histogram(col = "#000000", fill = "darkgray", bins = 60) +
theme_classic() +
xlab(NULL) +
geom_vline(aes(xintercept = mean(per_pro)), color = "#000000", size = 0.75) +
labs(subtitle = "Protestant")
# 3 - No religion
p1.3 <- ggplot(ni_sp@data, aes(per_nrel, after_stat(density))) +
geom_histogram(col = "#000000", fill = "darkgray", bins = 60) +
theme_classic() +
xlab(NULL) +
geom_vline(aes(xintercept = mean(per_nrel)), color = "#000000", size = 0.75) +
labs(subtitle = "No Religion")
# 4 - Not stated
p1.4 <- ggplot(ni_sp@data, aes(per_nsta, after_stat(density))) +
geom_histogram(col = "#000000", fill = "darkgray", bins = 60) +
theme_classic() +
xlab(NULL) +
geom_vline(aes(xintercept = mean(per_nsta)), color = "#000000", size = 0.75) +
labs(subtitle = "Not Stated") +
xlim(0, 8)
grid.arrange(p1.1, p1.2, p1.3, p1.4, nrow = 2,
top = "Figure 1. Current Religion, NI (2021)",
bottom = textGrob(
"Line = Mean, x = % of SDZ",
gp = gpar(fontface = 3, fontsize = 9),
hjust = 1,
x = 1))
Figure 1 (above) shows the distribution of religious categories based on current census figures by Super Data Zone (SDZ). The SDZ units replace the Super Output Areas (SOAs) of the 2011 census, and are again designed principally to weight population evenly across all units. The new Super Data Zones (N=850), nest within Data Zones (N=3780), with more information available here. The figure above shows some signature characteristics in the distribution of the various categories. First, there is a bimodal spread of Catholic areas, from SDZs with low percentages of Catholics, to those with high percentages. In contrast, there is a greater share of SDZs with high percentages of Protestants, peaking in the 50%-70% range. ‘No religion’ is somewhat more evenly distributed, whilst ‘not stated’ is more positively skewed. There are few areas recording above 4% no religion, indicating that the phenomenon of higher non-response is confined to a small number of areas. On the basis of these initial plots, it appears that the issue of non-response to religion is thus more narrowly distributed than that of religion in general. Levels of ‘not stated’ are typically low in Northern Ireland (p50=1.41%), and rarely reaches above 4% (the 9th decile range is 2.53%-14.6%). Therefore, rather than looking for correlates of non-response across the sample, it may be worth considering these areas above the 90th percentile as characteristically different. Although correlates are considered further on, this at least suggests that (1) high non-response to religion is a rarely occurring phenomenon; (2) may be confined to specific areas that could be defined or characterized by other measures; (3) may exhibit a specific geography, corresponding to very specific local conditions (i.e. high boycott compliance, high levels of republican influence). This points toward adopting a more locally sensitive analysis, in terms of detecting local clusters or outliers of non-response, examining the characteristics of these high-scoring areas in terms of corroborating local data, and in comparing global models of predictors of non-response against those calibrated for local and category-specific sensitivity. Figure 2 (below) plots religion ‘not stated’ by decile group. From this, the exceptional nature of the top 10% (D10 on the graph) below is apparent.
# Boxplots
p2.1 <- ggplot(ni_sp@data, aes(x=ni_sp$per_b_cat_decile, y=ni_sp$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up Catholic") +
ylim(0, 5)
p2.2 <- ggplot(ni_sp@data, aes(x=ni_sp$per_b_pro_decile, y=ni_sp$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up Protestant") +
ylim(0, 5)
p2.3 <- ggplot(ni_sp@data, aes(x=ni_sp$per_b_oth_decile, y=ni_sp$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up in Other Religion") +
ylim(0, 5)
p2.4 <- ggplot(ni_sp@data, aes(x=ni_sp$per_b_non_decile, y=ni_sp$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up with No Religion") +
ylim(0, 5)
grid.arrange(p2.1, p2.2, p2.3, p2.4, nrow = 2,
top = "Figure 3. Religion 'Not Stated' by Deciles of Religion Brought up in, NI (2021)",
bottom = textGrob(
"y = % in SDZ 'Religion not stated', x = Deciles of Religion Brought up in",
gp = gpar(fontface = 3, fontsize = 9),
hjust = 1,
x = 1))
Figure 3 (above) displays levels of non-response on the y-axis (left side vertical), within deciles of ‘religion brought up in’. The idea here is to explore whether levels of non-response are higher or lower at certain levels of a particular religion. This allows for more fine-tuned inspection of potentially exceptional areas showing either particularity high or low rates of non-response. Taking each panel in order from ‘Brought up Catholic’, we see there is little clear relation between non-response and being brought up Catholic. Non-response peaks at a relatively low level of Catholicism, and there is little variation. High non-response does not appear to be related to Catholic background, nor to Protestant, which shows the same low variation , and unclear trend across religion deciles. The latter categories are somewhat more uniform. Non-response is highest for those areas with high percentages ‘brought up in other religion’, and the trend is relatively uniform across deciles. The same is true of those areas with high percentages brought up in ‘no religion’. In both cases there is a clear gradient from the lowest to highest deciles. Overall, the plots again affirm that high non-response is exceptional, that it seems more closely related to categories other than the dominant religions, and moreso for the ‘gene pool’ question of religion brought up in. The correlation table below shows this further.
Correlation tables for Ni (top) and Belfast (lower)
ggcorrplot(corr_ni_r, hc.order = TRUE, type = "lower",
outline.col = "white", lab = TRUE, method = "square", p.mat = p.corr_ni_r, title = "Figure 4. Correlation Matrix (Northern Ireland)")
ggcorrplot(corr_bf_r, hc.order = TRUE, type = "lower",
outline.col = "white", lab = TRUE, method = "square", p.mat = p.corr_ni_r, title = "Figure 5. Correlation Matrix (Belfast Only)")
Figure 4 displays inter-item correlations, for now limited to those most relevant. Statistically significant correlations are indicated on the above plot by X. Considering just the percentage of respondents in SDZs recording religion ‘not stated’, there are few factors above weak association. Current, and born with no religion (per_nrel and per_b_non) are weakly associated, whilst the strongest correlate is being born into ‘other’ religions. The overall impression is that although some ‘headline’ measures such as those of the main religion groups show strong associations with other SDZ-level factors, there is little evidence that ‘Not stated’ is strongly associated with any other factor besides those mentioned. There is little difference when we consider this within cities, particularly Belfast and Derry. For Belfast alone (figure 5 above), there is weaker association between ‘not stated’ and other factors, whilst there is some strengthening of inter-item correlations between other factors.
Considering just the major cities, and revisiting the indicators used in figure 4 above, we find a more uneven pattern of variation across ethno-religious groups. Considering just those born Catholic, and born Protestant, in the cities of Belfast and Derry (figures 6 and 7 below), there is no clear gradient in the pattern of non-response, such that scores on non-response seem unrelated to SDZ-level measures of religion born in. The pattern within cities is somewhat stronger for other and no religion, whereby those areas in the higher deciles of ‘other’ and ‘none’, are more likely to average higher nonresponse. This patterns is only evident in Belfast, and is not apparent in Derry. Overall this provides little indication that much can be explained by either a global model, or without exploring the specifically high areas further - including their geography.
# Boxplots for Belfast
p3.1 <- ggplot(ni_belfast_sp.sub@data, aes(x=ni_belfast_sp.sub$per_b_cat_decile_bf, y=ni_belfast_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up Catholic") +
ylim(0, 5)
p3.2 <- ggplot(ni_belfast_sp.sub@data, aes(x=ni_belfast_sp.sub$per_b_pro_decile_bf, y=ni_belfast_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up Protestant") +
ylim(0, 5)
p3.3 <- ggplot(ni_belfast_sp.sub@data, aes(x=ni_belfast_sp.sub$per_b_oth_decile_bf, y=ni_belfast_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up in Other Religion") +
ylim(0, 5)
p3.4 <- ggplot(ni_belfast_sp.sub@data, aes(x=ni_belfast_sp.sub$per_b_non_decile_bf, y=ni_belfast_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up with No Religion") +
ylim(0, 5)
grid.arrange(p3.1, p3.2, p3.3, p3.4, nrow = 2,
top = "Figure 6. Religion 'Not Stated' by Deciles of Religion Brought up in, Belfast (2021)",
bottom = textGrob(
"y = % in SDZ 'Religion not stated', x = Deciles of Religion Brought up in",
gp = gpar(fontface = 3, fontsize = 9),
hjust = 1,
x = 1))
# Boxplots for Derry
p4.1 <- ggplot(ni_derry_sp.sub@data, aes(x=ni_derry_sp.sub$per_b_cat_decile_bf, y=ni_derry_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up Catholic") +
ylim(0, 5)
p4.2 <- ggplot(ni_derry_sp.sub@data, aes(x=ni_derry_sp.sub$per_b_pro_decile_bf, y=ni_derry_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up Protestant") +
ylim(0, 5)
p4.3 <- ggplot(ni_derry_sp.sub@data, aes(x=ni_derry_sp.sub$per_b_oth_decile_bf, y=ni_derry_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up in Other Religion") +
ylim(0, 5)
p4.4 <- ggplot(ni_derry_sp.sub@data, aes(x=ni_derry_sp.sub$per_b_non_decile_bf, y=ni_derry_sp.sub$per_nsta))+
geom_boxplot() +
ylab("Religion 'not stated'") +
theme(axis.title.x=element_blank(),
axis.title.y=element_blank(),
plot.subtitle=element_text(size=10))+
labs(subtitle = "Brought up with No Religion") +
ylim(0, 5)
grid.arrange(p4.1, p4.2, p4.3, p4.4, nrow = 2,
top = "Figure 7. Religion 'Not Stated' by Deciles of Religion Brought up in, Derry (2021)",
bottom = textGrob(
"y = % in SDZ 'Religion not stated', x = Deciles of Religion Brought up in",
gp = gpar(fontface = 3, fontsize = 9),
hjust = 1,
x = 1))
One thing that can be discerned is that reported secularism (measured as no currently reported religion), is a phenomenon of areas with higher proportions raised Protestant. Therefore, although there appears to be little linear relation between religious density and nonresponse within SDZs, the pattern of ‘no religion’ is more clearly ethno-religious, with rates of current ‘no religion’ much higher on average in areas with higher proportions of those raised Protestant. The plot below illustrates this across NI, and is replicated in the maps below where within cities, ‘no religion’ shows a characteristic West-East distribution. Using a gam smoother in the plot, we also find a curvilinear relationship, where the effect tapers off (i.e. areas with higher proportions of those raised Protestant are less likely to report higher rates of no religion). This is most apparent in mapping ‘no religion’ in Belfast, where it is concentrated in eastern and south-eastern SDZs in particular.
ggplot(data = ni_sf, mapping = aes(x = per_b_pro, y=per_nrel)) +
geom_point(color = "black", alpha = 0.2, size = 1.5) +
geom_smooth(method = "lm", color = "red", linetype="dashed") +
geom_smooth(color = "blue", method = "gam") +
labs(x = "% Raised Protestant", y = "% Reporting 'No Religion'",
title = "Figure 8. Religion Raised in and Current 'No Religion' (NI, 2021)")
The following section maps the distribution of nonresponse, and some key correlates, at both NI and city level (Belfast and Derry). These maps form the basis for the local analysis employed in the following section. The regional plot (figure 8 below) shows some evidence of regional clustering, particularly in the border region of Fermanagh, but little else in terms of what might be identified as a signature regional pattern of drift. Belfast shows some clearer clustering of high values toward the center (i.e. Titanic) and its surrounds to the West and South. There is a similar geography to nonresponse in Derry (figure 9 below), with an emphasis on central SDZs, and lower values to the periphery.
tm_shape(ni_sdv) +
tm_fill("per_nsta", title = "Rlgn Not Stated (2021)", palette = "Blues",
breaks = c(0, round(quantileCuts(ni_sdv$per_nsta, 6), 2))) +
tm_borders(lty = "solid", col = "black") +
tm_style("natural", bg.color = "grey90") +
tm_borders(lwd = 1) +
tm_scale_bar(width = 0.22, position = c(0.05, 0.02)) +
tm_compass(position = c(0.9, 0.07)) +
tm_layout(legend.title.size = 1,
legend.text.size = 0.6,
legend.position = c("left","top"),
legend.format = list(text.separator = "-"),
legend.bg.alpha = 1,
title = "Northern Ireland",
title.size = 1,
title.position = c(0.35, "top"))
Figure 9. Distribution of ‘Religion Not Stated’ (NI 2021)
tm_shape(ni_belfast.sub) +
tm_fill("per_nsta", alpha = 0.9, title = "Rlgn Not Stated (2021)", palette = "Blues",
breaks = c(0, round(quantileCuts(ni_belfast.sub$per_nsta, 6), 2))) +
tm_borders(lty = "solid", col = "black") +
tm_style("natural", bg.color = "grey90") +
tm_borders(lwd = 1) +
tm_scale_bar(width = 0.22) +
tm_compass(position = c(0.8, 0.09)) +
tm_layout(legend.title.size = 1,
legend.text.size = 0.6,
legend.position = c("left","top"),
legend.format = list(text.separator = "-"),
legend.bg.alpha = 1,
title = "Belfast",
title.size = 1,
title.position = c("0.7", "top")) +
tm_shape(osm_belfast) + tm_rgb(alpha = 0.4)
Figure 10. Distribution of ‘Religion Not Stated’ (Belfast 2021)
tm_shape(ni_derry.sub) +
tm_fill("per_nsta", alpha = 0.9, title = "Rlgn Not Stated (2021)", palette = "Blues",
breaks = c(0, round(quantileCuts(ni_derry.sub$per_nsta, 6), 2))) +
tm_borders(lty = "solid", col = "black") +
tm_style("natural", bg.color = "grey90") +
tm_borders(lwd = 1) +
tm_scale_bar(width = 0.22) +
tm_compass(position = c(0.8, 0.09)) +
tm_layout(legend.title.size = 1,
legend.text.size = 0.6,
legend.position = c("left","top"),
legend.format = list(text.separator = "-"),
legend.bg.alpha = 1,
title = "Derry",
title.size = 1,
title.position = c(0.6, "top")) +
tm_shape(osm_derry) + tm_rgb(alpha = 0.4)
Figure 11. Distribution of ‘Religion Not Stated’ (Derry 2021)
Spatial plots allow us to investigate this further. The point of the following maps is to give some early indication of the potential presence of regional cluster. These plots allow us to identify areas where SDZs may be adjacent to other SDZs of significantly higher scores. These procedures work by first identifying neighboring units for each individual SDZ based on set proximity criteria. For this study, we use Queen contiguity, where a neighbor counts as any SDZ in contact with any part of the boundary of as SDZ. By calculating a mean for each such group and comparing it against the score of the origin SDZ, we can construct a picture of those areas where clusters of high or low scores may be occurring. We can use any variable here, but we focus largely on the nonresponse variables (religion ‘not stated’) as per the current 2021 census question set.
# List details of neighbour connections (Queen)
ni.nb <- poly2nb(ni_sp)
# Convert neighbour list to listw object (Queen's case)
ni_nb_lw <- nb2listw(ni.nb)
ni_sp$per_nsta.lagged.means <- lag.listw(ni_nb_lw,ni_sp$per_nsta)
tm_shape(ni_sp) + tm_polygons(col= 'per_nsta.lagged.means',title= '% Not Stated.') +
tm_scale_bar(width = 0.22, position = c("left", "bottom")) +
tm_compass(position = c(0.07, 0.08)) +
tm_layout(legend.title.size = 1,
legend.text.size = 0.6,
legend.position = c("left","top"),
legend.format = list(text.separator = "-"),
legend.bg.alpha = 1,
title = "N.I. Spatial Lag Plot (2021)",
title.size = 1,
title.position = c(0.2, "top"))
Figure 12. Lagged mean map for religion ‘not stated’
The lagged mean map for religion not stated (figure 12 above) gives some indication of the spread of areas with similar values on nonresponse. While the plot shows some evidence of clustering in the mid-range of values, there are few instances of high or low-value clusters. Plotting the original scores for each location against their lagged mean (the mean of the SDZ plus its proximate neighbors) allows us to assess the extent of this phenomenon. The test statistic for Moran’s I is .24 (p<.001), suggesting moderate evidence of spatial clustering, and the lagged mean plot for NI is produced below in figure 13. Again, evidence is weak for spatial clustering, aside from a few SDZs.
ni_sp$per_nsta.lagged.means <- lag.listw(ni_nb_lw,ni_sp$per_nsta)
with(data.frame(ni_sp), {
plot(per_nsta,per_nsta.lagged.means, asp= 1, xlim=range(0,5), ylim=range(0,6), xlab="% religion not stated", ylab="Lagged mean", main="Figure 12. Lagged mean plot (NI, 2021)",)
abline(a= 0, b= 1)
abline(v=mean(per_nsta), lty= 2)
abline(h=mean(per_nsta.lagged.means), lty= 2)
})
Figure 12. Lagged mean plot for NI (2021)
Repeating this process for Belfast shows some clearer spatial patterning, where nonresponse appears more clearly centered on central-northern SDZs. There is little evidence for West-East difference or drift, as is characteristic of other variables (i.e. religion). The Moran statistic is weak-moderate (I = .19, P<.001), and the lagged mean plot (figure 14 below) is also non-linear. The spatial pattern, considering both the NI and Belfast plots, is one of clustering in the low range of values, rather than high. The evidence of high-value clustering on nonresponse within Belfast is less clear still.
# List details of neighbour connections (Queen)
ni.belfast <- poly2nb(ni_belfast.sub)
# Convert neighbour list to listw object (queen's case)
ni_belfast_lw <- nb2listw(ni.belfast)
ni_belfast.sub$per_nsta.lagged.means <- lag.listw(ni_belfast_lw,ni_belfast.sub$per_nsta)
tm_shape(ni_belfast.sub) + tm_polygons(alpha = 0.9, col= 'per_nsta.lagged.means',title= '% Not Stated.') +
tm_scale_bar(width = 0.22) +
tm_compass(position = c(0.8, 0.09)) +
tm_layout(legend.title.size = 1,
legend.text.size = 0.6,
legend.position = c("left","top"),
legend.format = list(text.separator = "-"),
legend.bg.alpha = 1,
title = "Belfast Spatial Lag Plot (2021)",
title.size = 1,
title.position = c(0.5, "top")) +
tm_shape(osm_belfast) + tm_rgb(alpha = 0.4)
Figure 13. Lagged mean map for religion ‘not stated’ (Belfast)
ni_belfast.sub$per_nsta.lagged.means <- lag.listw(ni_belfast_lw,ni_belfast.sub$per_nsta)
with(data.frame(ni_belfast.sub), {
plot(per_nsta,per_nsta.lagged.means, asp= 1, xlim=range(0, 5), ylim=range(0, 6),
xlab="% religion not stated", ylab="Lagged mean", main="Figure 14. Lagged mean plot (Belfast, 2021)")
abline(a= 0, b= 1)
abline(v=mean(per_nsta), lty= 2)
abline(h=mean(per_nsta.lagged.means), lty= 2)
})
Figure 16. Lagged mean plot (Belfast, 2021)
While there is little to be gleaned about correlated of nonresponse in general, it is clear that there exists a subset of SDZs with nonresponse rates significantly above average, particularly in the 10th decile. Currently, the most productive option is to repeat the above for the 2011 data, again with the intention of inspecting the extent of spatial clustering, rather than mapping changes within units as such. Comparing levels of nonresponse, and examining the potential correlation between these and the factors listed above, should provide more insight. This rest on the assumption that, in the event of a marked decline in nonresponse for this census wave in particular (2021), then nonresponse to religion should show either stronger, or more clearer patterning than that of the 2021 wave. This finding could tentatively be used to suggest both a change in overall levels of nonresponse - however this depends very much on what is found from the SOA data. The problem here is that the geography of the units used above has changed, from the Super Output Areas of 2011, to the Super Data Zones of 2021. The grid-square data would overcome this, and allow for greater comparison over time, however this comes with the loss of ‘organic’ boundaries that would reflect more internally coherent areas. I suggest the following:
# Generating summary statistics
# Label the variables
labs2 <- data.frame(var = c('per_cat', 'per_pro', 'per_nrel', 'per_nsta', 'per_b_cat', 'per_b_pro', 'per_b_oth', 'per_b_non', 'per_brit', 'per_iri', 'per_ni', 'per_l4'),
labels = c('% Catholic',
'% Protestant',
'% No religion', '% Not stated', '% Raised Catholic', '% Raised Protestant', '% Raised other', '% Raised none', '% British', '% Irish', '% Northern Irish', '% Degree and above'))
# Then use the summarytable function from vtable package:
sumtable(ni_sf, vars = c('per_cat','per_pro', 'per_nrel', 'per_nsta', 'per_b_cat', 'per_b_pro', 'per_b_oth', 'per_b_non', 'per_brit', 'per_iri', 'per_ni', 'per_l4'), labels = labs2, digits = 3, add.median = TRUE, title = 'Table A1. NI Census Summary Statistics (NI, 2021)')
Variable | N | Mean | Std. Dev. | Min | Pctl. 25 | Pctl. 50 | Pctl. 75 | Max |
---|---|---|---|---|---|---|---|---|
% Catholic | 850 | 40.5 | 29.8 | 2.02 | 11.8 | 34 | 69.8 | 95 |
% Protestant | 850 | 38.3 | 22.9 | 1.21 | 16.8 | 42.9 | 57.9 | 83.1 |
% No religion | 850 | 18.2 | 9.92 | 2.44 | 9.19 | 17.3 | 26.2 | 43.2 |
% Not stated | 850 | 1.62 | 1.14 | 0.21 | 1.08 | 1.41 | 1.88 | 14.6 |
% Raised Catholic | 850 | 43.9 | 30.6 | 2.73 | 14.8 | 39.1 | 73.3 | 96.9 |
% Raised Protestant | 850 | 44.7 | 26.3 | 1.73 | 20.1 | 49.1 | 68.1 | 90.1 |
% Raised other | 850 | 1.57 | 1.91 | 0 | 0.65 | 1.08 | 1.83 | 21.3 |
% Raised none | 850 | 9.78 | 6.1 | 0.7 | 4.42 | 8.9 | 14.2 | 34.6 |
% British | 850 | 32.8 | 18.1 | 2.11 | 16.4 | 35.9 | 48.5 | 68.7 |
% Irish | 850 | 27.7 | 23.8 | 0.94 | 5.95 | 19.4 | 45.8 | 83.1 |
% Northern Irish | 850 | 19.8 | 4.31 | 6.88 | 17 | 20 | 22.5 | 39.5 |
% Degree and above | 850 | 25.4 | 9.33 | 8.15 | 18.9 | 24.4 | 29.8 | 60.5 |
sumtable(ni_sf, vars = c('per_cat','per_pro', 'per_nrel', 'per_nsta', 'per_b_cat', 'per_b_pro', 'per_b_oth', 'per_b_non', 'per_brit', 'per_iri', 'per_ni', 'per_l4'), labels = labs2, group='city', digits = 3, add.median = TRUE, title = 'Table A2. NI Census Summary Statistics (by City, 2021)')
Variable | N | Mean | SD | Median | N | Mean | SD | Median | N | Mean | SD | Median |
---|---|---|---|---|---|---|---|---|---|---|---|---|
% Catholic | 175 | 41.2 | 30.9 | 36.3 | 39 | 72.4 | 24.3 | 85.2 | 636 | 38.3 | 28.6 | 32.1 |
% Protestant | 175 | 31.6 | 23 | 27.4 | 39 | 15.4 | 20.8 | 4.5 | 636 | 41.5 | 21.8 | 46.4 |
% No religion | 175 | 22.2 | 10.8 | 23.1 | 39 | 9.43 | 4.77 | 8.05 | 636 | 17.6 | 9.42 | 17 |
% Not stated | 175 | 2.08 | 1.62 | 1.81 | 39 | 1.68 | 1.14 | 1.53 | 636 | 1.49 | 0.93 | 1.32 |
% Raised Catholic | 175 | 46.4 | 31.7 | 44.8 | 39 | 77.4 | 24.7 | 90.9 | 636 | 41.2 | 29.3 | 34.2 |
% Raised Protestant | 175 | 38.5 | 26.7 | 34.6 | 39 | 17.3 | 22.5 | 5.17 | 636 | 48.1 | 25.1 | 53.9 |
% Raised other | 175 | 3.24 | 3.38 | 2.07 | 39 | 1.28 | 1.06 | 0.85 | 636 | 1.13 | 0.837 | 0.915 |
% Raised none | 175 | 11.9 | 6.64 | 12.3 | 39 | 3.96 | 2.39 | 3.1 | 636 | 9.55 | 5.83 | 8.61 |
% British | 175 | 28.5 | 18.8 | 27.8 | 39 | 13.4 | 15.5 | 4.8 | 636 | 35.2 | 17 | 39.2 |
% Irish | 175 | 33.2 | 26.3 | 29.9 | 39 | 60.6 | 22.3 | 72.9 | 636 | 24.2 | 21.2 | 15.9 |
% Northern Irish | 175 | 16.7 | 4.16 | 16.6 | 39 | 15.8 | 3.03 | 15.8 | 636 | 20.8 | 3.85 | 20.9 |
% Degree and above | 175 | 27.4 | 13.7 | 24.6 | 39 | 24.6 | 9.02 | 23.3 | 636 | 24.9 | 7.65 | 24.5 |
# Create a decile variable for Not stated
ni_sp$per_nsta_decile <- (quantcut(ni_sp$per_nsta, 10))
levels(ni_sp$per_nsta_decile) <- c("D1", "2", "3", "4", "5", "6", "7", "8", "9", "D10")
levels(ni_sp$per_nsta_decile)
## [1] "D1" "2" "3" "4" "5" "6" "7" "8" "9" "D10"
# Generate a subset for high values of 'not stated':
p90_nsta <- ni_sp[ni_sp$per_nsta >= 2.53,]
nrow(p90_nsta)
## [1] 86
ad1 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_nsta))+
geom_boxplot() +
ylab("% Not Stated") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A1. % Not Stated")
ad2 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_b_cat))+
geom_boxplot() +
ylab("% Raised Catholic") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A2. % Raised Catholic")
ad3 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_b_oth))+
geom_boxplot() +
ylab("% Raised Other") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A3. Brought up in Other Religion")
ad4 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_b_non))+
geom_boxplot() +
ylab("% Raised None") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A4. Brought up in No Religion")
ad5 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_brit))+
geom_boxplot() +
ylab("% British") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A5. % British")
ad6 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_iri))+
geom_boxplot() +
ylab("% Irish") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A6. % Irish")
ad7 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_ni))+
geom_boxplot() +
ylab("% Northern Irish") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A7. % Northern Irish")
ad8 <- ggplot(ni_sp@data, aes(x=ni_sp$per_nsta_decile, y=ni_sp$per_l4))+
geom_boxplot() +
ylab("% Degree Education and Above") +
xlab("Deciles of % Not Stated") +
theme(plot.subtitle=element_text(size=10))+
labs(subtitle = "A8. % Degree Education and Above")
ad1
ad2
ad3
ad4
ad5
ad6
ad7
ad8