pclm.control: Auxiliary for controlling PCLM fitting

Description Usage Arguments Value Author(s) References See Also

Description

Auxiliary function for controlling PCLM fitting. Use this function to set control parameters of the pclm.default and other related functions.

Usage

1
2
3
4
5
6
7
8
pclm.control(x.div = 1L, x.auto.trans = TRUE, x.max.ext = 25L,
  zero.class.add = TRUE, zero.class.end = NULL, zero.class.frac = 0.2,
  bs.use = "auto", bs.method = c("MortalitySmooth", "bs"),
  bs.df = c("maxprec", "thumb"), bs.df.max = 250L, bs.deg = 3L,
  opt.method = c("BIC", "AIC"), opt.tol = .Machine$double.eps^0.5,
  pclm.deg = 2L, pclm.max.iter = 100L,
  pclm.lsfit.tol = .Machine$double.eps^0.5,
  pclm.tol = .Machine$double.eps^0.5)

Arguments

x.div

Number of sub-classes within PCLM tim/age class (default is 1). Low value of the parameter makes the PCLM computation faster. It is however recommended to set it to higher value (e.g. 10) for better nax estimates.

x.auto.trans

Logical indicating if automatically multiple age intervals to remove fractions. TRUE is the recommended value. See also examples in pclm.default.

x.max.ext

Integer defining maximal multiple of an age interval. See also pclm.interval.multiple.

zero.class.add

Logical indicating if additional zero count class (open interval) should be added after last age class. TRUE is the recommended value. See pclm.nclasses and pclm.compmat.

zero.class.end

Positive indicating the end of zero count class = anticipated end of last (open) interval. If set to NULL and zero.class.add == TRUE then it is calculated automatically based on zero.class.frac. See pclm.nclasses and pclm.compmat.

zero.class.frac

Fraction of total range of x (age/time vector) added as the last zero-count interval when zero.class.end == NULL. Used in pclm.compmat. Increase this value if the right tail of the PCLM fit is badly fitted (use plot.pclm to diagnose).

bs.use

Logical indicating if use B- or P-spline basis to speed-up computations. Possible values: "auto", TRUE, and FALSE. Used by pclm.compmat function.

bs.method

Basis for B- or P-spline used by pclm.compmat function. Possible values:

  • "MortalitySmooth" - gives "P-splines" basis based on MortSmooth_bbase of MortalitySmooth package (recommended)

  • "bs" - gives basic B-splines basis based on bs splines.

bs.df

B- or P- spline degree of freedom (df, number of inner knots) or a way to its calculation used in pclm.compmat function. The value is automatically limited by the bs.df.max. It can take corresponding values:

  • "maxprec" - df equal to the number of ungrouped (raw) age classes (recommended option).

  • "thumb" - 'rule of thumb': one knot for the B-spline basis each 4-5 observations.

  • integer - df given explicitly.

bs.df.max

Maximal number of knots (df) for B- or P-spline basis. Defaut value is 250, but can be decreased if computations are slow. Used in pclm.compmat.

bs.deg

Degree of the piecewise polynomial for B- or P-spline basis. Default and recommended value is 3. Used in pclm.compmat.

opt.method

Selection criterion for lambda (smooth parameter) in pclm.opt function. Possible values are "AIC" and "BIC" (recommended).

opt.tol

Tolerance for pclm.opt function that estimates smooth parameter lambda.

pclm.deg

Order of differences of the components of b (PCLM coeficients, beta in the reference [1]). Default value is 2, some other values may cause algorithm to not work properly. Used by pclm.core function.

pclm.max.iter

Maximal number of iterations in pclm.core function. Default is 100, but increase it when got a warning.

pclm.lsfit.tol

Tolerance for lsfit function used in pclm.core function.

pclm.tol

Tolerance for pclm.core function.

Value

List with control parameters.

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.

See Also

pclm.default, pclm.core, pclm.opt, pclm.aggregate, pclm.compmat, pclm.interval.multiple, pclm.nclasses, plot.pclm, and summary.pclm.


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