The case of Vyborg
UEF
2024-09-26
Pre-modern causes:
Modern causes1:
Signum | Original year | Digitization process |
---|---|---|
Town plan of Vyborg. Vyborg military engineer detachment’s archive of plans for fortifications and buildings, 7, 11. | 1878 | Georeferenced using ground control points, vectorized manually into shapefile |
Vyborg province poll tax registers | 1880 | Digitized manually into CSV |
Financial office of the city of Vyborg, Municipal tax levies and payment registers | 1880 | Digitized manually into CSV |
column | description |
---|---|
plot_number | Plot number |
taxpayer_men | Men paying poll tax |
taxpayer_women | Women paying poll tax |
no_tax_men | Men exempt from poll tax |
no_tax_women | Women exempt from poll tax |
in_russia_men | Men legally residing in Russia proper |
in_russia_women | Women legally residing in Russia proper |
total_men | Total men |
total_women | Total women |
independent | Civil servants, entrepreneurs, and financially independent |
white_collar | White collar workers |
worker_industry | Workers in industry |
worker_other | Other workers |
servants | Servants |
other | Other employment status |
non_resident | Resident elsewhere |
orthodox | Orthodox |
other_christian | Non-Lutheran and non-Orthodox Christian |
other_religion | Other religions |
draftable | 21-year-old males eligible for draft |
\[ \begin{equation} P_{Lutheran} = \begin{split} (P_{total\_men}+P_{total\_women}) \\ − (P_{Orthodox}+P_{other\_Christian}+P_{other\_religion}) \end{split} \end{equation} \]
District | 1822 | 1880 |
---|---|---|
Centre | 1192 | 2506 |
St. Anna | 244 | 117 |
Vyborg suburb | 642 | 756 |
St Petersburg suburb | 1512 | 2685 |
Based on Martin, Tate, and Langford (2000).
\[ P_i=\sum^N_{j=1} P_j w_{ij} \]
\[ w_{ij} = \begin{cases} \left( \frac{k^2 - d^2_{ij}}{k^2 + d^2_{ij}} \right)^\alpha & \text{if} \hspace{1cm} d_{ij < k} \\ 0 & \text{else} \end{cases} \]
::: {#cell-kernel profile .cell execution_count=2}
Kernel function
:::
:::
\[ O_i \sim MvNormal(\mu, \textbf{K}) \]
\[ \mu_i = \beta_{0,k[i]} + \beta_{1,k[i]} \textit{ln(W)} + \beta_{2,k[i]} C_i \]
\[ k \in 1,2,3,4 \hspace{1cm} i,j \in 1,2,3, \dots 539 \]
\[ \beta_k \sim MvNormal \left( \theta, \begin{bmatrix} 0.1 & 0 & 0 \\ 0 & 0.1 & 0 \\ 0 & 0 & 0.1 \end{bmatrix}\right) \]
\[ \theta \sim MvNormal \left( \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 0.1 & 0 & 0 \\ 0 & 0.1 & 0 \\ 0 & 0 & 0.1 \end{bmatrix}\right) \]
\[ \textbf{K}_{ij} = \eta^2 exp(-75 \rho^2 d^2_{ij}) + 0.01 \times I_{540} \]
\[ \eta^2 \sim Normal(1, 0.2) \] \[ \rho^2 \sim Normal(1, 0.2) \]
Variable | Shape | Description |
---|---|---|
O | 540 | Normalized proportion of Russian Orthodox of the local population |
W | 540 | Smoothed total income in a location in öre |
C | 540 | Distance to nearest Orthodox church in 1799 in kilometres |
d | 540 x 540 | Distance matrix holding pairwise distances between plots |
θ | 3 | Hyperparameter for β |
β | 4 x 3 | Linear regression coefficients for each district |
η2 | 1 | Parameter for the covariance function |
ρ2 | 1 | Parameter for the covariance function |
after O’Sullivan and Wong (2007)
\[ S = 1 - \frac{∯_R min(p_{L}, p_{O}) \hspace{2mm}dR}{∯_R max(p_{L}, p_{O}) \hspace{2mm}dR} \]
where \(p_L\) and \(p_O\) are the normalised population densities of Lutheran and Orthodox populations respectively
\[ S_{year} \sim Normal(\mu_{year}, \sigma) \]
\[ \mu_{year} = \alpha + \sum_{k=1}^K w_k B_{k,year} \]
\[ \alpha \sim Normal(0.45, 0.01) \] \[ \sigma \sim HalfNormal(0.05) \]
\[ B = \begin{bmatrix} 1 & 0.687 & 0.295 & 0.02 & 0 & 0 & 0 & 0 \\ 0 & 0.299 & 0.601 & 0.612 & 0.367 & 0.276 & 0.007 & 0 \\ 0 & 0.015 & 0.104 & 0.367 & 0.612 & 0.658 & 0.209 & 0 \\ 0 & 0 & 0 & 0 & 0.02 & 0.066 & 0.784 & 1 \end{bmatrix} \]
\[ w_k \sim Normal(0, 0.1) \]
import pymc as pm
with pm.Model() as model:
a = pm.Normal("α", μ_a, σ_a)
w = pm.Normal("w", mu=μ_w, sigma=σ_w, shape=B.shape[1])
μ = pm.Deterministic(
"μ", a + pm.math.dot(np.asarray(B, order="F"), w.T
))
σ = pm.HalfNormal('σ', σ_σ)
S = pm.Normal("S", μ, σ, observed=regression_data['200'])
idata = pm.sample(1000, tune=1000, chains=2)
Variable | Mean | SD | HDI, 95% | |
---|---|---|---|---|
θ0 | −0.027 | 0.096 | −0.227 | 0.15 |
θ1 | 0.027 | 0.085 | −0.142 | 0.193 |
θ2 | −0.135 | 0.096 | −0.309 | 0.067 |
β0,0 | −0.609 | 0.299 | −1.162 | −0.013 |
β0,1 | 0.104 | 0.056 | −0.009 | 0.209 |
β0,2 | −1.076 | 0.314 | −1.702 | −0.487 |
β1,0 | 0.097 | 0.3 | −0.46 | 0.743 |
β1,1 | 0.142 | 0.14 | −0.117 | 0.433 |
β1,2 | −0.037 | 0.316 | −0.625 | 0.626 |
β2,0 | 0.118 | 0.299 | −0.509 | 0.677 |
β2,1 | 0.119 | 0.074 | −0.024 | 0.261 |
β2,2 | −0.287 | 0.312 | −0.905 | 0.306 |
β3,0 | 0.016 | 0.272 | −0.54 | 0.515 |
β3,1 | 0 | 0.069 | −0.141 | 0.135 |
β3,2 | −0.496 | 0.248 | −0.991 | −0.024 |
scaled η² | 0.93 | 0.04 | 0.852 | 1.006 |
ρ² | 1.0 | 0.099 | 0.812 | 1.194 |