dens.plot: Density Plotter

Description Usage Arguments Value Author(s) Examples

Description

This function takes between 1 and 5 arguments to plot the density of data, using the dens.estimator function.

Usage

1
dens.plot(x,n=500,method="naive",from,to)

Arguments

x

is data given as a vector of numbers, to estimate density from.

n

is a positive integer that specifies the number of points to be used for plotting the density function. Defaults to 500.

method

is an argument that is either "naive" or "kernel", deciding the method of estimating the density. Defaults to "naive".

from

is a number that specifies where the plot should start. Defaults to min(x)-sd(x)/3

to

is a number that specifies where the plot should end. Defaults to max(x)+sd(x)/3

Value

Returns a density plot over the input data x, with information calculated depending on other inputs, or lack thereof.

Author(s)

Nguyen Khanh Le Ho & Emil H. Andersen
Department of Mathematics and Computer Science (IMADA)
University of Southern Denmark, Denmark
emila14@student.sdu.dk
ngho14@student.sdu.dk

Examples

1
2
3
dens.plot(cars$speed)
dens.plot(cars$speed,method="kernel")
dens.plot(cars$speed,n=512,method="naive", from=10, to=20)

Chaiji/LemilExamST522 documentation built on May 6, 2019, 9:55 a.m.