File: jmfuns.rda
draw.gamma computes the X-Y coordinates for a gamma probability density function if cdf = FALSE or the X-Y coordinates of the gamma cumulative distribution function if cdf = TRUE. It either plots the function or simply outputs the coordinates.
shape = NA, rate = NA, scale = NA,
mean = NA, sd = NA,
plot.dist = TRUE, cdf = FALSE, Label = "default", Lwd = 2,
cred.int = 0.95, plot.cred.int = FALSE,
type.cred.int = c("left", "mid", "right")[2],
cred.lab = TRUE, cred.col = "yellow",
plot.stats = TRUE, x.stats.coord = NA, ...)
shape = shape parameter of the gamma
rate = rate parameter of the gamma. Note that you only need to specify the rate or the scale but not both. If both are specified, then the scale parameter takes precedence.
scale = scale parameter. See comment about the rate parameter.
mean = mean of gamma
sd = standard deviation of gamma
You only need to specify [shape and
rate] or [shape and scale] or [mean and sd]. Other parameters are defined in terms of
the specified pair.
xlimit = NA permits user control of the x axis limits.
ylimit = NA permits user control of the y axis limits.
plot.dist = T: If FALSE, then no plot is made and the X-Y coordinates for the graph are outputted. If TRUE, a plot is made and the coordinates are not outputted.
cdf: If cdf = TRUE, then the cumulative distribution function is plotted (if a plot is requested) or the X-Y cooredinates for the plot are outputted. If cdf = FALSE (default), then the density function is plotted (if a plot is requested) or the X-Y cooredinates for the plot are outputted.
Label = "default": The default setting creates a graph title that states the parameters of the gamma distribution. If Label is not set to "default", then no axis labels or graph title are created. The user can add these labels after creating an initial graph of the gamma distribution.
Lwd controls the line weight on the graph.
cred.int & plot.cred.int control whether or not a credible interval is plotted and the probability level of the credible interval. At present, only a two-sided credible interval is implemented, but in the future, I would like to offer the option of plotting the credible interval in the left or right tail of the distribution.
cred.lab controls whether or not the probability level of the credible interval is plotted inside of the density plot.
cred.col controls the color of the area under the credible interval.
plot.stats = TRUE (default): mean, sd & quantiles are plotted on the figure.
If x.stats.coord = NA, then the function chooses an X coordinate for plotting stats. If the user specifies a value for x.stats.coord, then that value overrides the default choice of X coordinate.
#-------------- The 'doc' bookmark highlights all of the documentation but not the function skeleton at the top of the file. Use rdocToString macro to convert documentation to an R string variable ---------------------------------------------------------------------------------------------------------------------------------------------
Format for this html document: Page Size = Tabloid: 11" x 17". Note that Tabloid page size is available if Adobe PDF is set as the default printer, but not if the default printer is a physical printer that prints 8.5" x 11" standard paper. Table widths = 9.5"