Dens1d function

Object creation for density estimation from right- or interval-censored data

Object creation for density estimation from right- or interval-censored data

Object creation for density estimation from right- or interval-censored data using function densityLPS .

Dens1d(y, event=NULL, ymin=NULL, ymax=NULL, K=25, equid.knots=TRUE, pen.order=2, nbins=501)

Arguments

  • y: a n-vector (if no interval-censored data) or a nx2 matrix (left and right limits of the interval for IC data ; right limit set to Inf for right-censored data).
  • event: a n-vector of observation indicators (0: right-censored ; 1: exactly observed or interval-censored).
  • ymin: left limit of the variable support.
  • ymax: right limit of the variable support.
  • K: number of B-splines in the basis to approximate the log-hazard.
  • equid.knots: logical indicating if equidistants knots are desired.
  • pen.order: penalty order when equidistant knots (otherwise: penalty matrix computed to penalize the second derivative).
  • nbins: number of small bins used for quadrature and approximations.

Returns

A Dens1d.object , i.e. a list with summary measures and precomputed components required for density estimation using densityLPS.

Examples

library(DALSM) data(DALSM_IncomeData) resp = DALSM_IncomeData[,1:2] head(resp,n=20) temp = Dens1d(y=resp,ymin=0) ## Create Dens1d object from positive censored data obj = densityLPS(temp) ## Density estimation from IC & RC data plot(obj) ## Visualize the estimated density

References

Lambert, P. (2021). Fast Bayesian inference using Laplace approximations in nonparametric double additive location-scale models with right- and interval-censored data. Computational Statistics and Data Analysis, 161: 107250. doi:10.1016/j.csda.2021.107250

See Also

Dens1d.object, densityLPS.

Author(s)

Philippe Lambert p.lambert@uliege.be

  • Maintainer: Philippe Lambert
  • License: GPL-3
  • Last published: 2023-10-02