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

Description Usage Arguments Examples

View source: R/discreteRV-Simulations.r

Description

Proportion of an event observed in a vector of simulated trials

Usage

1
Prop(X.sim)

Arguments

X.sim

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

Examples

1
2
3
4
5
6
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)

Example output

Attaching package: 'discreteRV'

The following object is masked from 'package:base':

    %in%

[1] 0.005285
[1] 0.000235
[1] 0

discreteRV documentation built on May 2, 2019, 11:04 a.m.