UPM: Calculation of Unit Probability Mass

Description Usage Arguments Details Value See Also Examples

View source: R/upm.R

Description

UPM calculates Unit Probability Mass for an interval (a, b) when the Underlying distribution is beta or mixture of two beta distributions.

Usage

1
2
UPM(w, a = 0, b = 1, a1 = NULL, b1 = NULL, a2 = NULL,
  b2 = NULL)

Arguments

w

Weight on the first Beta distribution of the mixture Prior

a, b

Range Parameters between which UPM is needed to be calculated.

a1

alpha parameter ( > 0) for 1st Beta distribution, must be input properly when w = 0 or 1

b1

beta parameter ( > 0) for 1st Beta distribution, must be input properly properly when w = 0 or 1

a2

alpha parameter ( > 0) for 2nd Beta distribution, will not be used if w = 0 or 1

b2

beta parameter ( > 0) for 2nd Beta distribution, will not be used if w = 0 or 1

Details

Unit Probability MASS or UPM(a,b) = (F(b) - F(a))/(b - a), defined for an interval (a,b), when X~F(). In this function, F() is assumed to be Cumulative Beta distribution function or mixture of two cumulative Beta distribution functions.

Hence, F(x) = w * pbeta(x, a1, b1) + (1 - w) * pbeta(x, a2, b2), pbeta is cumulative Beta distribution.

If F() consists of a single Beta distribution, and not a mixture, then the convention here assumed is to input w = 1 and a1, b1 , or w = 0 and a2,b2

Value

Unit Probability Mass value or the UPM value for the interval (a, b)

See Also

weights_formulate, Beta

Examples

1
2
3
4
UPM(w = 1, a = 0.3, b = 0.4, a1 = 2, b1 = 5)
UPM(w = 0, a = 0.3, b = 0.4, a2 = 2, b2 = 5)
UPM(w = 0.3, a = 0.3, b = 0.4, a1 = 3, b1 = 6, a2 = 2, b2 = 5)
UPM(w = 1, a = 0.3, b = 0.4, a1 = 2, b1 = 5, a2 = 7, b2 = 8) #will give warning

anirban0451/tpidesigns documentation built on Dec. 7, 2019, 5:35 p.m.