plot.mixdata {mixdist} | R Documentation |
Mixdata Object Plotting
Description
A function for plotting of Mixdata objects. It is called
via the generic function plot
.
Usage
## S3 method for class 'mixdata'
plot(x, mixpar = NULL, dist = "norm", root = FALSE, ytop = NULL,
clwd = 1, main, sub, xlab, ylab, bty, ...)
Arguments
x |
an object of class |
mixpar |
|
dist |
the distribution of components, it can be
|
root |
if |
ytop |
a scalar which determines the top of the y-axis. |
clwd |
a positive number denoting line width, defaulting to |
main |
an overall title for the plot. |
sub |
a subtitle for the plot. |
xlab |
a title for the x-axis. |
ylab |
a title for the y-axis. |
bty |
A character string which determined the type of box which is
drawn about plots. If |
... |
additional arguments to the function |
Details
If the argument mixpar
is NULL
, then only the
histogram of the data will be displayed; if mixpar
gives
the values of parameters, the component distributions and the
mixture distribution are computed from the parameter values
and superimposed on the histogram.
See Also
plot.mix
for plotting Mix objects, plot.default
for additional arguments.
Examples
data(cassie)
as.mixdata(cassie) # if the result isn't `NULL', then cassie is mixed data
plot.mixdata(cassie)
data(pikeraw)
data(pikepar)
pikemd <- mixgroup(pikeraw, breaks = c(0, seq(19.75, 65.75, 2), 80))
plot(pikemd)
plot(pikemd, pikepar, "lnorm")
fit <- mix(pikemd, pikepar, "lnorm", constr = mixconstr(consigma = "CCV"), emsteps = 3)
plot(fit)
plot(pikemd, pikepar, "lnorm", root = TRUE)
plot(fit, root = TRUE)