bin_data {bunching}R Documentation

Bin the raw data

Description

Create data frame of binned counts

Usage

bin_data(z_vector, binv = "median", zstar, binwidth, bins_l, bins_r)

Arguments

z_vector

a numeric vector of (unbinned) data.

binv

a string setting location of zstar within its bin ("min", "max" or "median" value). Default is median.

zstar

a numeric value for the the bunching point.

binwidth

a numeric value for the width of each bin.

bins_l

number of bins to left of zstar to use in analysis.

bins_r

number of bins to right of zstar to use in analysis.

Value

bin_data returns a data frame with bins and corresponding frequencies (counts).

See Also

bunchit

Examples

data(bunching_data)
binned_data <- bin_data(z_vector = bunching_data$kink, zstar = 10000,
                        binwidth = 50, bins_l = 20, bins_r = 20)
head(binned_data)

[Package bunching version 0.8.6 Index]