make_grid: Return Binned, Grouped Histogram for running variable, above...

Description Usage Arguments Details

View source: R/bins.R

Description

Return Binned, Grouped Histogram for running variable, above and below cutoff

Usage

1
make_grid(rv, cutoff, binwidth = NULL, normalize = T, method = "mccrary")

Arguments

rv

running variable

cutoff

cutoff to be used in discontinuity

binwidth

bin width, defaults to automatic rule specified by method

normalize

whether to normalize frequencies by the length of the vector

method

method for determining automatic bin width, defaults to "mccrary"

Details

This function takes in a running variable, a vector of cutoff points, an optional bandwidth, and an optional method for automated binning procedure. It returns a data.table that has gone through the first stage of the McCrary density test, e.g. one with normalized count data for the median of each bin. Bins without any observations are dropped. For details on the default binning procedure, see bin, guess_binwidth, bw_mccrary, and bw_freedman.


be-green/shinyrd documentation built on April 14, 2020, 12:43 a.m.