cont.cond2: Conditional PDF Plot of Two Continuous Random Variables

View source: R/ch4-fn.R

cont.cond2R Documentation

Conditional PDF Plot of Two Continuous Random Variables

Description

Conditional Probability Distribution Plot of Two Continuous Random Variables

Usage

cont.cond2(FUN, xc, yc, xs, ys, lo, up)

Arguments

FUN

Continuous joint PDF function

xc

Conditioning value of X

yc

Conditioning value of Y

xs

Specific value of X for displaying the density (given yc)

ys

Specific value of Y for displaying the density (given xc)

lo

Lower limit of the conditioned random variable

up

Upper limit of the conditioned random variable

Value

Conditional PDF

Examples

pdf = function(x, y) (x+y)*(x>=0 & x<=1)*(y>=0 & y<=1)
cont.cond2(pdf, yc=0.1, xs=0:2/2, lo=-0.2, up=1.2)

adoocavo/Rstat_M1 documentation built on March 19, 2022, 3:34 a.m.