View source: R/One_way_median_polish.R
One_way_median_polish | R Documentation |
Decomposition by one-way functional median polish.
One_way_median_polish(Y, n_prefectures=51, year=1959:2020, age=0:100)
Y |
The multivariate functional data, which are a matrix with dimension n by 2p, where n is the sample size and p is the dimensionality. |
year |
Vector with the years considered in each population. |
n_prefectures |
Number of prefectures. |
age |
Vector with the ages considered in each year. |
grand_effect |
Grand_effect, a vector of dimension p. |
row_effect |
Row_effect, a matrix of dimension length(row_partition_index) by p. |
Cristian Felipe Jimenez Varon, Ying Sun, Han Lin Shang
C. F. Jimenez Varon, Y. Sun and H. L. Shang (2023) “Forecasting high-dimensional functional time series: Application to sub-national age-specific mortality", arXiv. \ Sun, Ying, and Marc G. Genton (2012) “Functional Median Polish", Journal of Agricultural, Biological, and Environmental Statistics 17(3), 354-376.
One_way_Residuals
, Two_way_median_polish
, Two_way_Residuals
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.