Learn R Programming

gamlss.util (version 4.2-7)

scattersmooth: Two dimensional Smooth scatter plots

Description

The function produced two dimensional smooth scatter plots. The method used is described in Eilers and Goeman (2004).

Usage

scattersmooth(x, y, nbin = 100, lambda = 1, ndot = 500,
              csize = 0.3, ticks = TRUE, xlim = c(min(x), 
              max(x)), ylim = c(min(y), max(y)), show = TRUE, 
              save = FALSE, data = NULL, xlab = NULL, 
              ylab = NULL, ...)

Arguments

Value

the function produces a two dimensional smooth plot and saves if save=TRUE a list with the following components:HrawA nbin by nbin matrix containing the bin row dataHsmoothA nbib by nbib matrix containing the smooth two dimensional histogramxgridthe x-gridygridthe y-gridxbinthe bin for x valuesybinthe bin for y valuesnmissnumber of missing valuesseldotsthe values of the plotted dots

Rdversion

1.1

Details

The function is similar to the function smoothScatter() in graphics but it used penelized bin smoother as described in Eilers and Goeman (2004) rather than kernel smoother.

References

Eilers, P. H. C. and Goeman, J. J. (2004). Enhancing scatterplots with smoothed density. Bioinformatics, Vol 20 no 5, pp 623-628.

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.

See Also

smoothScatter,gamlss

Examples

Run this code
m <- 1000
set.seed(pi)
phi <- 2 * pi * runif(m)
rho <- rchisq(m, df = 6)
x <- cos(phi) * rho
y <- sin(phi) * rho
H <- scattersmooth(x, y)

Run the code above in your browser using DataLab