kernsmooth: Kernel smoothing

Description Usage Arguments References Examples

View source: R/kern.R

Description

Kernel Smoothing as described by von Davier, Holland & Thayer (2004). It can be used for demonstrational pourposes while a lower level function is used internally in smoothtab for postsmoothing and there is no need for using kernsmooth directly.

Usage

1
2
3
4
5
6
7
kernsmooth(x, h = "auto", grid = 100)

## S3 method for class 'kernsmooth'
plot(x, type = "l", add = FALSE, ...)

## S3 method for class 'kernsmooth'
cdfplot(x, type = "s", add = FALSE, ...)

Arguments

x

vector of values.

h

smoothing bandwidth: as h goes bigger the distribution is transformed to into normal distribution. If set to "auto" (default) it uses automatic algorithm for selecting its value (von Davier, Holland & Thayer, 2004).

grid

number of points to be created.

type

type of the plot.

add

add a plot to previous one.

...

potentially further arguments passed from other methods.

References

von Davier, A.A., Holland, P.W. & Thayer, D.T. (2004). The Kernel Method of Test Equating. New York: Springer-Verlag.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(Tests)
x <- Tests[Tests$Sample == "P", "x"]

ct <- conttab(x, prob=TRUE)

plot(ct, col="red", ylim=c(0, 0.13))

for (i in seq(.35, 2.5, by=.1))
  lines(kernsmooth(x, h=i, grid=1000)$data)

(ks <- kernsmooth(x))
plot(ks)
cdfplot(ks)

twolodzko/equi documentation built on Nov. 11, 2020, 4:04 p.m.