kde_from_list: Contour of data points using Kernel Density Estimate.

Description Usage Arguments Details Value

View source: R/kde.R

Description

This function calculates contour points and area from list of data.frames with data in 2d. Basically this is a wrapper of ks::kde.

Usage

1
2
3
4
5
6
7
kde_from_list(
  dflist,
  alpha,
  h_band = NULL,
  position = 1:2,
  grid_size = rep(1000, 2)
)

Arguments

dflist

list of data frames

alpha

contour level, an scalar from the sequence .01 to .99 by step size .01. For example, a value of .95 gives a contour level associated with the cumulative prob of 95% (and 95% confidence interval)

h_band

optional argument for the bandwidth of the kde object. If NULL, the optimal band would be selected through the ks::kde function. Default is NULL.

position

Columns position of x/y pair. Default is 1:2

grid_size

size of the grid which is going to be used for the evaluation of kde object. Can be reduced to speed-up computation.

Details

This function (renamed as kde_from_tclist) is shared with TCpredictionbands on github: TCpredictionbands.

Value

contour List of contour(s) at the specified level


skgallagher/EpiCompare documentation built on Sept. 14, 2021, 5:45 a.m.