pclm.compmat: Create composition matrix object

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

Description

Construct the composition matrix object for automatically recalibrated age classes.

The internal function.

Usage

1
pclm.compmat(x, y, exposures = NULL, control = list())

Arguments

x

Vector with start of the interval for age/time classes. x * x.div must be an integer. The appropriate correction for fractional intervals based on the interval multiple (pclm.interval.multiple) is performed in pclm.default.

y

Vector with counts, e.g. ndx. It must have the same length as x.

exposures

Vector with exposures used to calculate smoothed mortality rates (see reference [1] and pclm.default).

control

List with additional parameters. See pclm.control.

Details

The details of matrix construction can be found in reference [1]. if bs.use == TRUE then P- or B- splines are used instead of identity matrix (see pclm.control).

The dimension of constructed composition matrix can be determined before its computation. The shorter dimension equals to the length of data vector + 1, whereas the longer dimension is determined by the function pclm.nclasses and for zero.class.end == NULL equals:

(x.div * (max(x) - min(x)) * m) * (1 + zero.class.frac) + 1

or

x.div * (zero.class.end - min(x)) * m + 1

otherwise, where m is an interval multiple calculated by pclm.interval.multiple. See also pclm.nclasses.

Value

List with components:

C

Composition matrix.

X

B-spline base, P-spline base, or identity matrix.

x

Corrected age/time vector.

y

Corrected vector with counts.

open.int.len

Length of the open interval in age classes.

exposures

Vector with exposures if it was used to construct the composition matrix.

control

Used control parameters, see pclm.control.

warn.list

List with warnings.

Author(s)

Maciej J. Danko <danko@demogr.mpg.de> <maciej.danko@gmail.com>

References

  1. Rizzi S, Gampe J, Eilers PHC. Efficient estimation of smooth distributions from coarsely grouped data. Am J Epidemiol. 2015;182:138?47.

  2. Camarda, C. G. (2012). MortalitySmooth: An R Package for Smoothing Poisson Counts with P-Splines. Journal of Statistical Software. 50, 1-24.

  3. Hastie, T. J. (1992) Generalized additive models. Chapter 7 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.

See Also

pclm.default, pclm.control, pclm.interval.multiple, and pclm.nclasses.


MaciejDanko/pclm documentation built on May 3, 2019, 3:36 p.m.