|uncensored ||vector of uncensored observations from the distribution whose density is
to be estimated. If there are no uncensored observations, plug in any non-numeric type
to omit this parameter. However, either uncensored observations or the interval must be specified.
|right ||vector of right censored observations from the distribution
whose density is to be estimated. If there are no right censored observations,
plug in any non-numeric type.
|left ||vector of left censored observations from the distribution
whose density is to be estimated. If there are no left censored
observations, plug in any non-numeric type.
|interval ||two column matrix of lower and upper bounds of observations
that are interval censored from the distribution whose density is
to be estimated. If there are no interval censored observations, plug in
any non-numeric type.
|lbound, ubound ||lower and upper bounds for the support of the density. For example, if there
is a priori knowledge that the density equals zero to the left of 0
and has a discontinuity at 0, the user could specify lbound=0.
However, if the density is essentially zero near 0, one does not need to
specify lbound. To omit these parameters plug in any non-numeric type.
|indel ||optional scalar, should stepwise knot deletion be employed (non-zero value) or not (zero, default)?
|nknots ||optional vector, forces the method to start with nknots knots (indel=1) or to fit a
density with nknots knots (indel=0). The method has an automatic rule
for selecting nknots if this parameter is not specified.
|inputknots ||optional ordered vector of values (that should cover the complete range of the
observations), which forces the method to start with these knots (indel=1)
or to fit a density with these knots (indel=0). Overrules nknots.
If inputknots is not specified, a default knot-placement rule is employed.
|inpenalty ||optional scalar, the parameter to be used in the AIC criterion. The method chooses
the number of knots that minimizes -2*loglikelihood+inpenalty*(number of inputknots-1).
The default is to use inpenalty=log(samplesize) as in BIC. The effect of
this parameter is summarized in logsplinesummary().
|coef ||coefficients of the spline. The first coefficient is the constant term,
the second is the linear term and the k-th (k>2) is the coefficient
of (x-t[k-2])^3+ (where ^3+ means the positive part of the third power,
and t[k-2] means knot k-2). If a coefficient is zero, the corresponding
knot was deleted from the model.|
|knots ||vector of the locations of the knots in the logspline model|
|bound ||first element: 0 - lbound was -infinity, 1 it was something else;
second element: lbound, if specified;
third element: 0 - ubound was infinity, 1 it was something else;
fourth element: ubound, if specified.|
|logl ||the k-th element is the log-likelihood of the fit with k+2 knots.|
|penalty ||the penalty that was used.|
|sample ||the sample size that was used.|
|del ||was stepwise knot deletion employed?|
data = read("geyser")
fit = logsplinefit(data[,1], "no","no","no","no","no",1,6,"no",7)
setgopt(plotdisplay,1,1,"title", "Density Function of Geyser Data")
A graph of estimated density and the following text output of the fit:
Contents of fit.coef
Contents of fit.knots
Contents of fit.bound
Contents of fit.logl
Contents of fit.penalty
Contents of fit.sample
Contents of fit.del