# The US mortality data 1959-2020 for two populations and three states
# (New York, California, Illinois)
# Compute the functional median polish decomposition.
FMP = Two_way_median_polish(cbind(all_hmd_male_data, all_hmd_female_data),
n_prefectures = 3, year = 1959:2020, age = 0:100, n_populations = 2)
##1. The functional grand effect
FGE = FMP$grand_effect
##2. The functional row effect
FRE = FMP$row_effect
##3. The functional column effect
FCE = FMP$col_effect
Run the code above in your browser using DataLab