Learn R Programming

logcondens (version 2.0.6)

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

Value

  • xVector of unique and sorted observations deduced from the input x according to the specification given by xgrid.
  • wVector of corresponding weights, normalized to sum to one.
  • sigStandard deviation of the inputed observations. This quantity is needed when computing the smoothed log-concave density estimator via evaluateLogConDens.
  • nNumber of initial observations.