Description Usage Arguments Details Value Author(s) References See Also Examples
The function produced two dimensional smooth scatter plots. The method used is described in Eilers and Goeman (2004).
1 2 3 4 5 6 |
x |
the x-variable |
y |
the y-variable |
nbin |
the number of bins required for smoothing |
lambda |
the smoothing parameter |
ndot |
how many data points to show in the plot |
csize |
the size of the data points |
ticks |
whether ticks in the x and y axis appear in the plot |
xlim |
the x limit |
ylim |
the y limit |
show |
whether to show the graph or not |
save |
whether to save the output as a list or not |
data |
the data file |
xlab |
the x label as character string |
ylab |
the y label as character string |
cols |
for changing the color scheme, the defaul is
|
col.points |
the colours of the points |
... |
for extra arguments |
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.
the function produces a two dimensional smooth plot and saves if save=TRUE
a list with the following components:
Hraw |
A nbin by nbin matrix containing the bin row data |
Hsmooth |
A nbib by nbib matrix containing the smooth two dimensional histogram |
xgrid |
the x-grid |
ygrid |
the y-grid |
xbin |
the bin for x values |
ybin |
the bin for y values |
nmiss |
number of missing values |
seldots |
the values of the plotted dots |
Paul Eilers p.eilers@erasmusmc.nl
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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)
H1 <- scattersmooth(x, y, cols=rainbow(100:200))
# If you have the package colorspace use instead
# library(colorspace)
# H <- scattersmooth(x, y, cols=heat_hcl(100))
# H1 <- scattersmooth(x, y, cols=rainbow_hcl(100))
data(db)
scattersmooth(age, head, data=db, cols=terrain.colors(101), ndot=2000, lambda=1)
# or if you have colorspace
#scattersmooth(age, head, data=db, cols=terrain_hcl(100), ndot=2000, lambda=1)
|
Loading required package: gamlss.dist
Loading required package: MASS
Loading required package: gamlss
Loading required package: splines
Loading required package: gamlss.data
Loading required package: nlme
Loading required package: parallel
********** GAMLSS Version 5.0-2 **********
For more on GAMLSS look at http://www.gamlss.org/
Type gamlssNews() to see new features/changes/bug fixes.
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.