cont.mpdf: PDF and CDF for Continuous Random Variables

Description Usage Arguments Value Examples

View source: R/ch7-fn.R

Description

PDF and CDF for Continuous Random Variables

Usage

1
2
cont.mpdf(dist, lo, up, para, para2, ymax, mt, dcol, np = 100,
  pos1 = "topright", pos2 = "bottomright", xp1, xp2)

Arguments

dist

Name of continuous probability distribution (one of the follows) ("exp", "gamma", "weibull", "beta", "norm", "t", "chisq", "f")

lo

Lower limit of x-axis

up

Upper limit of x-axis

para

First parameter vector of PDF

para2

Second parameter vector of PDF (if necessary)

ymax

Upper limit of y-axis

mt

Graph title

dcol

Graph color vector (default as follows) c("red", "blue", "orange2", "green4", "purple", "cyan2")

np

Number of plot points, Default: 100

pos1

Legend location of PDF, Default: 'topright'

pos2

Legend location of CDF, Default: 'bottomright'

xp1

Vector of specific x values for PDF (ignore legend)

xp2

Vector of specific x values for CDF (ignore legend)

Value

None.

Examples

1
2
3
4
5
6
7
8
lamb = 1:5
cont.mpdf("exp", 0, 3, para=lamb, ymax=5)

alp = c(0.5, 1, 2, 3); rate = 1
cont.mpdf("gamma", 0, 8, para=alp, para2=rate, ymax=1.2)

th = 1; alp = c(0.5, 1, 2, 3)
cont.mpdf("weibull", 0, 5, para=alp, para2=th, ymax=1.2)

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