fitted2dens: Prepare data for ggplots in plot.MEM function

Description Usage Arguments Examples

View source: R/plot_MEM.R

Description

Prepare data for ggplots in plot.MEM function

Usage

1
fitted2dens(mat, x, y, ny = 7, lx0 = 300)

Arguments

mat

Matrix containing the observed or fitted value.

x

Numerical vector indicating the ages in input data. Optional. Default: NULL.

y

Numerical vector indicating the years in input data. Optional. Default: NULL.

ny

Number of years to be selected from input data and to be added in the plot.

lx0

Adjusting parameter.

Examples

1
2
3
4
5
x  <- 0:110
y  <- 1965:2014
dx <- HMD_male$dx$GBRTENW[paste(x), paste(y)]
M  <- model.MEM(dx, x, y, n = 5)
fitted2dens(fitted(M), x, y[-1])

mpascariu/MortalityForecast documentation built on Sept. 28, 2020, 2:40 p.m.