sumRV_margrow: For a list of random variables, return random variable that...

View source: R/RVofrandomselectRV.R

sumRV_margrowR Documentation

For a list of random variables, return random variable that is a random selection one of the RVs

Description

For a list of random variables, return random variable that is a random selection one of the RVs

Usage

sumRV_margrow(pmat)

Arguments

pmat

A matrix of probabilities. Each element creates a Bernoulli RV with probability of success (1), given by p.

rvs

A list of Random Variable (distributions) of class 'RV'

Examples

library(discreteRV)
X1 <- RV(c(1,0), c(.5,.5))
X2 <- RV(c(1,0), c(.5,.5))
X3 <- RV(c(1,-1), c(.5,.5))
randselRV(list(X1, X2, X3))

sustainablefarms/msod documentation built on March 6, 2023, 7:17 a.m.