smoothtab: Presmoothing and postsmoothing of empirical distributions

Description Usage Arguments Value Note References Examples

View source: R/smoothtab.R

Description

Function for Log-linear presmoothing and/or Gaussian Kernel postsmoothing.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
smoothtab(x, y, presmoothing = FALSE, postsmoothing = FALSE,
  bandwidth = "auto", lldeg = 4, llxdeg = 1, raw = TRUE, cdf = TRUE,
  margin = 0.5, grid = 100)

as.smoothtab(x)

is.smoothtab(x)

## S3 method for class 'smoothtab'
plot(x, type = "s", lty = 1:6, add = FALSE, ...)

## S3 method for class 'smoothtab'
cdfplot(x, add = FALSE, ...)

Arguments

x,

y numeric vectors.

presmoothing

if TRUE Log-linear presmoothing is applied.

postsmoothing

if TRUE Gaussian Kernel postsmoothing is applied.

bandwidth

sets bandwidth for Kernel Smoothing. Use "auto" (default) for automatic selection of bandwidth.

lldeg

degree of the polynomial in log-linear presmoothing (deafult is 4).

llxdeg

degree of the polynomial in log-linear presmoothing for interaction term (deafult is 1).

raw

if TRUE computes raw polynomials for log-linear presmoothing, see: poly.

cdf

if FALSE compute probabilities rather than cumulative probabilities (default).

margin

if postsmoothing=TRUE, it defines the margins of points range to be created using Gaussian Kernel postsmoothing. The function returns point values +/- margin.

grid

if postsmoothing=TRUE, it defines the number of points to be created using Gaussian Kernel postsmoothing.

type

type of the plot.

lty

a vector of line types, see: par.

add

add a plot to previous one.

...

potentially further arguments passed from other methods.

Value

Returns two-column data.frame with unique score points and coresponding probabilities, or a list of two data.frames for marginal probabilities of joint distributions.

Note

See also equate and kequate packages.

References

Holland, P.W. & Thayer, D.T. (2000). Univariate and Bivariate Loglinear Models for Discrete Test Score Distributions. Journal of Educational and Behavioral Statistics, 25(2), 133-183.

Kolen, M.J. & Brennan, R.J. (2004). Test Equating, Scaling, and Linking: Methods and Practices. New York: Springer-Verlag.

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

Wand, M.P. & Jones, M.C. (1995). Kernel Smoothing. London: Chapman & Hall/CRC.

Examples

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

(st <- smoothtab(x))
plot(st)

smoothtab(x, presmoothing=TRUE)
smoothtab(x, y, presmoothing=TRUE, postsmoothing=TRUE)

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