plot.fitdistr.grouped | R Documentation |
fitdistr.grouped
The object produced by fitdistr.grouped
is plotted in the form
of an histogram of the input original observed frequencies with superimposed
the fitted parametric density function.
## S3 method for class 'fitdistr.grouped'
plot(x, freq = FALSE, col = "grey90",
border = "grey80", pdfcol = "blue", main, sub = NULL, xlab, ylab, xlim, ylim,
axes = TRUE, labels = FALSE, ...)
x |
a |
freq |
logical; if |
col |
a colour to be used to fill the bars. |
border |
the colour of the border around the bars. |
pdfcol |
the colour of the fitted parametric distribution. |
main, sub, xlab, ylab |
these arguments to |
xlim, ylim |
the range of |
axes |
logical, indicating if axes should be drawn. |
labels |
logical or character. Additionally draw labels on top of bars, if not FALSE; if TRUE, draw the counts or rounded densities; if labels is a character, draw itself. |
... |
further graphical parameters to title and axis. |
The function builds on plot.histogram
,
but some lesser features have been dropped.
A list with the following components
hist |
an object of class |
x, y |
the values used for plotting the fitted parametric distribution. |
Adelchi Azzalini
fitdistr.grouped
for generating a suitable object,
plot.histogram
for the related more general function.
data(barolo)
attach(barolo)
A75 <- (reseller=="A" & volume==75)
logPrice <- log(price[A75],10) # as used in selm documentation; see its fitting
detach(barolo)
breaks<- seq(1, 3, by=0.25)
f <- cut(logPrice, breaks = breaks)
freq <- tabulate(f, length(levels(f)))
logPrice.grouped <- fitdistr.grouped(breaks, freq, family='ST')
plot(logPrice.grouped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.