Usage
fdm(data, series = names(data$rate)[1], order = 6, ages = data$age,
max.age = 100, method = c("classical", "M", "rapca"), lambda = 3,
mean = TRUE, level = FALSE, transform = TRUE, ...)
Arguments
data
demogdata object. Output from read.demogdata.
series
name of series within data holding rates (1x1)
order
Number of basis functions to fit.
ages
Ages to include in fit.
max.age
Maximum age to fit. Ages beyond this are collapsed into the upper age group.
method
Method to use for principal components decomposition.
Possibilities are M, rapca and classical. See ftsm
for details. lambda
Tuning parameter for robustness when method="M"
.
mean
If TRUE, will estimate mean term in the model before computing basis terms. If FALSE, the mean term is assumed to be zero.
level
If TRUE, will include an additional (intercept) term that depends on the year but not on ages.
transform
If TRUE, the data are transformed with a Box-Cox transformation before the model is fitted.
...
Extra arguments passed to ftsm
.