cont.mpdf: PDF and CDF for Continuous Random Variables

Description Usage Arguments Value Examples

View source: R/cont.mpdf.R

Description

PDF and CDF for Continuous Random Variables

Usage

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

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