Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

preProcess

Compute a weighted sample from initial observations


Description

Generates weights from initial sample.

Usage

preProcess(x, xgrid = NULL)

Arguments

x

Vector of independent and identically distributed numbers, not necessarily unique.

xgrid

Parameter that governs the generation of weights: If xgrid = NULL a new sample of unique observations is generated with corresponding vector of weights. If xgrid is a positive number, observations are binned in a grid with grid length xgrid. Finally, an entire vector specifying a user-defined grid can be supplied.

Value

x

Vector of unique and sorted observations deduced from the input x according to the specification given by xgrid.

w

Vector of corresponding weights, normalized to sum to one.

sig

Standard deviation of the inputed observations. This quantity is needed when computing the smoothed log-concave density estimator via evaluateLogConDens.

n

Number of initial observations.

Note

This function is not intended to be invoked by the end user.

Author(s)


logcondens

Estimate a Log-Concave Probability Density from Iid Observations

v2.1.5
GPL (>= 2)
Authors
Kaspar Rufibach <kaspar.rufibach@gmail.com> and Lutz Duembgen <duembgen@stat.unibe.ch>
Initial release
2016-07-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.