PCA → GEE → Mortality Forecasting¶
Pipeline:
- Load data
- Build PCA-based features (no centering/scaling)
- Construct training frame and visualize PC1 over time
- Fit GEE models (Exchangeable and AR(1))
- Compare models via an approximate QIC
- Forecast PC1 via ARIMA(0,1,0) with drift and evaluate on the test set
- Plot predicted vs observed and groupwise MSE
Notes
- Expects
dat.csvanddattrn.csvin the working directory.
1. Setup & Imports¶
In [13]:
import warnings
warnings.filterwarnings("ignore")
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
from statsmodels.genmod.generalized_estimating_equations import GEE
from statsmodels.genmod.families import Gaussian
from statsmodels.genmod.cov_struct import Exchangeable, Autoregressive
from numpy.linalg import svd
from statsmodels.tsa.arima.model import ARIMA
# For reproducibility where stochastic procedures are involved
np.random.seed(42)
2. Load Data¶
In [14]:
# === Load data ===
import os
dat_path = "dat.csv"
dattrn_path = "dattrn.csv"
for p in [dat_path, dattrn_path]:
if not os.path.exists(p):
raise FileNotFoundError(f"Required file not found: {p}")
dat = pd.read_csv(dat_path, index_col=0)
dattrn = pd.read_csv(dattrn_path, index_col=0)
print("dat shape:", dat.shape)
print("dattrn shape:", dattrn.shape)
print("\nFirst few rows of dat:")
display(dat.head())
print("\nFirst few rows of dattrn:")
display(dattrn.head())
# Copies for training/test split
M0 = dat.copy()
M = dattrn.copy()
t_train = 20 # number of training years (1991–2010)
dat shape: (31, 364) dattrn shape: (20, 364) First few rows of dat:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ... | 81.3 | 82.3 | 83.3 | 84.3 | 85.3 | 86.3 | 87.3 | 88.3 | 89.3 | 90.3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1991 | -5.007169 | -7.562114 | -7.604435 | -8.296220 | -9.300894 | -8.292877 | -9.093741 | -9.609157 | -8.789093 | -8.962863 | ... | -1.899997 | -1.874836 | -1.681704 | -1.621221 | -1.564971 | -1.457627 | -1.363319 | -1.311694 | -1.264750 | -1.125200 |
| 1992 | -5.033727 | -7.474224 | -8.072629 | -7.621064 | -8.406935 | -8.622114 | -9.316603 | -8.635369 | -10.027536 | -8.954132 | ... | -1.981041 | -1.859571 | -1.811526 | -1.707015 | -1.589413 | -1.524062 | -1.405809 | -1.357191 | -1.188386 | -1.151491 |
| 1993 | -5.184065 | -7.343906 | -8.662821 | -8.525223 | -8.526250 | -8.234131 | -8.629759 | -9.100282 | -8.931456 | -8.532358 | ... | -2.011899 | -1.876370 | -1.810375 | -1.740609 | -1.665486 | -1.521295 | -1.415825 | -1.337151 | -1.349108 | -1.124594 |
| 1994 | -5.196172 | -7.613723 | -7.754131 | -8.261900 | -9.341846 | -9.341712 | -9.334660 | -8.918423 | -8.919920 | -8.647573 | ... | -2.091890 | -1.894156 | -1.830218 | -1.773546 | -1.679335 | -1.541609 | -1.471148 | -1.332995 | -1.342733 | -1.207652 |
| 1995 | -5.332980 | -7.958452 | -7.919381 | -8.451418 | -8.959733 | -9.633387 | -8.784101 | -9.111060 | -9.325247 | -9.615271 | ... | -1.968672 | -1.933890 | -1.793853 | -1.756636 | -1.657951 | -1.563924 | -1.414335 | -1.334577 | -1.248962 | -1.242920 |
5 rows × 364 columns
First few rows of dattrn:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ... | 81.3 | 82.3 | 83.3 | 84.3 | 85.3 | 86.3 | 87.3 | 88.3 | 89.3 | 90.3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1991 | -5.007169 | -7.562114 | -7.604435 | -8.296220 | -9.300894 | -8.292877 | -9.093741 | -9.609157 | -8.789093 | -8.962863 | ... | -1.899997 | -1.874836 | -1.681704 | -1.621221 | -1.564971 | -1.457627 | -1.363319 | -1.311694 | -1.264750 | -1.125200 |
| 1992 | -5.033727 | -7.474224 | -8.072629 | -7.621064 | -8.406935 | -8.622114 | -9.316603 | -8.635369 | -10.027536 | -8.954132 | ... | -1.981041 | -1.859571 | -1.811526 | -1.707015 | -1.589413 | -1.524062 | -1.405809 | -1.357191 | -1.188386 | -1.151491 |
| 1993 | -5.184065 | -7.343906 | -8.662821 | -8.525223 | -8.526250 | -8.234131 | -8.629759 | -9.100282 | -8.931456 | -8.532358 | ... | -2.011899 | -1.876370 | -1.810375 | -1.740609 | -1.665486 | -1.521295 | -1.415825 | -1.337151 | -1.349108 | -1.124594 |
| 1994 | -5.196172 | -7.613723 | -7.754131 | -8.261900 | -9.341846 | -9.341712 | -9.334660 | -8.918423 | -8.919920 | -8.647573 | ... | -2.091890 | -1.894156 | -1.830218 | -1.773546 | -1.679335 | -1.541609 | -1.471148 | -1.332995 | -1.342733 | -1.207652 |
| 1995 | -5.332980 | -7.958452 | -7.919381 | -8.451418 | -8.959733 | -9.633387 | -8.784101 | -9.111060 | -9.325247 | -9.615271 | ... | -1.968672 | -1.933890 | -1.793853 | -1.756636 | -1.657951 | -1.563924 | -1.414335 | -1.334577 | -1.248962 | -1.242920 |
5 rows × 364 columns
3. PCA Feature (no centering/scaling)¶
In [15]:
def pca_no_center_scale(X: np.ndarray) -> np.ndarray:
"""
First principal component scores WITHOUT centering/scaling.
Returns raw scores (U[:,0] * S[0]).
"""
U, S, Vt = svd(X, full_matrices=False)
return U[:, 0] * S[0]
4. Build kc1/kc2 for Training¶
In [16]:
# Split dattrn into 4 matrices of 91 columns each
M_blocks = [dattrn.iloc[:, i*91:(i+1)*91] for i in range(4)]
kc_list = []
for i in [0, 2]:
m1 = M_blocks[i].to_numpy()
m2 = M_blocks[i + 1].to_numpy()
# PC1 on subgroups (15 / 26 / 50) across paired blocks, repeat scores
result1 = np.tile(pca_no_center_scale(np.hstack((m1[:, 0:15], m2[:, 0:15]))), 15)
result2 = np.tile(pca_no_center_scale(np.hstack((m1[:, 15:41], m2[:, 15:41]))), 26)
result3 = np.tile(pca_no_center_scale(np.hstack((m1[:, 41:91], m2[:, 41:91]))), 50)
combined_results = np.concatenate([result1, result2, result3])
# Repeat combined results twice
kc_list.append(np.tile(combined_results, 2))
kc1 = np.concatenate(kc_list)
kc2 = kc1 ** 2
print("kc1 length:", len(kc1))
print("kc2 length:", len(kc2))
def r_index(x, i):
return x[i - 1]
print("\nExample elements (R-style indices):")
print("kc1[5] =", r_index(kc1, 5))
print("kc1[320] =", r_index(kc1, 320))
kc1 length: 7280 kc2 length: 7280 Example elements (R-style indices): kc1[5] = 46.73129272126278 kc1[320] = -55.41477115331864
5. Assemble Training Frame (ASDRs)¶
In [17]:
# --- Group labels ---
yngold = (
["Group[0,14]"] * (t_train * 15) +
["Group[15,40]"] * (t_train * 26) +
["Group[41,90]"] * (t_train * 50)
) * 4
# --- Gender / Country ---
gender = (["Female"] * (t_train * 91) + ["Male"] * (t_train * 91)) * 2
country = ["AUT"] * (t_train * 91 * 2) + ["CZE"] * (t_train * 91 * 2)
# --- Year, age, cohort ---
year = np.tile(np.arange(1991, 1991 + t_train), 4 * 91)
age = np.tile(np.repeat(np.arange(0, 91), t_train), 4)
cohort = year - age
# --- Response
MB = M.copy()
y = MB.to_numpy().ravel(order="F")
ASDRs = pd.DataFrame({
"kc1": kc1,
"kc2": kc2,
"cohort": cohort,
"y": y,
"age": age,
"gender": gender,
"Country": country,
"year": year,
"yngold": yngold
})
# Categorical conversions
ASDRs["age"] = pd.Categorical(ASDRs["age"], categories=np.arange(0, 91), ordered=True)
ASDRs["gender"] = pd.Categorical(ASDRs["gender"], categories=["Female", "Male"])
ASDRs["Country"]= pd.Categorical(ASDRs["Country"], categories=["AUT", "CZE"])
# Numeric/additional
ASDRs["agenum"] = ASDRs["age"].astype(int)
ASDRs["subject"] = ASDRs["Country"].astype(str) + "_" + ASDRs["gender"].astype(str) + "_" + ASDRs["age"].astype(str)
print(ASDRs.info())
display(ASDRs.head())
<class 'pandas.core.frame.DataFrame'> RangeIndex: 7280 entries, 0 to 7279 Data columns (total 11 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 kc1 7280 non-null float64 1 kc2 7280 non-null float64 2 cohort 7280 non-null int64 3 y 7280 non-null float64 4 age 7280 non-null category 5 gender 7280 non-null category 6 Country 7280 non-null category 7 year 7280 non-null int64 8 yngold 7280 non-null object 9 agenum 7280 non-null int64 10 subject 7280 non-null object dtypes: category(3), float64(3), int64(3), object(2) memory usage: 479.5+ KB None
| kc1 | kc2 | cohort | y | age | gender | Country | year | yngold | agenum | subject | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 46.026979 | 2118.482772 | 1991 | -5.007169 | 0 | Female | AUT | 1991 | Group[0,14] | 0 | AUT_Female_0 |
| 1 | 46.312937 | 2144.888129 | 1992 | -5.033727 | 0 | Female | AUT | 1992 | Group[0,14] | 0 | AUT_Female_0 |
| 2 | 45.289947 | 2051.179291 | 1993 | -5.184065 | 0 | Female | AUT | 1993 | Group[0,14] | 0 | AUT_Female_0 |
| 3 | 46.008251 | 2116.759137 | 1994 | -5.196172 | 0 | Female | AUT | 1994 | Group[0,14] | 0 | AUT_Female_0 |
| 4 | 46.731293 | 2183.813719 | 1995 | -5.332980 | 0 | Female | AUT | 1995 | Group[0,14] | 0 | AUT_Female_0 |
6. Plot: PC1 (kc1) over Years, Faceted by Country¶
In [18]:
ASDRsnw = ASDRs.copy()
ASDRsnw["year"] = ASDRsnw["year"].astype(float)
ASDRsnw = ASDRsnw.rename(columns={"yngold": "PC1"})
palette = {
"Group[0,14]": "red",
"Group[15,40]": "green",
"Group[41,90]": "blue"
}
sns.set_theme(style="whitegrid")
g = sns.FacetGrid(
ASDRsnw, col="Country", hue="PC1", palette=palette, height=6, aspect=19/9/2
)
g.map_dataframe(sns.lineplot, x="year", y="kc1", linewidth=0.8)
g.map_dataframe(sns.scatterplot, x="year", y="kc1", s=16)
g.set_axis_labels("Year", "Value")
g.add_legend(title="PC1")
for ax in g.axes.flat:
ax.tick_params(axis="x", rotation=90, labelsize=12)
ax.tick_params(axis="y", labelsize=12)
ax.set_xlabel("Year", fontsize=12)
ax.set_ylabel("Value", fontsize=12)
ax.set_title(ax.get_title().replace("Country = ", ""), fontsize=14)
plt.subplots_adjust(bottom=0.25)
plt.savefig("PC1-kct.pdf", bbox_inches="tight", dpi=300)
plt.show()
7. ASDR vs kc1 at Age 65 — Quadratic fit¶
In [19]:
ASDRs["age_num"] = ASDRs["age"].astype(int)
d65 = ASDRs[ASDRs["age_num"] == 65].copy()
sns.set_theme(style="whitegrid", font_scale=1.1)
def add_quadratic_line(data, color=None, **kwargs):
x_grid = np.linspace(data["kc1"].min(), data["kc1"].max(), 100)
coeffs = np.polyfit(data["kc1"], data["y"], 2)
y_pred = np.polyval(coeffs, x_grid)
plt.plot(x_grid, y_pred, color="black", linewidth=2)
g = sns.FacetGrid(d65, row="gender", col="Country", margin_titles=True, height=4.5, aspect=1.4)
g.map_dataframe(sns.scatterplot, x="kc1", y="y", color="red", alpha=0.6)
g.map_dataframe(add_quadratic_line)
g.set_axis_labels(r"$kc_t$", "Mortality (log)")
g.set_titles(row_template="{row_name}", col_template="{col_name}")
plt.subplots_adjust(top=0.85)
g.fig.suptitle("ASDR vs kc1 at Age 65 — Quadratic fit", fontsize=16)
plt.savefig("yverskct_quadratic.pdf", bbox_inches="tight", dpi=300)
plt.show()
8. GEE Models (Exchangeable vs AR(1))¶
In [20]:
# Weights
ASDRs["weights"] = np.where(ASDRs["agenum"] >= 65, 4.0, 1.0)
# Formula
formula = "y ~ gender + age + gender:age:kc1 + gender:age:kc2 + cohort"
geeEx = sm.GEE.from_formula(
formula=formula,
groups="subject",
time="year",
cov_struct=Exchangeable(),
family=Gaussian(),
weights=ASDRs["weights"],
data=ASDRs
).fit()
print("\n=== GEE (Exchangeable) Summary ===")
print(geeEx.summary())
geeAr1 = sm.GEE.from_formula(
formula=formula,
groups="subject",
time="year",
cov_struct=Autoregressive(),
family=Gaussian(),
weights=ASDRs["weights"],
data=ASDRs
).fit()
print("\n=== GEE (AR1) Summary ===")
print(geeAr1.summary())
print("\nCoefficients (Exchangeable):\n", geeEx.params)
print("\nCovariance matrix (Exchangeable):\n", geeEx.cov_params())
print("\nCoefficients (AR1):\n", geeAr1.params)
print("\nCovariance matrix (AR1):\n", geeAr1.cov_params())
=== GEE (Exchangeable) Summary ===
GEE Regression Results
===================================================================================
Dep. Variable: y No. Observations: 7280
Model: GEE No. clusters: 364
Method: Generalized Min. cluster size: 20
Estimating Equations Max. cluster size: 20
Family: Gaussian Mean cluster size: 20.0
Dependence structure: Exchangeable Num. iterations: 16
Date: Sun, 26 Oct 2025 Scale: 0.021
Covariance type: robust Time: 12:11:20
==============================================================================================
coef std err z P>|z| [0.025 0.975]
----------------------------------------------------------------------------------------------
Intercept 61.7001 10.201 6.049 0.000 41.707 81.693
gender[T.Male] -0.3363 0.756 -0.445 0.657 -1.819 1.146
age[T.1] -16.1496 18.478 -0.874 0.382 -52.366 20.067
age[T.2] -81.6107 27.762 -2.940 0.003 -136.024 -27.197
age[T.3] -45.8482 31.775 -1.443 0.149 -108.125 16.429
age[T.4] -50.0914 20.806 -2.408 0.016 -90.870 -9.313
age[T.5] -63.4445 21.113 -3.005 0.003 -104.824 -22.065
age[T.6] -96.1645 10.500 -9.158 0.000 -116.745 -75.584
age[T.7] -90.1308 45.969 -1.961 0.050 -180.229 -0.033
age[T.8] -77.3813 39.032 -1.983 0.047 -153.882 -0.880
age[T.9] -45.9248 24.148 -1.902 0.057 -93.254 1.404
age[T.10] -68.2907 18.694 -3.653 0.000 -104.930 -31.651
age[T.11] -70.6954 30.854 -2.291 0.022 -131.168 -10.223
age[T.12] -61.7428 23.469 -2.631 0.009 -107.741 -15.745
age[T.13] -119.1676 24.317 -4.901 0.000 -166.827 -71.508
age[T.14] -28.2506 12.443 -2.270 0.023 -52.639 -3.863
age[T.15] 25.2398 27.892 0.905 0.366 -29.428 79.907
age[T.16] -46.3578 35.763 -1.296 0.195 -116.452 23.736
age[T.17] -110.3236 37.317 -2.956 0.003 -183.464 -37.183
age[T.18] -190.1582 39.273 -4.842 0.000 -267.132 -113.184
age[T.19] -54.3600 13.155 -4.132 0.000 -80.143 -28.577
age[T.20] -10.8407 22.633 -0.479 0.632 -55.201 33.519
age[T.21] -13.6206 38.475 -0.354 0.723 -89.030 61.789
age[T.22] -64.3848 19.296 -3.337 0.001 -102.204 -26.565
age[T.23] -66.1394 18.086 -3.657 0.000 -101.588 -30.691
age[T.24] -45.3686 44.789 -1.013 0.311 -133.154 42.417
age[T.25] -36.7159 39.130 -0.938 0.348 -113.410 39.978
age[T.26] -92.7466 14.971 -6.195 0.000 -122.090 -63.403
age[T.27] -2.7171 53.078 -0.051 0.959 -106.748 101.313
age[T.28] -89.3870 17.492 -5.110 0.000 -123.671 -55.104
age[T.29] -49.9837 29.447 -1.697 0.090 -107.698 7.731
age[T.30] -40.7180 30.325 -1.343 0.179 -100.154 18.718
age[T.31] -89.9956 36.856 -2.442 0.015 -162.233 -17.758
age[T.32] -19.8573 55.260 -0.359 0.719 -128.165 88.451
age[T.33] -57.0438 28.651 -1.991 0.046 -113.198 -0.890
age[T.34] -72.5697 30.181 -2.404 0.016 -131.723 -13.416
age[T.35] -114.6544 35.393 -3.240 0.001 -184.022 -45.286
age[T.36] -101.3875 25.538 -3.970 0.000 -151.440 -51.335
age[T.37] -64.5945 16.665 -3.876 0.000 -97.256 -31.933
age[T.38] -81.6640 12.892 -6.334 0.000 -106.933 -56.395
age[T.39] -55.0012 21.035 -2.615 0.009 -96.228 -13.774
age[T.40] -131.8426 25.537 -5.163 0.000 -181.895 -81.791
age[T.41] -69.6035 11.921 -5.839 0.000 -92.968 -46.239
age[T.42] -77.0310 12.228 -6.300 0.000 -100.997 -53.065
age[T.43] -67.1191 13.151 -5.104 0.000 -92.896 -41.343
age[T.44] -74.4208 11.567 -6.434 0.000 -97.092 -51.750
age[T.45] -68.1888 13.419 -5.082 0.000 -94.489 -41.888
age[T.46] -63.7835 11.341 -5.624 0.000 -86.011 -41.556
age[T.47] -65.4292 11.783 -5.553 0.000 -88.523 -42.336
age[T.48] -69.2596 11.121 -6.228 0.000 -91.056 -47.463
age[T.49] -64.2824 10.444 -6.155 0.000 -84.752 -43.812
age[T.50] -67.9880 11.239 -6.050 0.000 -90.015 -45.961
age[T.51] -62.5443 10.287 -6.080 0.000 -82.707 -42.381
age[T.52] -65.8462 10.285 -6.402 0.000 -86.005 -45.687
age[T.53] -62.1764 10.523 -5.908 0.000 -82.802 -41.551
age[T.54] -59.2167 10.531 -5.623 0.000 -79.857 -38.576
age[T.55] -64.9972 10.385 -6.259 0.000 -85.350 -44.644
age[T.56] -57.1467 11.035 -5.179 0.000 -78.775 -35.518
age[T.57] -57.4153 10.663 -5.385 0.000 -78.314 -36.517
age[T.58] -54.9067 10.915 -5.030 0.000 -76.300 -33.514
age[T.59] -51.9222 11.797 -4.401 0.000 -75.043 -28.801
age[T.60] -53.1064 11.250 -4.721 0.000 -75.156 -31.057
age[T.61] -54.6574 11.447 -4.775 0.000 -77.093 -32.222
age[T.62] -53.8507 11.599 -4.643 0.000 -76.584 -31.118
age[T.63] -54.5702 11.118 -4.908 0.000 -76.362 -32.778
age[T.64] -60.5770 10.498 -5.770 0.000 -81.153 -40.001
age[T.65] -56.8784 11.446 -4.969 0.000 -79.313 -34.444
age[T.66] -58.3614 10.271 -5.682 0.000 -78.493 -38.230
age[T.67] -59.8600 10.516 -5.692 0.000 -80.471 -39.249
age[T.68] -59.8500 10.217 -5.858 0.000 -79.876 -39.824
age[T.69] -62.9341 10.387 -6.059 0.000 -83.292 -42.576
age[T.70] -60.9039 10.286 -5.921 0.000 -81.064 -40.744
age[T.71] -63.6197 10.283 -6.187 0.000 -83.774 -43.465
age[T.72] -60.6205 10.175 -5.958 0.000 -80.563 -40.678
age[T.73] -62.1005 10.288 -6.036 0.000 -82.265 -41.936
age[T.74] -61.2670 10.223 -5.993 0.000 -81.304 -41.230
age[T.75] -66.0058 10.300 -6.408 0.000 -86.194 -45.818
age[T.76] -60.7683 10.255 -5.925 0.000 -80.869 -40.668
age[T.77] -61.5279 10.242 -6.007 0.000 -81.602 -41.454
age[T.78] -62.2699 10.327 -6.030 0.000 -82.510 -42.029
age[T.79] -63.4822 10.338 -6.141 0.000 -83.744 -43.220
age[T.80] -62.4250 10.311 -6.054 0.000 -82.633 -42.216
age[T.81] -62.8279 10.257 -6.125 0.000 -82.932 -42.724
age[T.82] -63.1900 10.227 -6.179 0.000 -83.234 -43.146
age[T.83] -63.1808 10.309 -6.129 0.000 -83.386 -42.976
age[T.84] -63.9417 10.198 -6.270 0.000 -83.930 -43.954
age[T.85] -63.9654 10.224 -6.256 0.000 -84.004 -43.926
age[T.86] -62.2358 10.194 -6.105 0.000 -82.216 -42.256
age[T.87] -62.8609 10.260 -6.127 0.000 -82.971 -42.751
age[T.88] -62.8768 10.183 -6.175 0.000 -82.834 -42.919
age[T.89] -64.0033 10.215 -6.266 0.000 -84.024 -43.982
age[T.90] -59.8182 10.172 -5.880 0.000 -79.756 -39.880
gender[Female]:age[0]:kc1 -2.7438 0.431 -6.364 0.000 -3.589 -1.899
gender[Male]:age[0]:kc1 -2.7293 0.430 -6.346 0.000 -3.572 -1.886
gender[Female]:age[1]:kc1 -2.2134 0.659 -3.358 0.001 -3.505 -0.922
gender[Male]:age[1]:kc1 -2.1365 0.664 -3.220 0.001 -3.437 -0.836
gender[Female]:age[2]:kc1 0.6165 1.101 0.560 0.575 -1.541 2.774
gender[Male]:age[2]:kc1 0.6226 1.090 0.571 0.568 -1.514 2.759
gender[Female]:age[3]:kc1 -0.8348 1.287 -0.649 0.517 -3.357 1.688
gender[Male]:age[3]:kc1 -0.9433 1.282 -0.736 0.462 -3.455 1.569
gender[Female]:age[4]:kc1 -0.7537 0.775 -0.972 0.331 -2.273 0.766
gender[Male]:age[4]:kc1 -0.7179 0.779 -0.922 0.357 -2.244 0.808
gender[Female]:age[5]:kc1 -0.1423 0.785 -0.181 0.856 -1.682 1.397
gender[Male]:age[5]:kc1 -0.1134 0.792 -0.143 0.886 -1.666 1.439
gender[Female]:age[6]:kc1 1.2352 0.112 10.999 0.000 1.015 1.455
gender[Male]:age[6]:kc1 1.2668 0.115 10.985 0.000 1.041 1.493
gender[Female]:age[7]:kc1 0.9395 1.907 0.493 0.622 -2.798 4.677
gender[Male]:age[7]:kc1 1.0646 1.926 0.553 0.580 -2.710 4.840
gender[Female]:age[8]:kc1 0.4432 1.619 0.274 0.784 -2.729 3.616
gender[Male]:age[8]:kc1 0.4746 1.639 0.290 0.772 -2.738 3.688
gender[Female]:age[9]:kc1 -0.9397 0.958 -0.981 0.327 -2.818 0.938
gender[Male]:age[9]:kc1 -0.9221 0.949 -0.972 0.331 -2.781 0.937
gender[Female]:age[10]:kc1 -0.0106 0.699 -0.015 0.988 -1.381 1.359
gender[Male]:age[10]:kc1 -0.0142 0.667 -0.021 0.983 -1.322 1.293
gender[Female]:age[11]:kc1 0.0886 1.234 0.072 0.943 -2.330 2.507
gender[Male]:age[11]:kc1 0.0849 1.270 0.067 0.947 -2.405 2.575
gender[Female]:age[12]:kc1 -0.2633 0.897 -0.294 0.769 -2.021 1.494
gender[Male]:age[12]:kc1 -0.1952 0.887 -0.220 0.826 -1.934 1.544
gender[Female]:age[13]:kc1 2.1311 0.953 2.236 0.025 0.263 3.999
gender[Male]:age[13]:kc1 2.1750 0.946 2.300 0.021 0.321 4.029
gender[Female]:age[14]:kc1 -1.7950 0.305 -5.876 0.000 -2.394 -1.196
gender[Male]:age[14]:kc1 -1.6944 0.318 -5.320 0.000 -2.319 -1.070
gender[Female]:age[15]:kc1 3.5993 0.979 3.678 0.000 1.681 5.517
gender[Male]:age[15]:kc1 3.5210 0.998 3.528 0.000 1.565 5.477
gender[Female]:age[16]:kc1 0.8152 1.288 0.633 0.527 -1.709 3.339
gender[Male]:age[16]:kc1 0.7634 1.294 0.590 0.555 -1.772 3.299
gender[Female]:age[17]:kc1 -1.6082 1.341 -1.199 0.230 -4.236 1.020
gender[Male]:age[17]:kc1 -1.6805 1.348 -1.246 0.213 -4.323 0.962
gender[Female]:age[18]:kc1 -4.6712 1.419 -3.291 0.001 -7.453 -1.889
gender[Male]:age[18]:kc1 -4.6691 1.430 -3.265 0.001 -7.472 -1.866
gender[Female]:age[19]:kc1 0.5533 0.313 1.769 0.077 -0.060 1.166
gender[Male]:age[19]:kc1 0.4244 0.304 1.398 0.162 -0.171 1.019
gender[Female]:age[20]:kc1 2.1699 0.764 2.841 0.004 0.673 3.667
gender[Male]:age[20]:kc1 2.1042 0.747 2.817 0.005 0.640 3.568
gender[Female]:age[21]:kc1 2.0728 1.407 1.474 0.141 -0.684 4.830
gender[Male]:age[21]:kc1 2.0045 1.393 1.439 0.150 -0.725 4.734
gender[Female]:age[22]:kc1 0.1566 0.635 0.247 0.805 -1.087 1.400
gender[Male]:age[22]:kc1 0.0800 0.630 0.127 0.899 -1.154 1.314
gender[Female]:age[23]:kc1 0.0462 0.549 0.084 0.933 -1.030 1.122
gender[Male]:age[23]:kc1 0.0216 0.563 0.038 0.969 -1.082 1.125
gender[Female]:age[24]:kc1 0.8178 1.643 0.498 0.619 -2.402 4.038
gender[Male]:age[24]:kc1 0.8017 1.647 0.487 0.626 -2.426 4.030
gender[Female]:age[25]:kc1 1.1732 1.413 0.831 0.406 -1.595 3.942
gender[Male]:age[25]:kc1 1.1113 1.422 0.781 0.435 -1.676 3.899
gender[Female]:age[26]:kc1 -0.9752 0.392 -2.486 0.013 -1.744 -0.206
gender[Male]:age[26]:kc1 -0.9852 0.404 -2.440 0.015 -1.776 -0.194
gender[Female]:age[27]:kc1 2.4624 1.967 1.252 0.211 -1.392 6.317
gender[Male]:age[27]:kc1 2.3961 1.976 1.212 0.225 -1.478 6.270
gender[Female]:age[28]:kc1 -0.8288 0.539 -1.537 0.124 -1.886 0.228
gender[Male]:age[28]:kc1 -0.8925 0.538 -1.660 0.097 -1.946 0.161
gender[Female]:age[29]:kc1 0.6672 1.027 0.649 0.516 -1.346 2.681
gender[Male]:age[29]:kc1 0.6031 1.032 0.584 0.559 -1.420 2.626
gender[Female]:age[30]:kc1 1.0147 1.070 0.949 0.343 -1.082 3.111
gender[Male]:age[30]:kc1 0.9535 1.078 0.884 0.376 -1.159 3.066
gender[Female]:age[31]:kc1 -0.9214 1.335 -0.690 0.490 -3.537 1.695
gender[Male]:age[31]:kc1 -0.9296 1.340 -0.694 0.488 -3.556 1.697
gender[Female]:age[32]:kc1 1.7617 2.048 0.860 0.390 -2.253 5.776
gender[Male]:age[32]:kc1 1.6885 2.048 0.825 0.410 -2.325 5.702
gender[Female]:age[33]:kc1 0.3452 1.015 0.340 0.734 -1.645 2.335
gender[Male]:age[33]:kc1 0.3225 1.000 0.323 0.747 -1.637 2.282
gender[Female]:age[34]:kc1 -0.1954 1.068 -0.183 0.855 -2.289 1.898
gender[Male]:age[34]:kc1 -0.2510 1.073 -0.234 0.815 -2.355 1.853
gender[Female]:age[35]:kc1 -1.8003 1.279 -1.408 0.159 -4.306 0.706
gender[Male]:age[35]:kc1 -1.8749 1.278 -1.467 0.142 -4.380 0.630
gender[Female]:age[36]:kc1 -1.2843 0.900 -1.427 0.153 -3.048 0.479
gender[Male]:age[36]:kc1 -1.3935 0.877 -1.588 0.112 -3.113 0.326
gender[Female]:age[37]:kc1 0.0642 0.500 0.128 0.898 -0.915 1.043
gender[Male]:age[37]:kc1 0.0279 0.499 0.056 0.955 -0.951 1.007
gender[Female]:age[38]:kc1 -0.5790 0.300 -1.927 0.054 -1.168 0.010
gender[Male]:age[38]:kc1 -0.6306 0.297 -2.124 0.034 -1.213 -0.049
gender[Female]:age[39]:kc1 0.3996 0.696 0.574 0.566 -0.965 1.764
gender[Male]:age[39]:kc1 0.3728 0.691 0.540 0.590 -0.981 1.727
gender[Female]:age[40]:kc1 -2.4782 0.890 -2.785 0.005 -4.222 -0.734
gender[Male]:age[40]:kc1 -2.5434 0.883 -2.880 0.004 -4.274 -0.813
gender[Female]:age[41]:kc1 -0.0699 0.295 -0.237 0.813 -0.648 0.508
gender[Male]:age[41]:kc1 -0.1637 0.291 -0.562 0.574 -0.735 0.407
gender[Female]:age[42]:kc1 -0.4372 0.319 -1.369 0.171 -1.063 0.188
gender[Male]:age[42]:kc1 -0.5170 0.319 -1.619 0.105 -1.143 0.109
gender[Female]:age[43]:kc1 0.0258 0.399 0.065 0.948 -0.755 0.807
gender[Male]:age[43]:kc1 -0.0564 0.387 -0.146 0.884 -0.815 0.702
gender[Female]:age[44]:kc1 -0.3087 0.262 -1.176 0.239 -0.823 0.206
gender[Male]:age[44]:kc1 -0.4084 0.258 -1.586 0.113 -0.913 0.096
gender[Female]:age[45]:kc1 -0.0394 0.419 -0.094 0.925 -0.860 0.782
gender[Male]:age[45]:kc1 -0.1185 0.407 -0.291 0.771 -0.916 0.679
gender[Female]:age[46]:kc1 0.1765 0.241 0.734 0.463 -0.295 0.648
gender[Male]:age[46]:kc1 0.0994 0.233 0.426 0.670 -0.358 0.556
gender[Female]:age[47]:kc1 0.0903 0.284 0.317 0.751 -0.467 0.648
gender[Male]:age[47]:kc1 -0.0012 0.276 -0.004 0.997 -0.543 0.540
gender[Female]:age[48]:kc1 -0.0907 0.217 -0.417 0.677 -0.517 0.335
gender[Male]:age[48]:kc1 -0.1763 0.210 -0.840 0.401 -0.587 0.235
gender[Female]:age[49]:kc1 0.1402 0.116 1.209 0.227 -0.087 0.368
gender[Male]:age[49]:kc1 0.0561 0.115 0.488 0.626 -0.169 0.282
gender[Female]:age[50]:kc1 -0.0362 0.231 -0.157 0.875 -0.489 0.416
gender[Male]:age[50]:kc1 -0.1262 0.223 -0.565 0.572 -0.564 0.311
gender[Female]:age[51]:kc1 0.2218 0.076 2.903 0.004 0.072 0.372
gender[Male]:age[51]:kc1 0.1340 0.077 1.734 0.083 -0.017 0.285
gender[Female]:age[52]:kc1 0.0742 0.076 0.970 0.332 -0.076 0.224
gender[Male]:age[52]:kc1 -0.0264 0.078 -0.340 0.734 -0.179 0.126
gender[Female]:age[53]:kc1 0.2288 0.129 1.776 0.076 -0.024 0.481
gender[Male]:age[53]:kc1 0.1416 0.132 1.070 0.284 -0.118 0.401
gender[Female]:age[54]:kc1 0.3620 0.130 2.793 0.005 0.108 0.616
gender[Male]:age[54]:kc1 0.2872 0.135 2.135 0.033 0.024 0.551
gender[Female]:age[55]:kc1 0.0832 0.100 0.830 0.407 -0.113 0.280
gender[Male]:age[55]:kc1 -0.0029 0.105 -0.028 0.978 -0.209 0.203
gender[Female]:age[56]:kc1 0.4526 0.200 2.258 0.024 0.060 0.845
gender[Male]:age[56]:kc1 0.3703 0.205 1.803 0.071 -0.032 0.773
gender[Female]:age[57]:kc1 0.4267 0.152 2.809 0.005 0.129 0.724
gender[Male]:age[57]:kc1 0.3544 0.153 2.315 0.021 0.054 0.654
gender[Female]:age[58]:kc1 0.5485 0.186 2.941 0.003 0.183 0.914
gender[Male]:age[58]:kc1 0.4684 0.189 2.483 0.013 0.099 0.838
gender[Female]:age[59]:kc1 0.6732 0.279 2.414 0.016 0.127 1.220
gender[Male]:age[59]:kc1 0.5983 0.282 2.118 0.034 0.045 1.152
gender[Female]:age[60]:kc1 0.6193 0.230 2.698 0.007 0.169 1.069
gender[Male]:age[60]:kc1 0.5340 0.224 2.382 0.017 0.095 0.973
gender[Female]:age[61]:kc1 0.5352 0.247 2.163 0.031 0.050 1.020
gender[Male]:age[61]:kc1 0.4599 0.244 1.883 0.060 -0.019 0.939
gender[Female]:age[62]:kc1 0.5618 0.262 2.143 0.032 0.048 1.076
gender[Male]:age[62]:kc1 0.4904 0.258 1.902 0.057 -0.015 0.996
gender[Female]:age[63]:kc1 0.5216 0.211 2.476 0.013 0.109 0.934
gender[Male]:age[63]:kc1 0.4522 0.211 2.144 0.032 0.039 0.866
gender[Female]:age[64]:kc1 0.2292 0.125 1.838 0.066 -0.015 0.474
gender[Male]:age[64]:kc1 0.1638 0.122 1.344 0.179 -0.075 0.403
gender[Female]:age[65]:kc1 0.3919 0.250 1.565 0.118 -0.099 0.883
gender[Male]:age[65]:kc1 0.3294 0.243 1.357 0.175 -0.146 0.805
gender[Female]:age[66]:kc1 0.3110 0.073 4.233 0.000 0.167 0.455
gender[Male]:age[66]:kc1 0.2610 0.070 3.708 0.000 0.123 0.399
gender[Female]:age[67]:kc1 0.2381 0.131 1.822 0.068 -0.018 0.494
gender[Male]:age[67]:kc1 0.1824 0.125 1.455 0.146 -0.063 0.428
gender[Female]:age[68]:kc1 0.2272 0.054 4.196 0.000 0.121 0.333
gender[Male]:age[68]:kc1 0.1763 0.052 3.420 0.001 0.075 0.277
gender[Female]:age[69]:kc1 0.0745 0.104 0.717 0.473 -0.129 0.278
gender[Male]:age[69]:kc1 0.0240 0.101 0.238 0.812 -0.174 0.222
gender[Female]:age[70]:kc1 0.1641 0.078 2.114 0.035 0.012 0.316
gender[Male]:age[70]:kc1 0.1207 0.076 1.589 0.112 -0.028 0.270
gender[Female]:age[71]:kc1 0.0247 0.074 0.335 0.738 -0.120 0.169
gender[Male]:age[71]:kc1 -0.0150 0.078 -0.193 0.847 -0.168 0.138
gender[Female]:age[72]:kc1 0.1603 0.030 5.373 0.000 0.102 0.219
gender[Male]:age[72]:kc1 0.1285 0.030 4.340 0.000 0.070 0.187
gender[Female]:age[73]:kc1 0.0884 0.079 1.123 0.261 -0.066 0.243
gender[Male]:age[73]:kc1 0.0599 0.075 0.796 0.426 -0.088 0.207
gender[Female]:age[74]:kc1 0.1281 0.057 2.245 0.025 0.016 0.240
gender[Male]:age[74]:kc1 0.1020 0.055 1.853 0.064 -0.006 0.210
gender[Female]:age[75]:kc1 -0.0976 0.082 -1.187 0.235 -0.259 0.064
gender[Male]:age[75]:kc1 -0.1259 0.079 -1.587 0.112 -0.281 0.030
gender[Female]:age[76]:kc1 0.1423 0.068 2.080 0.038 0.008 0.276
gender[Male]:age[76]:kc1 0.1214 0.066 1.846 0.065 -0.008 0.250
gender[Female]:age[77]:kc1 0.1076 0.064 1.680 0.093 -0.018 0.233
gender[Male]:age[77]:kc1 0.0815 0.061 1.329 0.184 -0.039 0.202
gender[Female]:age[78]:kc1 0.0660 0.091 0.729 0.466 -0.111 0.243
gender[Male]:age[78]:kc1 0.0456 0.086 0.530 0.596 -0.123 0.214
gender[Female]:age[79]:kc1 0.0065 0.092 0.071 0.943 -0.174 0.187
gender[Male]:age[79]:kc1 -0.0158 0.090 -0.175 0.861 -0.193 0.161
gender[Female]:age[80]:kc1 0.0578 0.084 0.693 0.489 -0.106 0.221
gender[Male]:age[80]:kc1 0.0354 0.083 0.427 0.669 -0.127 0.198
gender[Female]:age[81]:kc1 0.0349 0.068 0.516 0.606 -0.098 0.168
gender[Male]:age[81]:kc1 0.0163 0.067 0.244 0.808 -0.115 0.148
gender[Female]:age[82]:kc1 0.0179 0.058 0.307 0.759 -0.096 0.132
gender[Male]:age[82]:kc1 0.0007 0.056 0.013 0.990 -0.109 0.111
gender[Female]:age[83]:kc1 0.0177 0.083 0.214 0.830 -0.144 0.180
gender[Male]:age[83]:kc1 -0.0032 0.084 -0.038 0.970 -0.167 0.161
gender[Female]:age[84]:kc1 -0.0178 0.043 -0.410 0.682 -0.103 0.067
gender[Male]:age[84]:kc1 -0.0401 0.046 -0.881 0.379 -0.129 0.049
gender[Female]:age[85]:kc1 -0.0165 0.057 -0.287 0.774 -0.129 0.096
gender[Male]:age[85]:kc1 -0.0395 0.055 -0.715 0.475 -0.148 0.069
gender[Female]:age[86]:kc1 0.0602 0.042 1.425 0.154 -0.023 0.143
gender[Male]:age[86]:kc1 0.0401 0.042 0.964 0.335 -0.041 0.122
gender[Female]:age[87]:kc1 0.0291 0.068 0.429 0.668 -0.104 0.162
gender[Male]:age[87]:kc1 0.0074 0.071 0.104 0.917 -0.132 0.146
gender[Female]:age[88]:kc1 0.0250 0.035 0.707 0.480 -0.044 0.094
gender[Male]:age[88]:kc1 0.0034 0.035 0.095 0.924 -0.066 0.072
gender[Female]:age[89]:kc1 -0.0292 0.051 -0.577 0.564 -0.129 0.070
gender[Male]:age[89]:kc1 -0.0456 0.054 -0.844 0.399 -0.152 0.060
gender[Female]:age[90]:kc1 0.1656 0.029 5.809 0.000 0.110 0.221
gender[Male]:age[90]:kc1 0.1493 0.029 5.196 0.000 0.093 0.206
gender[Female]:age[0]:kc2 0.0272 0.005 6.008 0.000 0.018 0.036
gender[Male]:age[0]:kc2 0.0272 0.005 5.999 0.000 0.018 0.036
gender[Female]:age[1]:kc2 0.0222 0.007 3.152 0.002 0.008 0.036
gender[Male]:age[1]:kc2 0.0208 0.007 2.910 0.004 0.007 0.035
gender[Female]:age[2]:kc2 -0.0086 0.012 -0.733 0.463 -0.032 0.014
gender[Male]:age[2]:kc2 -0.0085 0.011 -0.745 0.456 -0.031 0.014
gender[Female]:age[3]:kc2 0.0059 0.014 0.432 0.666 -0.021 0.033
gender[Male]:age[3]:kc2 0.0085 0.014 0.627 0.531 -0.018 0.035
gender[Female]:age[4]:kc2 0.0060 0.008 0.727 0.467 -0.010 0.022
gender[Male]:age[4]:kc2 0.0056 0.008 0.667 0.505 -0.011 0.022
gender[Female]:age[5]:kc2 -0.0010 0.008 -0.118 0.906 -0.017 0.015
gender[Male]:age[5]:kc2 -0.0013 0.008 -0.158 0.875 -0.018 0.015
gender[Female]:age[6]:kc2 -0.0155 0.001 -13.333 0.000 -0.018 -0.013
gender[Male]:age[6]:kc2 -0.0159 0.001 -12.729 0.000 -0.018 -0.013
gender[Female]:age[7]:kc2 -0.0119 0.020 -0.588 0.557 -0.052 0.028
gender[Male]:age[7]:kc2 -0.0144 0.021 -0.695 0.487 -0.055 0.026
gender[Female]:age[8]:kc2 -0.0072 0.017 -0.414 0.679 -0.041 0.027
gender[Male]:age[8]:kc2 -0.0075 0.018 -0.425 0.671 -0.042 0.027
gender[Female]:age[9]:kc2 0.0080 0.010 0.761 0.447 -0.013 0.029
gender[Male]:age[9]:kc2 0.0079 0.010 0.772 0.440 -0.012 0.028
gender[Female]:age[10]:kc2 -0.0017 0.008 -0.212 0.832 -0.017 0.014
gender[Male]:age[10]:kc2 -0.0012 0.007 -0.174 0.861 -0.015 0.013
gender[Female]:age[11]:kc2 -0.0027 0.013 -0.207 0.836 -0.028 0.023
gender[Male]:age[11]:kc2 -0.0023 0.014 -0.169 0.865 -0.029 0.025
gender[Female]:age[12]:kc2 0.0008 0.009 0.080 0.936 -0.018 0.019
gender[Male]:age[12]:kc2 -0.0003 0.009 -0.034 0.973 -0.019 0.018
gender[Female]:age[13]:kc2 -0.0241 0.010 -2.345 0.019 -0.044 -0.004
gender[Male]:age[13]:kc2 -0.0247 0.010 -2.440 0.015 -0.045 -0.005
gender[Female]:age[14]:kc2 0.0184 0.003 5.635 0.000 0.012 0.025
gender[Male]:age[14]:kc2 0.0165 0.004 4.686 0.000 0.010 0.023
gender[Female]:age[15]:kc2 0.0334 0.009 3.623 0.000 0.015 0.051
gender[Male]:age[15]:kc2 0.0322 0.010 3.354 0.001 0.013 0.051
gender[Female]:age[16]:kc2 0.0064 0.012 0.532 0.595 -0.017 0.030
gender[Male]:age[16]:kc2 0.0058 0.012 0.477 0.633 -0.018 0.030
gender[Female]:age[17]:kc2 -0.0165 0.013 -1.317 0.188 -0.041 0.008
gender[Male]:age[17]:kc2 -0.0174 0.013 -1.376 0.169 -0.042 0.007
gender[Female]:age[18]:kc2 -0.0458 0.013 -3.454 0.001 -0.072 -0.020
gender[Male]:age[18]:kc2 -0.0452 0.013 -3.359 0.001 -0.072 -0.019
gender[Female]:age[19]:kc2 0.0044 0.003 1.507 0.132 -0.001 0.010
gender[Male]:age[19]:kc2 0.0025 0.003 0.905 0.366 -0.003 0.008
gender[Female]:age[20]:kc2 0.0194 0.007 2.692 0.007 0.005 0.034
gender[Male]:age[20]:kc2 0.0187 0.007 2.709 0.007 0.005 0.032
gender[Female]:age[21]:kc2 0.0186 0.013 1.392 0.164 -0.008 0.045
gender[Male]:age[21]:kc2 0.0178 0.013 1.364 0.173 -0.008 0.043
gender[Female]:age[22]:kc2 0.0005 0.006 0.075 0.940 -0.012 0.013
gender[Male]:age[22]:kc2 -0.0004 0.006 -0.069 0.945 -0.012 0.011
gender[Female]:age[23]:kc2 -0.0010 0.005 -0.196 0.845 -0.011 0.009
gender[Male]:age[23]:kc2 -0.0009 0.005 -0.168 0.867 -0.011 0.009
gender[Female]:age[24]:kc2 0.0062 0.015 0.401 0.689 -0.024 0.037
gender[Male]:age[24]:kc2 0.0064 0.016 0.413 0.679 -0.024 0.037
gender[Female]:age[25]:kc2 0.0098 0.013 0.742 0.458 -0.016 0.036
gender[Male]:age[25]:kc2 0.0092 0.013 0.686 0.493 -0.017 0.035
gender[Female]:age[26]:kc2 -0.0108 0.004 -3.028 0.002 -0.018 -0.004
gender[Male]:age[26]:kc2 -0.0104 0.004 -2.819 0.005 -0.018 -0.003
gender[Female]:age[27]:kc2 0.0220 0.019 1.187 0.235 -0.014 0.058
gender[Male]:age[27]:kc2 0.0213 0.019 1.137 0.256 -0.015 0.058
gender[Female]:age[28]:kc2 -0.0092 0.005 -1.795 0.073 -0.019 0.001
gender[Male]:age[28]:kc2 -0.0099 0.005 -1.946 0.052 -0.020 6.99e-05
gender[Female]:age[29]:kc2 0.0050 0.010 0.526 0.599 -0.014 0.024
gender[Male]:age[29]:kc2 0.0043 0.010 0.448 0.654 -0.015 0.023
gender[Female]:age[30]:kc2 0.0083 0.010 0.832 0.405 -0.011 0.028
gender[Male]:age[30]:kc2 0.0076 0.010 0.752 0.452 -0.012 0.028
gender[Female]:age[31]:kc2 -0.0106 0.013 -0.846 0.397 -0.035 0.014
gender[Male]:age[31]:kc2 -0.0103 0.013 -0.816 0.415 -0.035 0.014
gender[Female]:age[32]:kc2 0.0150 0.019 0.779 0.436 -0.023 0.053
gender[Male]:age[32]:kc2 0.0141 0.019 0.731 0.465 -0.024 0.052
gender[Female]:age[33]:kc2 0.0016 0.010 0.166 0.868 -0.017 0.020
gender[Male]:age[33]:kc2 0.0016 0.009 0.172 0.864 -0.017 0.020
gender[Female]:age[34]:kc2 -0.0030 0.010 -0.303 0.762 -0.023 0.017
gender[Male]:age[34]:kc2 -0.0037 0.010 -0.362 0.717 -0.024 0.016
gender[Female]:age[35]:kc2 -0.0183 0.012 -1.519 0.129 -0.042 0.005
gender[Male]:age[35]:kc2 -0.0193 0.012 -1.603 0.109 -0.043 0.004
gender[Female]:age[36]:kc2 -0.0132 0.009 -1.535 0.125 -0.030 0.004
gender[Male]:age[36]:kc2 -0.0149 0.008 -1.819 0.069 -0.031 0.001
gender[Female]:age[37]:kc2 -0.0009 0.005 -0.186 0.853 -0.010 0.008
gender[Male]:age[37]:kc2 -0.0012 0.005 -0.247 0.805 -0.010 0.008
gender[Female]:age[38]:kc2 -0.0069 0.003 -2.425 0.015 -0.012 -0.001
gender[Male]:age[38]:kc2 -0.0075 0.003 -2.683 0.007 -0.013 -0.002
gender[Female]:age[39]:kc2 0.0021 0.007 0.320 0.749 -0.011 0.015
gender[Male]:age[39]:kc2 0.0020 0.006 0.309 0.757 -0.011 0.015
gender[Female]:age[40]:kc2 -0.0248 0.008 -2.931 0.003 -0.041 -0.008
gender[Male]:age[40]:kc2 -0.0256 0.008 -3.081 0.002 -0.042 -0.009
gender[Female]:age[41]:kc2 -0.0019 0.003 -0.542 0.588 -0.009 0.005
gender[Male]:age[41]:kc2 -0.0035 0.003 -1.025 0.305 -0.010 0.003
gender[Female]:age[42]:kc2 -0.0063 0.004 -1.697 0.090 -0.014 0.001
gender[Male]:age[42]:kc2 -0.0076 0.004 -2.049 0.040 -0.015 -0.000
gender[Female]:age[43]:kc2 -0.0009 0.005 -0.185 0.853 -0.010 0.008
gender[Male]:age[43]:kc2 -0.0022 0.004 -0.492 0.623 -0.011 0.007
gender[Female]:age[44]:kc2 -0.0046 0.003 -1.507 0.132 -0.011 0.001
gender[Male]:age[44]:kc2 -0.0064 0.003 -2.136 0.033 -0.012 -0.001
gender[Female]:age[45]:kc2 -0.0017 0.005 -0.341 0.733 -0.011 0.008
gender[Male]:age[45]:kc2 -0.0030 0.005 -0.626 0.531 -0.012 0.006
gender[Female]:age[46]:kc2 0.0010 0.003 0.350 0.726 -0.005 0.007
gender[Male]:age[46]:kc2 -0.0002 0.003 -0.078 0.938 -0.005 0.005
gender[Female]:age[47]:kc2 -6.118e-05 0.003 -0.018 0.985 -0.007 0.007
gender[Male]:age[47]:kc2 -0.0016 0.003 -0.500 0.617 -0.008 0.005
gender[Female]:age[48]:kc2 -0.0021 0.003 -0.827 0.408 -0.007 0.003
gender[Male]:age[48]:kc2 -0.0035 0.002 -1.453 0.146 -0.008 0.001
gender[Female]:age[49]:kc2 0.0006 0.001 0.422 0.673 -0.002 0.003
gender[Male]:age[49]:kc2 -0.0008 0.001 -0.572 0.567 -0.003 0.002
gender[Female]:age[50]:kc2 -0.0015 0.003 -0.532 0.595 -0.007 0.004
gender[Male]:age[50]:kc2 -0.0030 0.003 -1.137 0.256 -0.008 0.002
gender[Female]:age[51]:kc2 0.0016 0.001 1.873 0.061 -7.63e-05 0.003
gender[Male]:age[51]:kc2 0.0002 0.001 0.223 0.824 -0.002 0.002
gender[Female]:age[52]:kc2 3.55e-05 0.001 0.040 0.968 -0.002 0.002
gender[Male]:age[52]:kc2 -0.0017 0.001 -1.830 0.067 -0.003 0.000
gender[Female]:age[53]:kc2 0.0017 0.002 1.135 0.257 -0.001 0.005
gender[Male]:age[53]:kc2 0.0003 0.002 0.182 0.856 -0.003 0.003
gender[Female]:age[54]:kc2 0.0032 0.002 2.144 0.032 0.000 0.006
gender[Male]:age[54]:kc2 0.0021 0.002 1.328 0.184 -0.001 0.005
gender[Female]:age[55]:kc2 -6.994e-05 0.001 -0.060 0.952 -0.002 0.002
gender[Male]:age[55]:kc2 -0.0014 0.001 -1.158 0.247 -0.004 0.001
gender[Female]:age[56]:kc2 0.0043 0.002 1.854 0.064 -0.000 0.009
gender[Male]:age[56]:kc2 0.0030 0.002 1.252 0.211 -0.002 0.008
gender[Female]:age[57]:kc2 0.0039 0.002 2.205 0.027 0.000 0.007
gender[Male]:age[57]:kc2 0.0029 0.002 1.604 0.109 -0.001 0.006
gender[Female]:age[58]:kc2 0.0054 0.002 2.500 0.012 0.001 0.010
gender[Male]:age[58]:kc2 0.0042 0.002 1.910 0.056 -0.000 0.009
gender[Female]:age[59]:kc2 0.0068 0.003 2.092 0.036 0.000 0.013
gender[Male]:age[59]:kc2 0.0056 0.003 1.716 0.086 -0.001 0.012
gender[Female]:age[60]:kc2 0.0062 0.003 2.294 0.022 0.001 0.011
gender[Male]:age[60]:kc2 0.0048 0.003 1.875 0.061 -0.000 0.010
gender[Female]:age[61]:kc2 0.0051 0.003 1.785 0.074 -0.001 0.011
gender[Male]:age[61]:kc2 0.0040 0.003 1.426 0.154 -0.002 0.010
gender[Female]:age[62]:kc2 0.0054 0.003 1.749 0.080 -0.001 0.011
gender[Male]:age[62]:kc2 0.0043 0.003 1.472 0.141 -0.001 0.010
gender[Female]:age[63]:kc2 0.0049 0.002 1.988 0.047 6.91e-05 0.010
gender[Male]:age[63]:kc2 0.0039 0.002 1.594 0.111 -0.001 0.009
gender[Female]:age[64]:kc2 0.0014 0.001 0.946 0.344 -0.001 0.004
gender[Male]:age[64]:kc2 0.0005 0.001 0.337 0.736 -0.002 0.003
gender[Female]:age[65]:kc2 0.0032 0.003 1.092 0.275 -0.003 0.009
gender[Male]:age[65]:kc2 0.0024 0.003 0.840 0.401 -0.003 0.008
gender[Female]:age[66]:kc2 0.0022 0.001 2.555 0.011 0.001 0.004
gender[Male]:age[66]:kc2 0.0016 0.001 2.010 0.044 4.02e-05 0.003
gender[Female]:age[67]:kc2 0.0014 0.002 0.879 0.379 -0.002 0.004
gender[Male]:age[67]:kc2 0.0007 0.001 0.448 0.654 -0.002 0.003
gender[Female]:age[68]:kc2 0.0012 0.001 1.856 0.063 -6.47e-05 0.002
gender[Male]:age[68]:kc2 0.0006 0.001 0.920 0.358 -0.001 0.002
gender[Female]:age[69]:kc2 -0.0007 0.001 -0.554 0.579 -0.003 0.002
gender[Male]:age[69]:kc2 -0.0013 0.001 -1.077 0.282 -0.004 0.001
gender[Female]:age[70]:kc2 0.0004 0.001 0.414 0.679 -0.001 0.002
gender[Male]:age[70]:kc2 -7.752e-05 0.001 -0.087 0.930 -0.002 0.002
gender[Female]:age[71]:kc2 -0.0013 0.001 -1.555 0.120 -0.003 0.000
gender[Male]:age[71]:kc2 -0.0017 0.001 -1.894 0.058 -0.003 5.97e-05
gender[Female]:age[72]:kc2 0.0003 0.000 0.761 0.447 -0.000 0.001
gender[Male]:age[72]:kc2 4.656e-05 0.000 0.140 0.889 -0.001 0.001
gender[Female]:age[73]:kc2 -0.0005 0.001 -0.593 0.553 -0.002 0.001
gender[Male]:age[73]:kc2 -0.0007 0.001 -0.811 0.418 -0.002 0.001
gender[Female]:age[74]:kc2 -7.299e-06 0.001 -0.011 0.991 -0.001 0.001
gender[Male]:age[74]:kc2 -0.0001 0.001 -0.179 0.858 -0.001 0.001
gender[Female]:age[75]:kc2 -0.0026 0.001 -2.728 0.006 -0.004 -0.001
gender[Male]:age[75]:kc2 -0.0028 0.001 -3.061 0.002 -0.005 -0.001
gender[Female]:age[76]:kc2 0.0002 0.001 0.239 0.811 -0.001 0.002
gender[Male]:age[76]:kc2 0.0002 0.001 0.226 0.821 -0.001 0.002
gender[Female]:age[77]:kc2 -0.0001 0.001 -0.179 0.858 -0.002 0.001
gender[Male]:age[77]:kc2 -0.0003 0.001 -0.411 0.681 -0.002 0.001
gender[Female]:age[78]:kc2 -0.0006 0.001 -0.593 0.553 -0.003 0.001
gender[Male]:age[78]:kc2 -0.0007 0.001 -0.672 0.501 -0.003 0.001
gender[Female]:age[79]:kc2 -0.0013 0.001 -1.197 0.231 -0.003 0.001
gender[Male]:age[79]:kc2 -0.0014 0.001 -1.320 0.187 -0.003 0.001
gender[Female]:age[80]:kc2 -0.0006 0.001 -0.612 0.541 -0.002 0.001
gender[Male]:age[80]:kc2 -0.0007 0.001 -0.750 0.453 -0.003 0.001
gender[Female]:age[81]:kc2 -0.0008 0.001 -1.076 0.282 -0.002 0.001
gender[Male]:age[81]:kc2 -0.0009 0.001 -1.148 0.251 -0.002 0.001
gender[Female]:age[82]:kc2 -0.0010 0.001 -1.410 0.159 -0.002 0.000
gender[Male]:age[82]:kc2 -0.0010 0.001 -1.509 0.131 -0.002 0.000
gender[Female]:age[83]:kc2 -0.0009 0.001 -0.946 0.344 -0.003 0.001
gender[Male]:age[83]:kc2 -0.0010 0.001 -1.061 0.289 -0.003 0.001
gender[Female]:age[84]:kc2 -0.0013 0.001 -2.496 0.013 -0.002 -0.000
gender[Male]:age[84]:kc2 -0.0014 0.001 -2.644 0.008 -0.002 -0.000
gender[Female]:age[85]:kc2 -0.0011 0.001 -1.682 0.092 -0.002 0.000
gender[Male]:age[85]:kc2 -0.0013 0.001 -2.072 0.038 -0.003 -7.23e-05
gender[Female]:age[86]:kc2 -0.0002 0.000 -0.455 0.649 -0.001 0.001
gender[Male]:age[86]:kc2 -0.0004 0.000 -0.759 0.448 -0.001 0.001
gender[Female]:age[87]:kc2 -0.0005 0.001 -0.693 0.489 -0.002 0.001
gender[Male]:age[87]:kc2 -0.0007 0.001 -0.870 0.384 -0.002 0.001
gender[Female]:age[88]:kc2 -0.0006 0.000 -1.392 0.164 -0.001 0.000
gender[Male]:age[88]:kc2 -0.0008 0.000 -1.879 0.060 -0.002 3.3e-05
gender[Female]:age[89]:kc2 -0.0012 0.001 -1.975 0.048 -0.002 -8.55e-06
gender[Male]:age[89]:kc2 -0.0012 0.001 -1.923 0.054 -0.003 2.38e-05
gender[Female]:age[90]:kc2 0.0012 0.000 3.528 0.000 0.001 0.002
gender[Male]:age[90]:kc2 0.0011 0.000 3.145 0.002 0.000 0.002
cohort 0.0008 0.000 2.428 0.015 0.000 0.001
==============================================================================
Skew: -0.9362 Kurtosis: 10.0999
Centered skew: -1.0282 Centered kurtosis: 11.3636
==============================================================================
=== GEE (AR1) Summary ===
GEE Regression Results
===================================================================================
Dep. Variable: y No. Observations: 7280
Model: GEE No. clusters: 364
Method: Generalized Min. cluster size: 20
Estimating Equations Max. cluster size: 20
Family: Gaussian Mean cluster size: 20.0
Dependence structure: Autoregressive Num. iterations: 2
Date: Sun, 26 Oct 2025 Scale: 0.021
Covariance type: robust Time: 12:11:22
==============================================================================================
coef std err z P>|z| [0.025 0.975]
----------------------------------------------------------------------------------------------
Intercept 58.3123 14.637 3.984 0.000 29.625 86.999
gender[T.Male] -0.3654 0.852 -0.429 0.668 -2.035 1.304
age[T.1] -15.3053 19.817 -0.772 0.440 -54.147 23.536
age[T.2] -79.4105 31.675 -2.507 0.012 -141.492 -17.329
age[T.3] -44.8112 34.879 -1.285 0.199 -113.173 23.550
age[T.4] -47.6717 24.198 -1.970 0.049 -95.099 -0.244
age[T.5] -60.9298 23.464 -2.597 0.009 -106.917 -14.942
age[T.6] -91.3688 15.059 -6.067 0.000 -120.884 -61.854
age[T.7] -85.7203 46.437 -1.846 0.065 -176.736 5.295
age[T.8] -74.0425 40.835 -1.813 0.070 -154.077 5.992
age[T.9] -42.8422 22.693 -1.888 0.059 -87.319 1.634
age[T.10] -61.2170 19.181 -3.192 0.001 -98.812 -23.622
age[T.11] -65.5637 32.487 -2.018 0.044 -129.237 -1.890
age[T.12] -56.9246 25.900 -2.198 0.028 -107.688 -6.161
age[T.13] -116.4971 26.053 -4.472 0.000 -167.559 -65.435
age[T.14] -24.8892 15.738 -1.581 0.114 -55.736 5.957
age[T.15] 29.0142 29.433 0.986 0.324 -28.674 86.703
age[T.16] -36.2450 40.450 -0.896 0.370 -115.525 43.035
age[T.17] -103.0312 40.622 -2.536 0.011 -182.648 -23.414
age[T.18] -180.7356 42.992 -4.204 0.000 -264.999 -96.472
age[T.19] -45.4747 15.098 -3.012 0.003 -75.067 -15.882
age[T.20] -4.5899 23.517 -0.195 0.845 -50.682 41.502
age[T.21] -7.2050 38.326 -0.188 0.851 -82.322 67.912
age[T.22] -59.1344 22.212 -2.662 0.008 -102.669 -15.600
age[T.23] -62.8027 21.578 -2.911 0.004 -105.094 -20.511
age[T.24] -42.0944 45.763 -0.920 0.358 -131.787 47.599
age[T.25] -34.6835 39.430 -0.880 0.379 -111.966 42.598
age[T.26] -88.0687 18.851 -4.672 0.000 -125.016 -51.122
age[T.27] 0.6416 53.916 0.012 0.991 -105.033 106.316
age[T.28] -86.8923 20.567 -4.225 0.000 -127.203 -46.582
age[T.29] -47.6659 31.711 -1.503 0.133 -109.819 14.487
age[T.30] -39.2926 33.299 -1.180 0.238 -104.558 25.973
age[T.31] -88.8360 38.345 -2.317 0.021 -163.990 -13.682
age[T.32] -17.7248 56.722 -0.312 0.755 -128.898 93.448
age[T.33] -55.5093 31.001 -1.791 0.073 -116.271 5.252
age[T.34] -72.1136 31.739 -2.272 0.023 -134.321 -9.906
age[T.35] -114.0350 36.205 -3.150 0.002 -184.995 -43.075
age[T.36] -100.7864 29.202 -3.451 0.001 -158.021 -43.551
age[T.37] -64.2629 20.809 -3.088 0.002 -105.047 -23.479
age[T.38] -82.0683 16.087 -5.102 0.000 -113.597 -50.539
age[T.39] -55.1856 21.587 -2.556 0.011 -97.495 -12.876
age[T.40] -133.1235 26.369 -5.048 0.000 -184.806 -81.441
age[T.41] -66.5672 16.515 -4.031 0.000 -98.935 -34.199
age[T.42] -74.0839 17.023 -4.352 0.000 -107.448 -40.719
age[T.43] -64.1151 17.606 -3.642 0.000 -98.622 -29.608
age[T.44] -71.3612 16.186 -4.409 0.000 -103.086 -39.636
age[T.45] -65.3049 18.295 -3.569 0.000 -101.163 -29.447
age[T.46] -60.6399 15.784 -3.842 0.000 -91.577 -29.703
age[T.47] -62.3344 16.264 -3.833 0.000 -94.211 -30.458
age[T.48] -66.0784 15.606 -4.234 0.000 -96.665 -35.492
age[T.49] -61.0032 14.858 -4.106 0.000 -90.125 -31.882
age[T.50] -64.7840 15.686 -4.130 0.000 -95.529 -34.039
age[T.51] -59.1980 14.727 -4.020 0.000 -88.061 -30.335
age[T.52] -62.4652 14.710 -4.247 0.000 -91.296 -33.635
age[T.53] -58.7570 15.031 -3.909 0.000 -88.217 -29.297
age[T.54] -55.7473 15.004 -3.716 0.000 -85.154 -26.341
age[T.55] -61.5264 14.892 -4.131 0.000 -90.715 -32.338
age[T.56] -53.5967 15.525 -3.452 0.001 -84.025 -23.169
age[T.57] -53.8828 15.178 -3.550 0.000 -83.632 -24.134
age[T.58] -51.3760 15.414 -3.333 0.001 -81.587 -21.165
age[T.59] -48.2441 16.455 -2.932 0.003 -80.495 -15.993
age[T.60] -49.5391 15.724 -3.151 0.002 -80.357 -18.721
age[T.61] -51.0512 15.982 -3.194 0.001 -82.376 -19.727
age[T.62] -50.3143 15.927 -3.159 0.002 -81.530 -19.099
age[T.63] -51.0277 15.587 -3.274 0.001 -81.578 -20.478
age[T.64] -57.0876 14.960 -3.816 0.000 -86.408 -27.767
age[T.65] -53.4074 15.676 -3.407 0.001 -84.132 -22.683
age[T.66] -54.9570 14.701 -3.738 0.000 -83.770 -26.144
age[T.67] -56.4087 14.919 -3.781 0.000 -85.649 -27.168
age[T.68] -56.4655 14.660 -3.852 0.000 -85.198 -27.733
age[T.69] -59.5523 14.802 -4.023 0.000 -88.563 -30.541
age[T.70] -57.5229 14.707 -3.911 0.000 -86.348 -28.698
age[T.71] -60.3229 14.718 -4.098 0.000 -89.170 -31.476
age[T.72] -57.2703 14.608 -3.920 0.000 -85.902 -28.638
age[T.73] -58.7342 14.719 -3.990 0.000 -87.583 -29.885
age[T.74] -57.8876 14.654 -3.950 0.000 -86.609 -29.166
age[T.75] -62.6699 14.735 -4.253 0.000 -91.549 -33.791
age[T.76] -57.4097 14.677 -3.912 0.000 -86.176 -28.643
age[T.77] -58.1630 14.679 -3.962 0.000 -86.933 -29.393
age[T.78] -58.9192 14.766 -3.990 0.000 -87.860 -29.979
age[T.79] -60.1302 14.795 -4.064 0.000 -89.129 -31.132
age[T.80] -59.0952 14.733 -4.011 0.000 -87.971 -30.220
age[T.81] -59.4917 14.683 -4.052 0.000 -88.270 -30.713
age[T.82] -59.8316 14.664 -4.080 0.000 -88.572 -31.091
age[T.83] -59.8228 14.744 -4.057 0.000 -88.721 -30.925
age[T.84] -60.6206 14.645 -4.139 0.000 -89.324 -31.917
age[T.85] -60.6067 14.662 -4.134 0.000 -89.344 -31.869
age[T.86] -58.8759 14.632 -4.024 0.000 -87.554 -30.197
age[T.87] -59.5129 14.697 -4.049 0.000 -88.319 -30.706
age[T.88] -59.5410 14.618 -4.073 0.000 -88.192 -30.890
age[T.89] -60.6971 14.655 -4.142 0.000 -89.421 -31.973
age[T.90] -56.5056 14.615 -3.866 0.000 -85.151 -27.860
gender[Female]:age[0]:kc1 -2.6162 0.619 -4.227 0.000 -3.829 -1.403
gender[Male]:age[0]:kc1 -2.5981 0.618 -4.204 0.000 -3.809 -1.387
gender[Female]:age[1]:kc1 -2.1173 0.571 -3.705 0.000 -3.237 -0.997
gender[Male]:age[1]:kc1 -2.0391 0.577 -3.533 0.000 -3.170 -0.908
gender[Female]:age[2]:kc1 0.6650 1.198 0.555 0.579 -1.682 3.012
gender[Male]:age[2]:kc1 0.6627 1.187 0.558 0.577 -1.664 2.990
gender[Female]:age[3]:kc1 -0.7489 1.355 -0.553 0.581 -3.405 1.908
gender[Male]:age[3]:kc1 -0.8506 1.348 -0.631 0.528 -3.493 1.792
gender[Female]:age[4]:kc1 -0.7176 0.824 -0.871 0.384 -2.332 0.897
gender[Male]:age[4]:kc1 -0.6824 0.828 -0.824 0.410 -2.305 0.940
gender[Female]:age[5]:kc1 -0.1112 0.781 -0.143 0.887 -1.641 1.419
gender[Male]:age[5]:kc1 -0.0802 0.786 -0.102 0.919 -1.621 1.461
gender[Female]:age[6]:kc1 1.1793 0.155 7.592 0.000 0.875 1.484
gender[Male]:age[6]:kc1 1.2105 0.159 7.614 0.000 0.899 1.522
gender[Female]:age[7]:kc1 0.9059 1.877 0.483 0.629 -2.772 4.584
gender[Male]:age[7]:kc1 1.0158 1.893 0.536 0.592 -2.695 4.727
gender[Female]:age[8]:kc1 0.4404 1.637 0.269 0.788 -2.768 3.648
gender[Male]:age[8]:kc1 0.4779 1.657 0.288 0.773 -2.770 3.726
gender[Female]:age[9]:kc1 -0.9429 0.764 -1.233 0.217 -2.441 0.555
gender[Male]:age[9]:kc1 -0.8985 0.755 -1.190 0.234 -2.379 0.582
gender[Female]:age[10]:kc1 -0.1553 0.555 -0.280 0.780 -1.243 0.933
gender[Male]:age[10]:kc1 -0.1580 0.530 -0.298 0.766 -1.198 0.882
gender[Female]:age[11]:kc1 0.0222 1.228 0.018 0.986 -2.384 2.428
gender[Male]:age[11]:kc1 0.0131 1.264 0.010 0.992 -2.464 2.490
gender[Female]:age[12]:kc1 -0.3265 0.908 -0.360 0.719 -2.106 1.453
gender[Male]:age[12]:kc1 -0.2459 0.893 -0.275 0.783 -1.995 1.504
gender[Female]:age[13]:kc1 2.1533 0.930 2.315 0.021 0.331 3.976
gender[Male]:age[13]:kc1 2.2050 0.924 2.385 0.017 0.393 4.017
gender[Female]:age[14]:kc1 -1.8026 0.245 -7.360 0.000 -2.283 -1.323
gender[Male]:age[14]:kc1 -1.6881 0.261 -6.465 0.000 -2.200 -1.176
gender[Female]:age[15]:kc1 3.6169 0.963 3.757 0.000 1.730 5.504
gender[Male]:age[15]:kc1 3.5368 0.981 3.604 0.000 1.614 5.460
gender[Female]:age[16]:kc1 1.0811 1.418 0.763 0.446 -1.697 3.860
gender[Male]:age[16]:kc1 1.0264 1.424 0.721 0.471 -1.764 3.817
gender[Female]:age[17]:kc1 -1.4557 1.417 -1.028 0.304 -4.232 1.321
gender[Male]:age[17]:kc1 -1.5245 1.422 -1.072 0.284 -4.312 1.263
gender[Female]:age[18]:kc1 -4.4344 1.513 -2.930 0.003 -7.400 -1.468
gender[Male]:age[18]:kc1 -4.4309 1.525 -2.905 0.004 -7.420 -1.442
gender[Female]:age[19]:kc1 0.7656 0.144 5.304 0.000 0.483 1.048
gender[Male]:age[19]:kc1 0.6451 0.137 4.698 0.000 0.376 0.914
gender[Female]:age[20]:kc1 2.2818 0.697 3.272 0.001 0.915 3.648
gender[Male]:age[20]:kc1 2.2193 0.681 3.259 0.001 0.885 3.554
gender[Female]:age[21]:kc1 2.1905 1.343 1.631 0.103 -0.442 4.823
gender[Male]:age[21]:kc1 2.1267 1.331 1.597 0.110 -0.483 4.736
gender[Female]:age[22]:kc1 0.2310 0.643 0.359 0.719 -1.029 1.491
gender[Male]:age[22]:kc1 0.1544 0.643 0.240 0.810 -1.106 1.415
gender[Female]:age[23]:kc1 0.0442 0.583 0.076 0.940 -1.099 1.188
gender[Male]:age[23]:kc1 0.0229 0.598 0.038 0.969 -1.149 1.195
gender[Female]:age[24]:kc1 0.8151 1.633 0.499 0.618 -2.386 4.016
gender[Male]:age[24]:kc1 0.7987 1.637 0.488 0.626 -2.410 4.008
gender[Female]:age[25]:kc1 1.1206 1.369 0.818 0.413 -1.563 3.804
gender[Male]:age[25]:kc1 1.0612 1.378 0.770 0.441 -1.640 3.763
gender[Female]:age[26]:kc1 -0.9208 0.421 -2.188 0.029 -1.745 -0.096
gender[Male]:age[26]:kc1 -0.9356 0.440 -2.128 0.033 -1.797 -0.074
gender[Female]:age[27]:kc1 2.4647 1.959 1.258 0.208 -1.374 6.304
gender[Male]:age[27]:kc1 2.3948 1.968 1.217 0.224 -1.463 6.253
gender[Female]:age[28]:kc1 -0.8605 0.548 -1.569 0.117 -1.935 0.215
gender[Male]:age[28]:kc1 -0.9275 0.546 -1.698 0.090 -1.998 0.143
gender[Female]:age[29]:kc1 0.6304 1.047 0.602 0.547 -1.423 2.683
gender[Male]:age[29]:kc1 0.5595 1.050 0.533 0.594 -1.499 2.618
gender[Female]:age[30]:kc1 0.9413 1.121 0.840 0.401 -1.256 3.138
gender[Male]:age[30]:kc1 0.8766 1.129 0.776 0.438 -1.337 3.090
gender[Female]:age[31]:kc1 -1.0046 1.335 -0.752 0.452 -3.621 1.612
gender[Male]:age[31]:kc1 -1.0174 1.342 -0.758 0.448 -3.647 1.612
gender[Female]:age[32]:kc1 1.7173 2.067 0.831 0.406 -2.334 5.768
gender[Male]:age[32]:kc1 1.6380 2.066 0.793 0.428 -2.411 5.686
gender[Female]:age[33]:kc1 0.2776 1.036 0.268 0.789 -1.753 2.308
gender[Male]:age[33]:kc1 0.2484 1.020 0.243 0.808 -1.752 2.248
gender[Female]:age[34]:kc1 -0.3066 1.059 -0.290 0.772 -2.382 1.769
gender[Male]:age[34]:kc1 -0.3658 1.065 -0.343 0.731 -2.454 1.722
gender[Female]:age[35]:kc1 -1.9068 1.249 -1.527 0.127 -4.355 0.541
gender[Male]:age[35]:kc1 -1.9816 1.249 -1.587 0.113 -4.429 0.466
gender[Female]:age[36]:kc1 -1.3892 0.969 -1.433 0.152 -3.289 0.510
gender[Male]:age[36]:kc1 -1.5032 0.947 -1.587 0.113 -3.360 0.354
gender[Female]:age[37]:kc1 -0.0503 0.560 -0.090 0.928 -1.148 1.047
gender[Male]:age[37]:kc1 -0.0932 0.561 -0.166 0.868 -1.193 1.007
gender[Female]:age[38]:kc1 -0.7233 0.254 -2.852 0.004 -1.220 -0.226
gender[Male]:age[38]:kc1 -0.7795 0.254 -3.064 0.002 -1.278 -0.281
gender[Female]:age[39]:kc1 0.2636 0.601 0.439 0.661 -0.914 1.441
gender[Male]:age[39]:kc1 0.2328 0.596 0.391 0.696 -0.935 1.401
gender[Female]:age[40]:kc1 -2.6568 0.833 -3.188 0.001 -4.290 -1.024
gender[Male]:age[40]:kc1 -2.7264 0.829 -3.290 0.001 -4.351 -1.102
gender[Female]:age[41]:kc1 -0.0776 0.364 -0.213 0.831 -0.791 0.636
gender[Male]:age[41]:kc1 -0.1730 0.361 -0.480 0.632 -0.880 0.534
gender[Female]:age[42]:kc1 -0.4479 0.410 -1.092 0.275 -1.252 0.356
gender[Male]:age[42]:kc1 -0.5283 0.410 -1.287 0.198 -1.333 0.276
gender[Female]:age[43]:kc1 0.0194 0.468 0.041 0.967 -0.898 0.936
gender[Male]:age[43]:kc1 -0.0687 0.457 -0.151 0.880 -0.964 0.826
gender[Female]:age[44]:kc1 -0.3144 0.330 -0.952 0.341 -0.962 0.333
gender[Male]:age[44]:kc1 -0.4184 0.326 -1.285 0.199 -1.057 0.220
gender[Female]:age[45]:kc1 -0.0491 0.524 -0.094 0.925 -1.075 0.977
gender[Male]:age[45]:kc1 -0.1343 0.512 -0.262 0.793 -1.139 0.870
gender[Female]:age[46]:kc1 0.1746 0.286 0.611 0.541 -0.386 0.735
gender[Male]:age[46]:kc1 0.0902 0.278 0.324 0.746 -0.455 0.635
gender[Female]:age[47]:kc1 0.0863 0.340 0.254 0.800 -0.581 0.754
gender[Male]:age[47]:kc1 -0.0110 0.332 -0.033 0.974 -0.662 0.640
gender[Female]:age[48]:kc1 -0.0921 0.263 -0.350 0.727 -0.609 0.424
gender[Male]:age[48]:kc1 -0.1839 0.256 -0.719 0.472 -0.685 0.318
gender[Female]:age[49]:kc1 0.1406 0.132 1.062 0.288 -0.119 0.400
gender[Male]:age[49]:kc1 0.0522 0.131 0.399 0.690 -0.204 0.308
gender[Female]:age[50]:kc1 -0.0367 0.274 -0.134 0.893 -0.574 0.501
gender[Male]:age[50]:kc1 -0.1334 0.267 -0.501 0.617 -0.656 0.389
gender[Female]:age[51]:kc1 0.2241 0.092 2.443 0.015 0.044 0.404
gender[Male]:age[51]:kc1 0.1319 0.092 1.427 0.154 -0.049 0.313
gender[Female]:age[52]:kc1 0.0772 0.086 0.899 0.369 -0.091 0.246
gender[Male]:age[52]:kc1 -0.0274 0.088 -0.313 0.754 -0.199 0.144
gender[Female]:age[53]:kc1 0.2345 0.167 1.400 0.162 -0.094 0.563
gender[Male]:age[53]:kc1 0.1401 0.171 0.819 0.413 -0.195 0.476
gender[Female]:age[54]:kc1 0.3684 0.162 2.280 0.023 0.052 0.685
gender[Male]:age[54]:kc1 0.2878 0.167 1.725 0.084 -0.039 0.615
gender[Female]:age[55]:kc1 0.0896 0.137 0.653 0.514 -0.179 0.358
gender[Male]:age[55]:kc1 -0.0023 0.142 -0.016 0.987 -0.280 0.276
gender[Female]:age[56]:kc1 0.4606 0.246 1.875 0.061 -0.021 0.942
gender[Male]:age[56]:kc1 0.3737 0.251 1.490 0.136 -0.118 0.865
gender[Female]:age[57]:kc1 0.4336 0.194 2.230 0.026 0.053 0.815
gender[Male]:age[57]:kc1 0.3579 0.196 1.824 0.068 -0.027 0.742
gender[Female]:age[58]:kc1 0.5560 0.231 2.409 0.016 0.104 1.008
gender[Male]:age[58]:kc1 0.4714 0.234 2.017 0.044 0.013 0.929
gender[Female]:age[59]:kc1 0.6840 0.353 1.935 0.053 -0.009 1.377
gender[Male]:age[59]:kc1 0.6061 0.357 1.697 0.090 -0.094 1.306
gender[Female]:age[60]:kc1 0.6252 0.276 2.262 0.024 0.083 1.167
gender[Male]:age[60]:kc1 0.5405 0.272 1.990 0.047 0.008 1.073
gender[Female]:age[61]:kc1 0.5424 0.305 1.778 0.075 -0.056 1.140
gender[Male]:age[61]:kc1 0.4672 0.302 1.546 0.122 -0.125 1.059
gender[Female]:age[62]:kc1 0.5683 0.298 1.907 0.057 -0.016 1.152
gender[Male]:age[62]:kc1 0.4945 0.295 1.676 0.094 -0.084 1.073
gender[Female]:age[63]:kc1 0.5288 0.255 2.077 0.038 0.030 1.028
gender[Male]:age[63]:kc1 0.4559 0.256 1.783 0.075 -0.045 0.957
gender[Female]:age[64]:kc1 0.2344 0.154 1.526 0.127 -0.067 0.536
gender[Male]:age[64]:kc1 0.1667 0.152 1.099 0.272 -0.131 0.464
gender[Female]:age[65]:kc1 0.3947 0.272 1.453 0.146 -0.138 0.927
gender[Male]:age[65]:kc1 0.3336 0.263 1.270 0.204 -0.181 0.848
gender[Female]:age[66]:kc1 0.3132 0.084 3.733 0.000 0.149 0.478
gender[Male]:age[66]:kc1 0.2621 0.081 3.247 0.001 0.104 0.420
gender[Female]:age[67]:kc1 0.2413 0.148 1.632 0.103 -0.049 0.531
gender[Male]:age[67]:kc1 0.1852 0.142 1.305 0.192 -0.093 0.463
gender[Female]:age[68]:kc1 0.2282 0.066 3.442 0.001 0.098 0.358
gender[Male]:age[68]:kc1 0.1776 0.063 2.819 0.005 0.054 0.301
gender[Female]:age[69]:kc1 0.0751 0.117 0.639 0.523 -0.155 0.305
gender[Male]:age[69]:kc1 0.0255 0.114 0.224 0.823 -0.198 0.249
gender[Female]:age[70]:kc1 0.1650 0.086 1.913 0.056 -0.004 0.334
gender[Male]:age[70]:kc1 0.1219 0.084 1.452 0.147 -0.043 0.286
gender[Female]:age[71]:kc1 0.0235 0.087 0.271 0.786 -0.146 0.193
gender[Male]:age[71]:kc1 -0.0164 0.092 -0.179 0.858 -0.196 0.163
gender[Female]:age[72]:kc1 0.1615 0.030 5.420 0.000 0.103 0.220
gender[Male]:age[72]:kc1 0.1277 0.030 4.305 0.000 0.070 0.186
gender[Female]:age[73]:kc1 0.0886 0.091 0.974 0.330 -0.090 0.267
gender[Male]:age[73]:kc1 0.0609 0.088 0.695 0.487 -0.111 0.232
gender[Female]:age[74]:kc1 0.1298 0.063 2.048 0.041 0.006 0.254
gender[Male]:age[74]:kc1 0.1023 0.062 1.663 0.096 -0.018 0.223
gender[Female]:age[75]:kc1 -0.0986 0.096 -1.025 0.305 -0.287 0.090
gender[Male]:age[75]:kc1 -0.1253 0.094 -1.338 0.181 -0.309 0.058
gender[Female]:age[76]:kc1 0.1428 0.074 1.922 0.055 -0.003 0.288
gender[Male]:age[76]:kc1 0.1217 0.071 1.708 0.088 -0.018 0.261
gender[Female]:age[77]:kc1 0.1080 0.075 1.436 0.151 -0.039 0.255
gender[Male]:age[77]:kc1 0.0824 0.072 1.137 0.255 -0.060 0.224
gender[Female]:age[78]:kc1 0.0654 0.107 0.609 0.542 -0.145 0.276
gender[Male]:age[78]:kc1 0.0466 0.103 0.451 0.652 -0.156 0.249
gender[Female]:age[79]:kc1 0.0055 0.115 0.048 0.962 -0.220 0.231
gender[Male]:age[79]:kc1 -0.0144 0.113 -0.127 0.899 -0.237 0.208
gender[Female]:age[80]:kc1 0.0569 0.094 0.606 0.544 -0.127 0.241
gender[Male]:age[80]:kc1 0.0355 0.094 0.378 0.706 -0.149 0.220
gender[Female]:age[81]:kc1 0.0344 0.075 0.457 0.648 -0.113 0.182
gender[Male]:age[81]:kc1 0.0164 0.075 0.219 0.827 -0.131 0.163
gender[Female]:age[82]:kc1 0.0181 0.068 0.267 0.790 -0.115 0.151
gender[Male]:age[82]:kc1 0.0013 0.066 0.019 0.985 -0.128 0.130
gender[Female]:age[83]:kc1 0.0174 0.098 0.178 0.859 -0.174 0.209
gender[Male]:age[83]:kc1 -0.0021 0.099 -0.021 0.983 -0.195 0.191
gender[Female]:age[84]:kc1 -0.0187 0.056 -0.335 0.737 -0.128 0.091
gender[Male]:age[84]:kc1 -0.0405 0.059 -0.692 0.489 -0.155 0.074
gender[Female]:age[85]:kc1 -0.0162 0.067 -0.241 0.810 -0.148 0.116
gender[Male]:age[85]:kc1 -0.0390 0.065 -0.598 0.550 -0.167 0.089
gender[Female]:age[86]:kc1 0.0607 0.050 1.222 0.222 -0.037 0.158
gender[Male]:age[86]:kc1 0.0405 0.049 0.831 0.406 -0.055 0.136
gender[Female]:age[87]:kc1 0.0288 0.080 0.360 0.719 -0.128 0.186
gender[Male]:age[87]:kc1 0.0079 0.083 0.094 0.925 -0.155 0.171
gender[Female]:age[88]:kc1 0.0250 0.039 0.644 0.519 -0.051 0.101
gender[Male]:age[88]:kc1 0.0029 0.039 0.073 0.941 -0.074 0.079
gender[Female]:age[89]:kc1 -0.0302 0.061 -0.496 0.620 -0.149 0.089
gender[Male]:age[89]:kc1 -0.0468 0.065 -0.723 0.470 -0.174 0.080
gender[Female]:age[90]:kc1 0.1653 0.037 4.484 0.000 0.093 0.238
gender[Male]:age[90]:kc1 0.1478 0.037 3.969 0.000 0.075 0.221
gender[Female]:age[0]:kc2 0.0260 0.007 3.995 0.000 0.013 0.039
gender[Male]:age[0]:kc2 0.0259 0.007 3.977 0.000 0.013 0.039
gender[Female]:age[1]:kc2 0.0213 0.006 3.494 0.000 0.009 0.033
gender[Male]:age[1]:kc2 0.0198 0.006 3.189 0.001 0.008 0.032
gender[Female]:age[2]:kc2 -0.0091 0.013 -0.715 0.475 -0.034 0.016
gender[Male]:age[2]:kc2 -0.0088 0.012 -0.709 0.478 -0.033 0.016
gender[Female]:age[3]:kc2 0.0051 0.014 0.355 0.723 -0.023 0.034
gender[Male]:age[3]:kc2 0.0076 0.014 0.531 0.595 -0.020 0.036
gender[Female]:age[4]:kc2 0.0056 0.009 0.643 0.520 -0.012 0.023
gender[Male]:age[4]:kc2 0.0052 0.009 0.590 0.555 -0.012 0.023
gender[Female]:age[5]:kc2 -0.0013 0.008 -0.154 0.877 -0.018 0.015
gender[Male]:age[5]:kc2 -0.0017 0.008 -0.198 0.843 -0.018 0.015
gender[Female]:age[6]:kc2 -0.0149 0.002 -9.362 0.000 -0.018 -0.012
gender[Male]:age[6]:kc2 -0.0153 0.002 -9.022 0.000 -0.019 -0.012
gender[Female]:age[7]:kc2 -0.0117 0.020 -0.586 0.558 -0.051 0.027
gender[Male]:age[7]:kc2 -0.0138 0.020 -0.679 0.497 -0.054 0.026
gender[Female]:age[8]:kc2 -0.0071 0.018 -0.407 0.684 -0.042 0.027
gender[Male]:age[8]:kc2 -0.0076 0.018 -0.424 0.672 -0.043 0.028
gender[Female]:age[9]:kc2 0.0082 0.008 0.969 0.333 -0.008 0.025
gender[Male]:age[9]:kc2 0.0076 0.008 0.920 0.358 -0.009 0.024
gender[Female]:age[10]:kc2 -0.0003 0.006 -0.044 0.965 -0.012 0.012
gender[Male]:age[10]:kc2 0.0001 0.006 0.024 0.981 -0.011 0.011
gender[Female]:age[11]:kc2 -0.0021 0.013 -0.162 0.871 -0.028 0.023
gender[Male]:age[11]:kc2 -0.0016 0.014 -0.118 0.906 -0.029 0.025
gender[Female]:age[12]:kc2 0.0014 0.010 0.149 0.882 -0.017 0.020
gender[Male]:age[12]:kc2 9.769e-05 0.009 0.011 0.992 -0.018 0.018
gender[Female]:age[13]:kc2 -0.0242 0.010 -2.422 0.015 -0.044 -0.005
gender[Male]:age[13]:kc2 -0.0250 0.010 -2.529 0.011 -0.044 -0.006
gender[Female]:age[14]:kc2 0.0185 0.003 7.251 0.000 0.014 0.024
gender[Male]:age[14]:kc2 0.0164 0.003 5.663 0.000 0.011 0.022
gender[Female]:age[15]:kc2 0.0335 0.009 3.702 0.000 0.016 0.051
gender[Male]:age[15]:kc2 0.0323 0.009 3.430 0.001 0.014 0.051
gender[Female]:age[16]:kc2 0.0090 0.013 0.678 0.497 -0.017 0.035
gender[Male]:age[16]:kc2 0.0084 0.013 0.624 0.533 -0.018 0.035
gender[Female]:age[17]:kc2 -0.0150 0.013 -1.135 0.256 -0.041 0.011
gender[Male]:age[17]:kc2 -0.0159 0.013 -1.191 0.234 -0.042 0.010
gender[Female]:age[18]:kc2 -0.0435 0.014 -3.078 0.002 -0.071 -0.016
gender[Male]:age[18]:kc2 -0.0429 0.014 -2.987 0.003 -0.071 -0.015
gender[Female]:age[19]:kc2 0.0064 0.001 4.757 0.000 0.004 0.009
gender[Male]:age[19]:kc2 0.0047 0.001 3.787 0.000 0.002 0.007
gender[Female]:age[20]:kc2 0.0205 0.007 3.107 0.002 0.008 0.033
gender[Male]:age[20]:kc2 0.0199 0.006 3.152 0.002 0.008 0.032
gender[Female]:age[21]:kc2 0.0197 0.013 1.546 0.122 -0.005 0.045
gender[Male]:age[21]:kc2 0.0190 0.013 1.523 0.128 -0.005 0.044
gender[Female]:age[22]:kc2 0.0012 0.006 0.191 0.849 -0.011 0.013
gender[Male]:age[22]:kc2 0.0003 0.006 0.051 0.959 -0.012 0.012
gender[Female]:age[23]:kc2 -0.0010 0.005 -0.192 0.848 -0.012 0.009
gender[Male]:age[23]:kc2 -0.0009 0.006 -0.152 0.879 -0.012 0.010
gender[Female]:age[24]:kc2 0.0062 0.015 0.401 0.688 -0.024 0.036
gender[Male]:age[24]:kc2 0.0064 0.015 0.414 0.679 -0.024 0.037
gender[Female]:age[25]:kc2 0.0093 0.013 0.724 0.469 -0.016 0.034
gender[Male]:age[25]:kc2 0.0087 0.013 0.671 0.502 -0.017 0.034
gender[Female]:age[26]:kc2 -0.0102 0.004 -2.729 0.006 -0.018 -0.003
gender[Male]:age[26]:kc2 -0.0100 0.004 -2.462 0.014 -0.018 -0.002
gender[Female]:age[27]:kc2 0.0220 0.018 1.193 0.233 -0.014 0.058
gender[Male]:age[27]:kc2 0.0213 0.019 1.140 0.254 -0.015 0.058
gender[Female]:age[28]:kc2 -0.0095 0.005 -1.824 0.068 -0.020 0.001
gender[Male]:age[28]:kc2 -0.0102 0.005 -1.986 0.047 -0.020 -0.000
gender[Female]:age[29]:kc2 0.0047 0.010 0.481 0.630 -0.014 0.024
gender[Male]:age[29]:kc2 0.0039 0.010 0.394 0.693 -0.015 0.023
gender[Female]:age[30]:kc2 0.0076 0.010 0.726 0.468 -0.013 0.028
gender[Male]:age[30]:kc2 0.0069 0.011 0.646 0.518 -0.014 0.028
gender[Female]:age[31]:kc2 -0.0114 0.013 -0.910 0.363 -0.036 0.013
gender[Male]:age[31]:kc2 -0.0112 0.013 -0.883 0.377 -0.036 0.014
gender[Female]:age[32]:kc2 0.0146 0.019 0.751 0.452 -0.024 0.053
gender[Male]:age[32]:kc2 0.0136 0.019 0.698 0.485 -0.025 0.052
gender[Female]:age[33]:kc2 0.0010 0.010 0.098 0.922 -0.018 0.020
gender[Male]:age[33]:kc2 0.0009 0.010 0.090 0.928 -0.018 0.019
gender[Female]:age[34]:kc2 -0.0041 0.010 -0.414 0.679 -0.024 0.015
gender[Male]:age[34]:kc2 -0.0048 0.010 -0.478 0.633 -0.025 0.015
gender[Female]:age[35]:kc2 -0.0194 0.012 -1.645 0.100 -0.042 0.004
gender[Male]:age[35]:kc2 -0.0203 0.012 -1.729 0.084 -0.043 0.003
gender[Female]:age[36]:kc2 -0.0143 0.009 -1.537 0.124 -0.032 0.004
gender[Male]:age[36]:kc2 -0.0160 0.009 -1.806 0.071 -0.033 0.001
gender[Female]:age[37]:kc2 -0.0020 0.005 -0.373 0.709 -0.012 0.008
gender[Male]:age[37]:kc2 -0.0024 0.005 -0.448 0.654 -0.013 0.008
gender[Female]:age[38]:kc2 -0.0083 0.002 -3.485 0.000 -0.013 -0.004
gender[Male]:age[38]:kc2 -0.0089 0.002 -3.733 0.000 -0.014 -0.004
gender[Female]:age[39]:kc2 0.0008 0.006 0.140 0.889 -0.010 0.012
gender[Male]:age[39]:kc2 0.0006 0.006 0.112 0.911 -0.010 0.012
gender[Female]:age[40]:kc2 -0.0265 0.008 -3.351 0.001 -0.042 -0.011
gender[Male]:age[40]:kc2 -0.0274 0.008 -3.511 0.000 -0.043 -0.012
gender[Female]:age[41]:kc2 -0.0019 0.004 -0.445 0.656 -0.010 0.006
gender[Male]:age[41]:kc2 -0.0035 0.004 -0.837 0.402 -0.012 0.005
gender[Female]:age[42]:kc2 -0.0064 0.005 -1.331 0.183 -0.016 0.003
gender[Male]:age[42]:kc2 -0.0076 0.005 -1.599 0.110 -0.017 0.002
gender[Female]:age[43]:kc2 -0.0008 0.006 -0.154 0.878 -0.012 0.010
gender[Male]:age[43]:kc2 -0.0023 0.005 -0.434 0.664 -0.013 0.008
gender[Female]:age[44]:kc2 -0.0046 0.004 -1.195 0.232 -0.012 0.003
gender[Male]:age[44]:kc2 -0.0065 0.004 -1.705 0.088 -0.014 0.001
gender[Female]:age[45]:kc2 -0.0017 0.006 -0.271 0.786 -0.014 0.010
gender[Male]:age[45]:kc2 -0.0031 0.006 -0.515 0.606 -0.015 0.009
gender[Female]:age[46]:kc2 0.0011 0.003 0.312 0.755 -0.006 0.008
gender[Male]:age[46]:kc2 -0.0003 0.003 -0.095 0.924 -0.007 0.006
gender[Female]:age[47]:kc2 -2.55e-05 0.004 -0.006 0.995 -0.008 0.008
gender[Male]:age[47]:kc2 -0.0017 0.004 -0.437 0.662 -0.009 0.006
gender[Female]:age[48]:kc2 -0.0021 0.003 -0.670 0.503 -0.008 0.004
gender[Male]:age[48]:kc2 -0.0036 0.003 -1.218 0.223 -0.009 0.002
gender[Female]:age[49]:kc2 0.0006 0.002 0.392 0.695 -0.002 0.004
gender[Male]:age[49]:kc2 -0.0008 0.002 -0.537 0.592 -0.004 0.002
gender[Female]:age[50]:kc2 -0.0014 0.003 -0.433 0.665 -0.008 0.005
gender[Male]:age[50]:kc2 -0.0030 0.003 -0.979 0.327 -0.009 0.003
gender[Female]:age[51]:kc2 0.0017 0.001 1.590 0.112 -0.000 0.004
gender[Male]:age[51]:kc2 0.0002 0.001 0.147 0.883 -0.002 0.002
gender[Female]:age[52]:kc2 7.847e-05 0.001 0.078 0.938 -0.002 0.002
gender[Male]:age[52]:kc2 -0.0017 0.001 -1.655 0.098 -0.004 0.000
gender[Female]:age[53]:kc2 0.0018 0.002 0.916 0.360 -0.002 0.006
gender[Male]:age[53]:kc2 0.0002 0.002 0.107 0.915 -0.004 0.004
gender[Female]:age[54]:kc2 0.0033 0.002 1.757 0.079 -0.000 0.007
gender[Male]:age[54]:kc2 0.0021 0.002 1.054 0.292 -0.002 0.006
gender[Female]:age[55]:kc2 1.711e-06 0.002 0.001 0.999 -0.003 0.003
gender[Male]:age[55]:kc2 -0.0015 0.002 -0.890 0.373 -0.005 0.002
gender[Female]:age[56]:kc2 0.0044 0.003 1.534 0.125 -0.001 0.010
gender[Male]:age[56]:kc2 0.0030 0.003 1.019 0.308 -0.003 0.009
gender[Female]:age[57]:kc2 0.0040 0.002 1.747 0.081 -0.000 0.008
gender[Male]:age[57]:kc2 0.0028 0.002 1.244 0.213 -0.002 0.007
gender[Female]:age[58]:kc2 0.0055 0.003 2.044 0.041 0.000 0.011
gender[Male]:age[58]:kc2 0.0042 0.003 1.532 0.126 -0.001 0.010
gender[Female]:age[59]:kc2 0.0068 0.004 1.663 0.096 -0.001 0.015
gender[Male]:age[59]:kc2 0.0056 0.004 1.358 0.175 -0.003 0.014
gender[Female]:age[60]:kc2 0.0062 0.003 1.913 0.056 -0.000 0.013
gender[Male]:age[60]:kc2 0.0049 0.003 1.553 0.120 -0.001 0.011
gender[Female]:age[61]:kc2 0.0051 0.004 1.450 0.147 -0.002 0.012
gender[Male]:age[61]:kc2 0.0040 0.003 1.158 0.247 -0.003 0.011
gender[Female]:age[62]:kc2 0.0054 0.003 1.551 0.121 -0.001 0.012
gender[Male]:age[62]:kc2 0.0043 0.003 1.278 0.201 -0.002 0.011
gender[Female]:age[63]:kc2 0.0049 0.003 1.662 0.097 -0.001 0.011
gender[Male]:age[63]:kc2 0.0039 0.003 1.304 0.192 -0.002 0.010
gender[Female]:age[64]:kc2 0.0014 0.002 0.787 0.432 -0.002 0.005
gender[Male]:age[64]:kc2 0.0005 0.002 0.266 0.790 -0.003 0.004
gender[Female]:age[65]:kc2 0.0032 0.003 1.003 0.316 -0.003 0.009
gender[Male]:age[65]:kc2 0.0024 0.003 0.787 0.431 -0.004 0.008
gender[Female]:age[66]:kc2 0.0022 0.001 2.247 0.025 0.000 0.004
gender[Male]:age[66]:kc2 0.0016 0.001 1.748 0.080 -0.000 0.003
gender[Female]:age[67]:kc2 0.0014 0.002 0.783 0.434 -0.002 0.005
gender[Male]:age[67]:kc2 0.0007 0.002 0.404 0.686 -0.003 0.004
gender[Female]:age[68]:kc2 0.0011 0.001 1.499 0.134 -0.000 0.003
gender[Male]:age[68]:kc2 0.0006 0.001 0.772 0.440 -0.001 0.002
gender[Female]:age[69]:kc2 -0.0007 0.001 -0.500 0.617 -0.003 0.002
gender[Male]:age[69]:kc2 -0.0012 0.001 -0.940 0.347 -0.004 0.001
gender[Female]:age[70]:kc2 0.0004 0.001 0.364 0.716 -0.002 0.002
gender[Male]:age[70]:kc2 -6.124e-05 0.001 -0.063 0.950 -0.002 0.002
gender[Female]:age[71]:kc2 -0.0013 0.001 -1.334 0.182 -0.003 0.001
gender[Male]:age[71]:kc2 -0.0017 0.001 -1.606 0.108 -0.004 0.000
gender[Female]:age[72]:kc2 0.0003 0.000 0.807 0.420 -0.000 0.001
gender[Male]:age[72]:kc2 3.268e-05 0.000 0.097 0.923 -0.001 0.001
gender[Female]:age[73]:kc2 -0.0006 0.001 -0.527 0.598 -0.003 0.002
gender[Male]:age[73]:kc2 -0.0007 0.001 -0.672 0.501 -0.003 0.001
gender[Female]:age[74]:kc2 5.594e-06 0.001 0.008 0.994 -0.001 0.001
gender[Male]:age[74]:kc2 -0.0001 0.001 -0.169 0.866 -0.002 0.001
gender[Female]:age[75]:kc2 -0.0026 0.001 -2.357 0.018 -0.005 -0.000
gender[Male]:age[75]:kc2 -0.0028 0.001 -2.561 0.010 -0.005 -0.001
gender[Female]:age[76]:kc2 0.0002 0.001 0.214 0.830 -0.002 0.002
gender[Male]:age[76]:kc2 0.0002 0.001 0.218 0.827 -0.001 0.002
gender[Female]:age[77]:kc2 -0.0001 0.001 -0.166 0.868 -0.002 0.002
gender[Male]:age[77]:kc2 -0.0003 0.001 -0.327 0.743 -0.002 0.001
gender[Female]:age[78]:kc2 -0.0007 0.001 -0.522 0.602 -0.003 0.002
gender[Male]:age[78]:kc2 -0.0006 0.001 -0.537 0.591 -0.003 0.002
gender[Female]:age[79]:kc2 -0.0013 0.001 -0.989 0.323 -0.004 0.001
gender[Male]:age[79]:kc2 -0.0014 0.001 -1.025 0.305 -0.004 0.001
gender[Female]:age[80]:kc2 -0.0006 0.001 -0.562 0.574 -0.003 0.002
gender[Male]:age[80]:kc2 -0.0007 0.001 -0.642 0.521 -0.003 0.001
gender[Female]:age[81]:kc2 -0.0009 0.001 -0.982 0.326 -0.003 0.001
gender[Male]:age[81]:kc2 -0.0009 0.001 -1.009 0.313 -0.003 0.001
gender[Female]:age[82]:kc2 -0.0010 0.001 -1.225 0.221 -0.003 0.001
gender[Male]:age[82]:kc2 -0.0010 0.001 -1.269 0.204 -0.002 0.001
gender[Female]:age[83]:kc2 -0.0009 0.001 -0.820 0.412 -0.003 0.001
gender[Male]:age[83]:kc2 -0.0010 0.001 -0.876 0.381 -0.003 0.001
gender[Female]:age[84]:kc2 -0.0013 0.001 -1.962 0.050 -0.003 -1.35e-06
gender[Male]:age[84]:kc2 -0.0014 0.001 -2.050 0.040 -0.003 -6.21e-05
gender[Female]:age[85]:kc2 -0.0011 0.001 -1.448 0.148 -0.003 0.000
gender[Male]:age[85]:kc2 -0.0013 0.001 -1.742 0.082 -0.003 0.000
gender[Female]:age[86]:kc2 -0.0002 0.001 -0.394 0.693 -0.001 0.001
gender[Male]:age[86]:kc2 -0.0004 0.001 -0.633 0.527 -0.001 0.001
gender[Female]:age[87]:kc2 -0.0006 0.001 -0.602 0.547 -0.002 0.001
gender[Male]:age[87]:kc2 -0.0007 0.001 -0.729 0.466 -0.003 0.001
gender[Female]:age[88]:kc2 -0.0006 0.000 -1.271 0.204 -0.001 0.000
gender[Male]:age[88]:kc2 -0.0008 0.000 -1.696 0.090 -0.002 0.000
gender[Female]:age[89]:kc2 -0.0012 0.001 -1.654 0.098 -0.003 0.000
gender[Male]:age[89]:kc2 -0.0012 0.001 -1.616 0.106 -0.003 0.000
gender[Female]:age[90]:kc2 0.0012 0.000 2.731 0.006 0.000 0.002
gender[Male]:age[90]:kc2 0.0011 0.000 2.423 0.015 0.000 0.002
cohort 0.0008 0.000 2.512 0.012 0.000 0.001
==============================================================================
Skew: -0.9376 Kurtosis: 10.1604
Centered skew: -1.0186 Centered kurtosis: 11.2234
==============================================================================
Coefficients (Exchangeable):
Intercept 61.700139
gender[T.Male] -0.336273
age[T.1] -16.149639
age[T.2] -81.610672
age[T.3] -45.848179
...
gender[Female]:age[89]:kc2 -0.001159
gender[Male]:age[89]:kc2 -0.001246
gender[Female]:age[90]:kc2 0.001169
gender[Male]:age[90]:kc2 0.001076
cohort 0.000786
Length: 457, dtype: float64
Covariance matrix (Exchangeable):
Intercept gender[T.Male] age[T.1] \
Intercept 104.051284 -0.259359 -103.683599
gender[T.Male] -0.259359 0.572011 0.562858
age[T.1] -103.683601 0.562858 341.444306
age[T.2] -105.448284 2.646757 103.201352
age[T.3] -102.892747 0.372457 103.200779
... ... ... ...
gender[Female]:age[89]:kc2 0.000030 -0.000135 -0.000151
gender[Male]:age[89]:kc2 -0.000114 0.000177 0.000154
gender[Female]:age[90]:kc2 0.000061 -0.000155 -0.000151
gender[Male]:age[90]:kc2 -0.000080 0.000156 0.000154
cohort -0.000253 -0.000063 0.000095
age[T.2] age[T.3] age[T.4] age[T.5] \
Intercept -105.448280 -102.892746 -104.153345 -103.840081
gender[T.Male] 2.646757 0.372457 -0.768651 0.221345
age[T.1] 103.201350 103.200780 103.201736 103.201449
age[T.2] 770.754232 103.201568 103.203725 103.203398
age[T.3] 103.201565 1009.620463 103.201683 103.200308
... ... ... ... ...
gender[Female]:age[89]:kc2 -0.000710 -0.000105 0.000220 -0.000055
gender[Male]:age[89]:kc2 0.000726 0.000097 -0.000197 0.000065
gender[Female]:age[90]:kc2 -0.000710 -0.000105 0.000220 -0.000055
gender[Male]:age[90]:kc2 0.000726 0.000097 -0.000197 0.000065
cohort 0.000435 -0.000233 0.000629 0.000249
age[T.6] age[T.7] age[T.8] ... \
Intercept -103.329572 -107.544775 -104.394458 ...
gender[T.Male] 0.105185 2.829753 2.922701 ...
age[T.1] 103.201333 103.202769 103.201356 ...
age[T.2] 103.203409 103.206528 103.203950 ...
age[T.3] 103.199439 103.203232 103.198482 ...
... ... ... ... ...
gender[Female]:age[89]:kc2 -0.000028 -0.000742 -0.000795 ...
gender[Male]:age[89]:kc2 0.000029 0.000792 0.000790 ...
gender[Female]:age[90]:kc2 -0.000028 -0.000742 -0.000795 ...
gender[Male]:age[90]:kc2 0.000029 0.000792 0.000790 ...
cohort 0.000036 0.001379 -0.000126 ...
gender[Male]:age[86]:kc2 \
Intercept -5.709266e-05
gender[T.Male] 1.431393e-04
age[T.1] 1.543201e-04
age[T.2] 7.254876e-04
age[T.3] 9.673966e-05
... ...
gender[Female]:age[89]:kc2 -3.332284e-08
gender[Male]:age[89]:kc2 4.494865e-08
gender[Female]:age[90]:kc2 -3.885277e-08
gender[Male]:age[90]:kc2 3.894163e-08
cohort -2.097232e-08
gender[Female]:age[87]:kc2 \
Intercept 2.600574e-05
gender[T.Male] -1.213925e-04
age[T.1] -1.508733e-04
age[T.2] -7.096839e-04
age[T.3] -1.051761e-04
... ...
gender[Female]:age[89]:kc2 2.801980e-08
gender[Male]:age[89]:kc2 -3.843474e-08
gender[Female]:age[90]:kc2 3.317936e-08
gender[Male]:age[90]:kc2 -3.281917e-08
cohort 2.943760e-08
gender[Male]:age[87]:kc2 \
Intercept -1.171463e-04
gender[T.Male] 1.920325e-04
age[T.1] 1.543369e-04
age[T.2] 7.255211e-04
age[T.3] 9.678993e-05
... ...
gender[Female]:age[89]:kc2 -4.627471e-08
gender[Male]:age[89]:kc2 5.850913e-08
gender[Female]:age[90]:kc2 -5.180463e-08
gender[Male]:age[90]:kc2 5.250211e-08
cohort -4.211809e-09
gender[Female]:age[88]:kc2 \
Intercept 7.397461e-05
gender[T.Male] -1.544310e-04
age[T.1] -1.508881e-04
age[T.2] -7.097135e-04
age[T.3] -1.052205e-04
... ...
gender[Female]:age[89]:kc2 3.670860e-08
gender[Male]:age[89]:kc2 -4.766109e-08
gender[Female]:age[90]:kc2 4.186816e-08
gender[Male]:age[90]:kc2 -4.204552e-08
cohort 1.463402e-08
gender[Male]:age[88]:kc2 \
Intercept -6.631661e-05
gender[T.Male] 1.554814e-04
age[T.1] 1.543216e-04
age[T.2] 7.254905e-04
age[T.3] 9.674397e-05
... ...
gender[Female]:age[89]:kc2 -3.664302e-08
gender[Male]:age[89]:kc2 4.832101e-08
gender[Female]:age[90]:kc2 -4.217294e-08
gender[Male]:age[90]:kc2 4.231399e-08
cohort -1.953531e-08
gender[Female]:age[89]:kc2 \
Intercept 2.961007e-05
gender[T.Male] -1.353997e-04
age[T.1] -1.508717e-04
age[T.2] -7.096807e-04
age[T.3] -1.051713e-04
... ...
gender[Female]:age[89]:kc2 3.443083e-07
gender[Male]:age[89]:kc2 2.946097e-07
gender[Female]:age[90]:kc2 3.700612e-08
gender[Male]:age[90]:kc2 -3.658783e-08
cohort 3.103767e-08
gender[Male]:age[89]:kc2 \
Intercept -1.136586e-04
gender[T.Male] 1.771409e-04
age[T.1] 1.543387e-04
age[T.2] 7.255248e-04
age[T.3] 9.679553e-05
... ...
gender[Female]:age[89]:kc2 2.946097e-07
gender[Male]:age[89]:kc2 4.200146e-07
gender[Female]:age[90]:kc2 -4.773333e-08
gender[Male]:age[90]:kc2 4.849845e-08
cohort -2.348689e-09
gender[Female]:age[90]:kc2 \
Intercept 6.113494e-05
gender[T.Male] -1.551129e-04
age[T.1] -1.508819e-04
age[T.2] -7.097011e-04
age[T.3] -1.052019e-04
... ...
gender[Female]:age[89]:kc2 3.700612e-08
gender[Male]:age[89]:kc2 -4.773333e-08
gender[Female]:age[90]:kc2 1.098202e-07
gender[Male]:age[90]:kc2 2.865075e-08
cohort 2.083824e-08
gender[Male]:age[90]:kc2 cohort
Intercept -8.003978e-05 -2.527858e-04
gender[T.Male] 1.557069e-04 -6.282677e-05
age[T.1] 1.543280e-04 9.479177e-05
age[T.2] 7.255033e-04 4.349595e-04
age[T.3] 9.676319e-05 -2.327158e-04
... ... ...
gender[Female]:age[89]:kc2 -3.658783e-08 3.103767e-08
gender[Male]:age[89]:kc2 4.849845e-08 -2.348689e-09
gender[Female]:age[90]:kc2 2.865075e-08 2.083824e-08
gender[Male]:age[90]:kc2 1.170313e-07 -1.312877e-08
cohort -1.312877e-08 1.048762e-07
[457 rows x 457 columns]
Coefficients (AR1):
Intercept 58.312320
gender[T.Male] -0.365359
age[T.1] -15.305257
age[T.2] -79.410465
age[T.3] -44.811238
...
gender[Female]:age[89]:kc2 -0.001167
gender[Male]:age[89]:kc2 -0.001246
gender[Female]:age[90]:kc2 0.001173
gender[Male]:age[90]:kc2 0.001066
cohort 0.000816
Length: 457, dtype: float64
Covariance matrix (AR1):
Intercept gender[T.Male] age[T.1] \
Intercept 214.227678 -0.436678 -213.627372
gender[T.Male] -0.436678 0.725280 0.498252
age[T.1] -213.627375 0.498252 392.729641
age[T.2] -215.415921 3.253271 213.093324
age[T.3] -213.297742 0.440793 213.093128
... ... ... ...
gender[Female]:age[89]:kc2 0.000066 -0.000161 -0.000133
gender[Male]:age[89]:kc2 -0.000174 0.000235 0.000137
gender[Female]:age[90]:kc2 0.000108 -0.000196 -0.000133
gender[Male]:age[90]:kc2 -0.000130 0.000199 0.000137
cohort -0.000283 -0.000067 0.000131
age[T.2] age[T.3] age[T.4] age[T.5] \
Intercept -215.415929 -213.297736 -213.989027 -213.821988
gender[T.Male] 3.253271 0.440793 -0.675115 0.515844
age[T.1] 213.093335 213.093126 213.093831 213.093611
age[T.2] 1003.287902 213.093684 213.095150 213.094768
age[T.3] 213.093698 1216.543644 213.094409 213.093351
... ... ... ... ...
gender[Female]:age[89]:kc2 -0.000878 -0.000120 0.000192 -0.000137
gender[Male]:age[89]:kc2 0.000888 0.000120 -0.000174 0.000143
gender[Female]:age[90]:kc2 -0.000878 -0.000120 0.000192 -0.000137
gender[Male]:age[90]:kc2 0.000888 0.000120 -0.000174 0.000143
cohort 0.000319 -0.000007 0.000566 0.000216
age[T.6] age[T.7] age[T.8] ... \
Intercept -213.292367 -217.988935 -214.835694 ...
gender[T.Male] 0.169357 3.019779 3.322223 ...
age[T.1] 213.093580 213.095206 213.093822 ...
age[T.2] 213.094763 213.098077 213.095366 ...
age[T.3] 213.092856 213.097343 213.092790 ...
... ... ... ... ...
gender[Female]:age[89]:kc2 -0.000045 -0.000795 -0.000901 ...
gender[Male]:age[89]:kc2 0.000047 0.000844 0.000902 ...
gender[Female]:age[90]:kc2 -0.000045 -0.000796 -0.000901 ...
gender[Male]:age[90]:kc2 0.000047 0.000843 0.000902 ...
cohort 0.000052 0.001553 0.000037 ...
gender[Male]:age[86]:kc2 \
Intercept -1.017279e-04
gender[T.Male] 1.804423e-04
age[T.1] 1.372239e-04
age[T.2] 8.877683e-04
age[T.3] 1.194917e-04
... ...
gender[Female]:age[89]:kc2 -3.920958e-08
gender[Male]:age[89]:kc2 5.941576e-08
gender[Female]:age[90]:kc2 -4.869914e-08
gender[Male]:age[90]:kc2 4.944304e-08
cohort -2.277855e-08
gender[Female]:age[87]:kc2 \
Intercept 6.620168e-05
gender[T.Male] -1.537291e-04
age[T.1] -1.331858e-04
age[T.2] -8.779185e-04
age[T.3] -1.196960e-04
... ...
gender[Female]:age[89]:kc2 3.252469e-08
gender[Male]:age[89]:kc2 -5.158691e-08
gender[Female]:age[90]:kc2 4.166627e-08
gender[Male]:age[90]:kc2 -4.197476e-08
cohort 3.172312e-08
gender[Male]:age[87]:kc2 \
Intercept -1.731066e-04
gender[T.Male] 2.430929e-04
age[T.1] 1.372423e-04
age[T.2] 8.878050e-04
age[T.3] 1.195468e-04
... ...
gender[Female]:age[89]:kc2 -5.592855e-08
gender[Male]:age[89]:kc2 7.670061e-08
gender[Female]:age[90]:kc2 -6.541811e-08
gender[Male]:age[90]:kc2 6.672789e-08
cohort -4.411214e-09
gender[Female]:age[88]:kc2 \
Intercept 1.220221e-04
gender[T.Male] -1.935061e-04
age[T.1] -1.332023e-04
age[T.2] -8.779514e-04
age[T.3] -1.197454e-04
... ...
gender[Female]:age[89]:kc2 4.306541e-08
gender[Male]:age[89]:kc2 -6.263528e-08
gender[Female]:age[90]:kc2 5.220699e-08
gender[Male]:age[90]:kc2 -5.302314e-08
cohort 1.524578e-08
gender[Male]:age[88]:kc2 \
Intercept -1.146969e-04
gender[T.Male] 1.998992e-04
age[T.1] 1.372254e-04
age[T.2] 8.877713e-04
age[T.3] 1.194962e-04
... ...
gender[Female]:age[89]:kc2 -4.446683e-08
gender[Male]:age[89]:kc2 6.471880e-08
gender[Female]:age[90]:kc2 -5.395640e-08
gender[Male]:age[90]:kc2 5.474608e-08
cohort -2.129253e-08
gender[Female]:age[89]:kc2 \
Intercept 6.570866e-05
gender[T.Male] -1.613937e-04
age[T.1] -1.331839e-04
age[T.2] -8.779145e-04
age[T.3] -1.196900e-04
... ...
gender[Female]:age[89]:kc2 4.977405e-07
gender[Male]:age[89]:kc2 4.364160e-07
gender[Female]:age[90]:kc2 4.377682e-08
gender[Male]:age[90]:kc2 -4.402420e-08
cohort 3.370659e-08
gender[Male]:age[89]:kc2 \
Intercept -1.736227e-04
gender[T.Male] 2.347681e-04
age[T.1] 1.372445e-04
age[T.2] 8.878093e-04
age[T.3] 1.195533e-04
... ...
gender[Female]:age[89]:kc2 4.364160e-07
gender[Male]:age[89]:kc2 5.942395e-07
gender[Female]:age[90]:kc2 -6.312591e-08
gender[Male]:age[90]:kc2 6.450179e-08
cohort -2.265779e-09
gender[Female]:age[90]:kc2 \
Intercept 1.075024e-04
gender[T.Male] -1.957208e-04
age[T.1] -1.331953e-04
age[T.2] -8.779373e-04
age[T.3] -1.197241e-04
... ...
gender[Female]:age[89]:kc2 4.377682e-08
gender[Male]:age[89]:kc2 -6.312591e-08
gender[Female]:age[90]:kc2 1.845089e-07
gender[Male]:age[90]:kc2 8.151059e-08
cohort 2.241195e-08
gender[Male]:age[90]:kc2 cohort
Intercept -1.300589e-04 -2.832796e-04
gender[T.Male] 1.986838e-04 -6.717833e-05
age[T.1] 1.372326e-04 1.308838e-04
age[T.2] 8.877858e-04 3.193338e-04
age[T.3] 1.195180e-04 -7.181366e-06
... ... ...
gender[Female]:age[89]:kc2 -4.402420e-08 3.370659e-08
gender[Male]:age[89]:kc2 6.450179e-08 -2.265779e-09
gender[Female]:age[90]:kc2 8.151058e-08 2.241195e-08
gender[Male]:age[90]:kc2 1.934184e-07 -1.396921e-08
cohort -1.396921e-08 1.056503e-07
[457 rows x 457 columns]
9. QIC (approximate)¶
In [21]:
def QIC(model):
"""
QIC approximation for Gaussian GEE (scaled)
"""
mu = model.fittedvalues
y = model.model.endog
resid = y - mu
phi = model.scale
# quasi-likelihood under independence
quasi_lik = -0.5 * np.sum((resid ** 2) / phi)
Vi = model.cov_robust
Vm = model.cov_params()
# ensure both are numpy arrays
Vi = np.asarray(Vi)
Vm = np.asarray(Vm)
trace_term = np.trace(np.linalg.solve(Vm, Vi))
return -2 * quasi_lik + 2 * trace_term
qic_ex = QIC(geeEx)
qic_ar1 = QIC(geeAr1)
print(f"QIC (Exchangeable): {qic_ex:.2f}")
print(f"QIC (AR1): {qic_ar1:.2f}")
QIC (Exchangeable): 13158.52 QIC (AR1): 13159.25
10. Forecast PC1 via ARIMA(0,1,0) w/ drift and Build Test Set¶
In [22]:
# Rebuild kc0 compactly (single vector of three blocks from (1,3))
kc_compact = []
for i in [0, 2]:
m1 = M_blocks[i].to_numpy()
m2 = M_blocks[i+1].to_numpy()
kc_part1 = pca_no_center_scale(np.hstack((m1[:, 0:15], m2[:, 0:15])))
kc_part2 = pca_no_center_scale(np.hstack((m1[:, 15:41], m2[:, 15:41])))
kc_part3 = pca_no_center_scale(np.hstack((m1[:, 41:91], m2[:, 41:91])))
kc_compact.extend([*kc_part1, *kc_part2, *kc_part3])
kc0 = np.array(kc_compact)
# Random walk + drift forecast for each of the 6 chunks (length 20 → forecast 11)
ar = []
for i in range(6):
sub = kc0[i*20:(i+1)*20]
model = ARIMA(sub, order=(0,1,0), trend="t")
fit = model.fit()
fc = fit.forecast(steps=11)
ar.extend(fc)
# Combine forecast blocks into repeated patterns across ages and groups
kc_list = []
indices = np.arange(0, len(ar), 33)
for i in indices:
ar1 = ar[i:i+11]
ar2 = ar[i+11:i+22]
ar3 = ar[i+22:i+33]
result = np.tile(
np.concatenate([np.tile(ar1, 15), np.tile(ar2, 26), np.tile(ar3, 50)]),
2
)
kc_list.append(result)
kc1_f = np.concatenate(kc_list)
kc2_f = kc1_f**2
print("kc1_f length:", len(kc1_f))
print("kc2_f length:", len(kc2_f))
# Combine observed first 20 and forecast next 11 for a quick plot
kc1_train_20 = ASDRs["kc1"].values[:20]
kc1_forecast_11 = kc1_f[:11]
kc_combined = np.concatenate([kc1_train_20, kc1_forecast_11])
plt.figure(figsize=(8,4))
plt.plot(range(1, len(kc_combined)+1), kc_combined, marker="o")
plt.axvline(20, color="red", linestyle="--", label="Forecast start")
plt.title("Observed (1–20) and Forecasted (21–31) kc1")
plt.xlabel("Time index")
plt.ylabel("kc1 value")
plt.legend()
plt.grid(True)
plt.show()
print("ASDRs kc1[1:20]:")
print(kc1_train_20)
print("\nkc0[1:20]:")
print(kc0[:20])
# Build test frame for 2011–2021
t_test = 11
gender = (["Female"] * (91 * t_test) + ["Male"] * (91 * t_test)) * 2
country = ["AUT"] * (2 * 91 * t_test) + ["CZE"] * (2 * 91 * t_test)
year = np.tile(np.arange(2011, 2011 + t_test), 4 * 91)
age_levels = np.arange(0, 91)
age = np.tile(np.repeat(np.arange(0, 91), t_test), 4)
cohort = year - age
# Response variable from MB0 rows 21–31
y_test = M0.iloc[20:31, :].to_numpy().ravel(order="F")
newASDRs = pd.DataFrame({
"kc1": kc1_f,
"kc2": kc2_f,
"cohort": cohort,
"y": y_test,
"age": age,
"gender": gender,
"Country": country,
"year": year
})
newASDRs["age"] = pd.Categorical(newASDRs["age"], categories=age_levels, ordered=True)
newASDRs["gender"] = pd.Categorical(newASDRs["gender"], categories=["Female", "Male"])
newASDRs["Country"] = pd.Categorical(newASDRs["Country"], categories=["AUT", "CZE"])
newASDRs["year"] = pd.Categorical(newASDRs["year"], categories=np.arange(2011, 2022), ordered=True)
newASDRs["subject"] = (
newASDRs["Country"].astype(str) + "_" + newASDRs["gender"].astype(str) + "_" + newASDRs["age"].astype(str)
)
print(newASDRs.info())
display(newASDRs.head())
kc1_f length: 4004 kc2_f length: 4004
ASDRs kc1[1:20]: [46.02697874 46.31293695 45.28994691 46.00825074 46.73129272 46.91256749 46.9803026 47.15754359 47.41160418 47.34850454 48.19512633 48.99646992 48.48800451 48.07626729 48.15545539 48.78330713 49.68757755 49.90787305 48.78115134 49.91141693] kc0[1:20]: [46.02697874 46.31293695 45.28994691 46.00825074 46.73129272 46.91256749 46.9803026 47.15754359 47.41160418 47.34850454 48.19512633 48.99646992 48.48800451 48.07626729 48.15545539 48.78330713 49.68757755 49.90787305 48.78115134 49.91141693] <class 'pandas.core.frame.DataFrame'> RangeIndex: 4004 entries, 0 to 4003 Data columns (total 9 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 kc1 4004 non-null float64 1 kc2 4004 non-null float64 2 cohort 4004 non-null int64 3 y 4004 non-null float64 4 age 4004 non-null category 5 gender 4004 non-null category 6 Country 4004 non-null category 7 year 4004 non-null category 8 subject 4004 non-null object dtypes: category(4), float64(3), int64(1), object(1) memory usage: 175.6+ KB None
| kc1 | kc2 | cohort | y | age | gender | Country | year | subject | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 50.115856 | 2511.599030 | 2011 | -5.891180 | 0 | Female | AUT | 2011 | AUT_Female_0 |
| 1 | 50.320295 | 2532.132112 | 2012 | -5.719324 | 0 | Female | AUT | 2012 | AUT_Female_0 |
| 2 | 50.524734 | 2552.748784 | 2013 | -5.922384 | 0 | Female | AUT | 2013 | AUT_Female_0 |
| 3 | 50.729174 | 2573.449047 | 2014 | -5.778350 | 0 | Female | AUT | 2014 | AUT_Female_0 |
| 4 | 50.933613 | 2594.232900 | 2015 | -5.843578 | 0 | Female | AUT | 2015 | AUT_Female_0 |
11. Predict Test Set with GEE(AR1) and Plot Observed vs Predicted¶
In [23]:
newASDRs["pred"] = geeAr1.predict(newASDRs)
display(newASDRs[["y", "pred"]].head())
plt.figure(figsize=(7,4))
plt.scatter(newASDRs["y"], newASDRs["pred"], alpha=0.6)
lo = min(newASDRs["y"].min(), newASDRs["pred"].min())
hi = max(newASDRs["y"].max(), newASDRs["pred"].max())
plt.plot([lo, hi], [lo, hi], color="red", linestyle="--", label="Perfect fit")
plt.xlabel("Observed y")
plt.ylabel("Predicted y")
plt.title("Observed vs Predicted (GEE AR1)")
plt.legend()
plt.tight_layout()
plt.show()
| y | pred | |
|---|---|---|
| 0 | -5.891180 | -5.791370 |
| 1 | -5.719324 | -5.791000 |
| 2 | -5.922384 | -5.788455 |
| 3 | -5.778350 | -5.783734 |
| 4 | -5.843578 | -5.776838 |
12. Test-set MSE by Country × Gender¶
In [24]:
M0_blocks = [dat.iloc[:, i*91:(i+1)*91] for i in range(4)]
MSE_test_gee_pca = []
for n in range(4):
start = n * (11 * 91)
end = (n + 1) * (11 * 91)
gee_pred = np.exp(np.array(newASDRs["pred"].iloc[start:end]).reshape(11, 91, order="F"))
actual = np.exp(M0_blocks[n].iloc[20:31, :].to_numpy()) # rows 21–31
err = actual - gee_pred
MSE_test_gee_pca.append(np.sum(err**2) / (91 * 11))
print("MSE_test_gee_pca:", MSE_test_gee_pca)
group_labels = ["AUT_Female", "AUT_Male", "CZE_Female", "CZE_Male"]
mse_table = pd.DataFrame({"Group": group_labels, "MSE_Test_GEE_PCA": MSE_test_gee_pca})
display(mse_table)
best_idx = mse_table["MSE_Test_GEE_PCA"].idxmin()
best_group = mse_table.loc[best_idx, "Group"]
best_val = mse_table.loc[best_idx, "MSE_Test_GEE_PCA"]
print(f"Lowest MSE → {best_group} ({best_val:.7f})")
sns.set_theme(style="whitegrid")
plt.figure(figsize=(7,4))
sns.barplot(x="Group", y="MSE_Test_GEE_PCA", data=mse_table)
plt.title("Test-set MSE by Country × Gender (GEE PCA)")
plt.ylabel("Mean Squared Error")
plt.xlabel("")
plt.xticks(rotation=30)
plt.tight_layout()
plt.show()
MSE_test_gee_pca: [np.float64(5.2094674142569386e-06), np.float64(9.812791288944782e-06), np.float64(1.2683016210362278e-05), np.float64(3.614005543425049e-05)]
| Group | MSE_Test_GEE_PCA | |
|---|---|---|
| 0 | AUT_Female | 0.000005 |
| 1 | AUT_Male | 0.000010 |
| 2 | CZE_Female | 0.000013 |
| 3 | CZE_Male | 0.000036 |
Lowest MSE → AUT_Female (0.0000052)