Description Usage Arguments Details Value Author(s) References See Also Examples
This code produces one-dimensional density estimates satisfying "soft" conditions like unimodality. A number of possible soft conditions are permitted. This version calls the nloptr suite of optimizers. Convergence is not particularly fast.
| 1 2 | 
| data | Numeric vector of data for density estimate. | 
| lower | Lower bound for density support. If missing, use default as set in 
 | 
| upper | Upper bound for density support. If missing, use default as set in 
 | 
| N | Integer: number of segments. Default 10. | 
| M | Integer: number of points within each segment to consider. Default 5. | 
| order | Integer: order of polynomials used in spline fits. Currently this must be 2. | 
| softinfo | List of "soft" conditions to be imposed on the density estimate. See
 | 
| opt.args | List of arguments to be passed to global optimizer. See 
 | 
| opt.local.args | List of arguments to be passed to local optimizer. See 
 | 
| postproc.controls | List of arguments for post-processing. See
 | 
This function produces a density estimator for data data, imposing
constraints in softinfo. The density is in the form of an 
exponential epi-spline. An epi-spline is like a spline estimator in that
in consists of polynomials between knots. However, the polynomials are not
automatically constrained to meet at knots.  The density estimate is an
exponential epi-spline,  which is exp(- s) where s is the
epi-spline value.
A list of class c("episplineDensity", "nloptr") with the output 
from nloptr, plus additional items:
| softinfo  | The softinfo as passed to the optimizer, consisting of what was passed into this function plus some defaults | 
| epiparameters  | Epiparameters, as generated by 
 | 
| caseinfo  | A list with the sample size, as  | 
| x  | Copy of the data | 
| c.out  | Coefficients associated with this set of data. | 
| opts  | Copy of opts. See  | 
| orig.integral  | If the postprocessing option  | 
| integral  | If the postprocessing option  | 
Sam Buttrey, after Matlab code from Royset and Wets.
Royset and Wets, Nonparametric Density Estimation with Soft Information Using Exponential Epi-Splines, in press.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
n10 <- c(-0.795173769, -0.268865287, -0.032803042, -0.361751212, 
0.699170399, -0.909275685, 0.452956532, 1.501356616, 1.669061521, 
-0.524919503)
#
# Generate a unimodal estimate. Plot automatically.
#
## Not run: soft <- setup.softinfo (10, unimodal = TRUE)
## Not run: expepi (n10, softinfo = soft)
#
# Generate a unimodal estimate, but constrain the second non-central
# moment to be <= 0.4. Plot automatically. This command will require
# a couple of minutes to run.
#
## Not run: soft$upperbound2moment <- 0.4
## Not run: expepi (n10, softinfo = soft)
#
# Generate a nondecreasing estimate without plotting.
#
## Not run: soft <- setup.softinfo (10, monotone="nondecreasing")
## Not run: n10.out <- expepi (n10, softinfo = soft, postproc.controls = 
 postproc.control (pic.types = NULL))
## End(Not run)
#
# Now plot.
#
## Not run: plot (n10.out)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.