Description Usage Arguments Details Value Note Author(s) References See Also

Fit a multilevel functional principal component model. The function uses two-step functional principal component decompositions.

1 2 3 |

`mort_female` |
Female mortality (p by n matrix), where p denotes the dimension and n denotes the sample size. |

`mort_male` |
Male mortality (p by n matrix). |

`mort_ave` |
Total mortality (p by n matrix). |

`percent_1` |
Cumulative percentage used for determining the number of common functional principal components. |

`percent_2` |
Cumulative percentage used for determining the number of sex-specific functional principal components. |

`fh` |
Forecast horizon. |

`level` |
Nominal coverage probability of a prediction interval. |

`alpha` |
1 - Nominal coverage probability. |

`MCMCiter` |
Number of MCMC iterations. |

`fmethod` |
Univariate time-series forecasting method. |

`BC` |
If Box-Cox transformation is performed. |

`lambda` |
If |

The basic idea of multilevel functional data method is to decompose functions from different sub-populations into an aggregated average, a sex-specific deviation from the aggregated average, a common trend, a sex-specific trend and measurement error. The common and sex-specific trends are modelled by projecting them onto the eigenvectors of covariance operators of the aggregated and sex-specific centred stochastic process, respectively.

`first_percent` |
Percentage of total variation explained by the first common functional principal component. |

`female_percent` |
Percentage of total variation explained by the first female functional principal component in the residual. |

`male_percent` |
Percentage of total variation explained by the first male functional principal component in the residual. |

`mort_female_fore` |
Forecast female mortality in the original scale. |

`mort_male_fore` |
Forecast male mortality in the original scale. |

It can be quite time consuming, especially when MCMCiter is large.

Han Lin Shang

C. M. Crainiceanu and J. Goldsmith (2010) "Bayesian functional data analysis using WinBUGS", *Journal of Statistical Software*, **32**(11).

C-Z. Di and C. M. Crainiceanu and B. S. Caffo and N. M. Punjabi (2009) "Multilevel functional principal component analysis", *The Annals of Applied Statistics*, **3**(1), 458-488.

V. Zipunnikov and B. Caffo and D. M. Yousem and C. Davatzikos and B. S. Schwartz and C. Crainiceanu (2015) "Multilevel functional principal component analysis for high-dimensional data", *Journal of Computational and Graphical Statistics*, **20**, 852-873.

H. L. Shang, P. W. F. Smith, J. Bijak, A. Wisniowski (2016) "A multilevel functional data method for forecasting population, with an application to the United Kingdom", *International Journal of Forecasting*, **32**(3), 629-649.

`ftsm`

, `forecast.ftsm`

, `fplsr`

, `forecastfplsr`

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.