pmf {ptmixed}R Documentation

Probability mass function plot for a discrete variable

Description

This function produces a simple plot of the probability mass function of a discrete variable

Usage

pmf(x, absolute = T, xlim = NULL, lwd = 1, col = "black",
  title = NULL, xlab = "x", bty = "l", cex.title = NULL,
  cex.axis = NULL)

Arguments

x

the (discrete) variable of interest

absolute

logical. If TRUE (default) absolute frequencies are plotted, if FALSE relative frequencies

xlim

limits for the x axis

lwd

line width

col

color used for the vertical frequency bars

title

plot title

xlab

label for the x axis

bty

box type (default is bty="l")

cex.title

title font size

cex.axis

font size for the axes

Author(s)

Mirko Signorelli

Examples

pmf(cars$speed)
pmf(cars$speed, absolute = FALSE)
pmf(cars$speed, lwd = 2, col = 'blue')

[Package ptmixed version 1.1.3 Index]