powered by
Derives the mode, estimating the value of a continuous variable.
calcmode(data,adjust=1)
Returns the numeric value of the mode.
vector used to estimate the mode.
increase this value to make the density estimate smoother.
Adapted from https://stat.ethz.ch/pipermail/r-help/2008-August/172323.html.
vect1 = rchisq(1000,df=3) calcmode(vect1) vect1
Run the code above in your browser using DataLab