# The US mortality data 1959-2020, for one populations (female)
# and 3 states (New York, California, Illinois)
# first define the parameters and the row partitions.
# Define some parameters.
year = 1959:2020
age = 0:100
n_prefectures = 3
#Load the US data. Make sure it is a matrix.
Y <- all_hmd_female_data
# Compute the functional median polish decomposition.
FMP <- One_way_median_polish(Y,n_prefectures=3,year=1959:2020,age=0:100)
# The results
##1. The funcional grand effect
FGE <- FMP$grand_effect
##2. The funcional row effect
FRE <- FMP$row_effect
Run the code above in your browser using DataLab