emppmf: Empirical mass function

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

Calculates the empirical probability mass function for a variable with associated weights.

Usage

1
emppmf(y, weight)

Arguments

y

Numerical variable

weight

Associated weights of the variable of interest, default weight is rep(1,length(y))

Value

vals: the distinct values of y

epmf: empirical probability mass function corresponding to each y in vals

Examples

1
2
emppmf(seq(1:10))
emppmf(htsrs$height, rep(2000/200,200))

SDAResources documentation built on Oct. 22, 2021, 5:08 p.m.