disc.marg2: Marginal PDF of Two Discrete Random variables

Description Usage Arguments Value Examples

View source: R/ch4-fn.R

Description

Marginal PDF of Two Discrete Random variables

Usage

1
2
disc.marg2(tabXY, Xn, Yn, prt = TRUE, plot = FALSE, dig = 5,
  dig2 = 4)

Arguments

tabXY

Joint frequency table of two random variables

Xn

Name of the first random variable (default="X")

Yn

Name of the second random variable (default="Y")

prt

Print the marginal frequency and probability? Default: TRUE

plot

Plot the marginal PDF? Default: FALSE

dig

Number of digits below the decimal point in the console, Default: 5

dig2

Number of digits below the decimal point in the graph, Default: 4

Value

Marginal Probabilities

Examples

1
2
3
fxy = with(mtcars, table(cyl, carb))
disc.marg2(fxy)
disc.marg2(fxy, "Cylinder", "Carbrator", prt=FALSE, plot=TRUE)

tjssu/Rstat documentation built on Aug. 8, 2020, 12:38 p.m.