Two_way_median_polish: Two-way functional median polish from Sun and Genton (2012)

View source: R/Two_way_median_polish.R

Two_way_median_polishR Documentation

Two-way functional median polish from Sun and Genton (2012)

Description

Decomposition by two-way functional median polish

Usage

Two_way_median_polish(Y, year=1959:2020, age=0:100, n_prefectures=51, n_populations=2)

Arguments

Y

A matrix with dimension n by 2p. The functional data.

year

Vector with the years considered in each population.

n_prefectures

Number of prefectures

age

Vector with the ages considered in each year.

n_populations

Number of populations.

Value

grand_effect

grand_effect, a vector of dimension p

row_effect

row_effect, a matrix of dimension length(row_partition_index) by p.

col_effect

col_effect, a matrix of dimension length(column_partition_index) by p

Author(s)

Cristian Felipe Jimenez Varon, Ying Sun, Han Lin Shang

References

C. F. Jimenez Varon, Y. Sun and H. L. Shang (2023) “Forecasting high-dimensional functional time series: Application to sub-national age-specific mortality".

Sun, Ying, and Marc G. Genton (2012) “Functional Median Polish", Journal of Agricultural, Biological, and Environmental Statistics, 17(3), 354-376.

See Also

FANOVA

Examples

# 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

ftsa documentation built on Sept. 11, 2023, 5:09 p.m.