Learn R Programming

discreteRV (version 1.2.2)

Prop: Proportion of an event observed in a vector of simulated trials

Description

Proportion of an event observed in a vector of simulated trials

Usage

Prop(X.sim)

Arguments

X.sim
A simulated data vector produced with the 'rsim()' function

Examples

Run this code
X <- RV(c(100000,10000,0), c(0.00025,0.005,0.99475))
X.sim <- rsim(X, 200000)

Prop(X.sim>0)
Prop(X.sim==100000)
Prop(X.sim==2000)

Run the code above in your browser using DataLab