Learn R Programming

mixtools (version 2.0.0)

plotly_ise.npEM: Visualization of Integrated Squared Error for a selected density from npEM output using plotly

Description

This is an updated visualization function for ise.npEM. For more technical details, please refer to ise.npEM.

Usage

plotly_ise.npEM(npEMout, component=1, block=1, truepdf=dnorm, lower=-Inf,
                upper=Inf, plots = TRUE ,
                col = NULL , width = 3,
                title = NULL , title.size = 15 , title.x = 0.5 , title.y = 0.95,
                xlab = "t" , xlab.size = 15 , xtick.size = 15,
                ylab = "" , ylab.size = 15 , ytick.size = 15,
                legend.text = "" , legend.text.size = 15 , legend.size = 15, ...)

Value

Just as for the integrate function, a list of class "integrate" with components

value

the final estimate of the integral.

abs.error

estimate of the modulus of the absolute error.

subdivisions

the number of subintervals produced in the subdivision process.

message

"OK" or a character string giving the error message.

call

the matched call.

Arguments

npEMout

An object of class npEM such as the output of the npEM function

component, block

Component and block of particular density to analyze from npEMout.

truepdf

an R function taking a numeric first argument and returning a numeric vector of the same length. Returning a non-finite element will generate an error.

lower, upper

the limits of integration. Can be infinite.

plots

logical: Should plots be produced?

...

additional arguments to be passed to truepdf (and that may be mandatory like, e.g., the df = argument of dt). Remember to use argument names not matching those of ise.npRM.

col

Color of traces.

width

Line width of traces.

title

Text of the main title.

title.size

Size of the main title.

title.x

Horsizontal position of the main title.

title.y

Vertical posotion of the main title.

xlab

Label of X-axis.

xlab.size

Size of the lable of X-axis.

xtick.size

Size of tick lables of X-axis.

ylab

Label of Y-axis.

ylab.size

Size of the lable of Y-axis.

ytick.size

Size of tick lables of Y-axis.

legend.text

Title of legend.

legend.text.size

Size of the legend title.

legend.size

Size of legend.

Details

This function calls the wkde (weighted kernel density estimate) function.

References

  • Benaglia, T., Chauveau, D., and Hunter, D. R. (2009), An EM-like algorithm for semi- and non-parametric estimation in multivariate mixtures, Journal of Computational and Graphical Statistics, 18, 505-526.

  • Benaglia, T., Chauveau, D., Hunter, D. R., and Young, D. (2009), mixtools: An R package for analyzing finite mixture models. Journal of Statistical Software, 32(6):1-29.

See Also

npEM, wkde, integrate, ise.npEM

Examples

Run this code
if (FALSE) {
data(Waterdata)
set.seed(100)
a <- npEM(Waterdata[,3:10], mu0=3, bw=4) # Assume indep but not iid
plotly_ise.npEM(a , plots = TRUE)
}

Run the code above in your browser using DataLab