multicdf: multicdf

Description Usage Arguments Value

Description

Extract density estimates for observed data from multiple empirical cumulative density (mass) functions. The function is designed to take one set of observed values and return the corresponding density for each variable.

Usage

1
multicdf(observed, pcdfobj, nosupport = NA, interpolate = F)

Arguments

observed

Single row dataframe of observed data (will be coerced). Each column should be one variable that corresponds to one of the cdfs in pcdfobj.

pcdfobj

List of cdfs, each corresponding to a relevant predictive variable. See 'pcdf()'.

nosupport

Value to return if the observed value(s) fall outside the support of the corresponding empirical cdf(s). Defaults to NA.

interpolate

If True, the empirical cdf will be interpolated, providing an estimate of a continuous pdf instead. If False (default), then observed values that lie between mass density estimates will yield 'nosupport'.

Value

Vector of densities (masses) corresponding to the variables in pcdfobj. The order of the densities (masses) will be the same as the order of the corresponding cdfs in pcdfobj.


wccarleton/Rlamap documentation built on May 24, 2019, 7:50 a.m.