dPlot: Density-Plot

View source: R/dPlotRmx.R

dPlotR Documentation

Density-Plot

Description

The function dPlot generates a density plot for fitted models.

Usage

dPlot(x, ...)

## S3 method for class 'rmx'
dPlot(x, param.digits = 3, ggplot.xlab = "x", 
        ggplot.ylab = NULL, ggplot.ggtitle = NULL, 
        density.col = "#0072B5", density.lwd = 1, 
        density.n = 501, ...)

Arguments

x

object of S3 class rmx.

param.digits

number of digits used for the estimated parameter values, if default ggplot.ggtitle is used.

ggplot.xlab

label of x-axis.

ggplot.ylab

label of y-axis.

ggplot.ggtitle

plot title. If NULL default plot title is generated.

density.col

single color used for colouring the empirical density.

density.lwd

line width for empirical density and density of the estimated model.

density.n

number of points to interpolate the density of the estimated model.

...

further arguments passed through.

Details

The function is based on functions provided by package ggplot2.

Value

Invisible object of class ggplot.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

References

Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.

Rieder, H. (1994) Robust Asymptotic Statistics. New York: Springer.

Rieder, H., Kohl, M. and Ruckdeschel, P. (2008) The Costs of not Knowing the Radius. Statistical Methods and Applications 17(1) 13-40. Extended version: http://r-kurs.de/RRlong.pdf

M. Kohl, P. Ruckdeschel, and H. Rieder (2010). Infinitesimally Robust Estimation in General Smoothly Parametrized Models. Statistical Methods and Application, 19(3):333-354.

See Also

rmx, optIF

Examples

ind <- rbinom(100, size=1, prob=0.05) 
x <- rnorm(100, mean=ind*3, sd=(1-ind) + ind*9)
res <- rmx(x, eps.lower = 0.01, eps.upper = 0.1)
dPlot(res)

## plot-method
plot(res, which = 4)

## setting and passing arguments
dPlot(res, ggplot.xlab = "data", density.lwd = 2)
plot(res, which = 4, 
     control = list(dPlot = list(ggplot.xlab = "data", density.lwd = 2)))

stamats/rmx documentation built on Sept. 29, 2023, 7:13 p.m.