cpra: Builds a vector with cPRA (percentage)

View source: R/clinical.R

cpraR Documentation

Builds a vector with cPRA (percentage)

Description

Returns a vector with cPRA percentages according to user defined frequencies

Usage

cpra(n = 100, probs = c(0.7, 0.1, 0.1, 0.1))

Arguments

n

An integer to define the length of the returned vector

probs

A vector with the probabilities for cPRA groups 0%, 1%-50%, 51%-84%, 85%-100% (in this order). The sum of the probabilities must be equal to one.

Value

A vector length n with cPRA percentages

Examples

cpra(n = 100, probs = c(0.7, 0.1, 0.1, 0.1))

balima78/simK documentation built on May 23, 2023, 5:02 p.m.