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 dataobj = densityLPS(temp)## Density estimation from IC & RC dataplot(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