Fhat_conditional_: Weighted empirical cumulative distribution function (ecdf),...

Description Usage Arguments Value Examples

View source: R/Fhat_conditional.R

Description

Weighted empirical cumulative distribution function (ecdf), conditional on one or more variables

Usage

1
Fhat_conditional_(.data, .variables, x, weights)

Arguments

.data

a data frame

.variables

a character vector with one or more column names

x

character vector of length one, with the name of the numeric column whose conditional ecdf has to be estimated

weights

character vector of length one, indicating the name of the positive numeric column of weights, which will be used in the estimation of the conditional ecdf

Value

a data frame, with the variables used to condition, the x variable, and columns wsum (aggregated sum of weights, based on unique values of x) and Fhat (the estimated conditional Fhat). In addition to data frame, the object will be of classes grouped_df, tbl_df and tbl (from package dplyr)

Examples

1
2
3
4
Fhat_conditional_(mtcars,
                 .variables = c("vs", "am"),
                 x = "mpg",
                 weights = "cyl")

distrr documentation built on Sept. 8, 2017, 5:04 p.m.