disc.marg2: Marginal PDF of Two Discrete Random variables

Description Usage Arguments Value Examples

View source: R/disc.marg2.R

Description

Marginal PDF of Two Discrete Random variables

Usage

1
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)

jhk0530/Rstat documentation built on Dec. 20, 2021, 11:11 p.m.