dot-quantilePercentiles: Internal Function to Calculate Quantiles

.quantilePercentilesR Documentation

Internal Function to Calculate Quantiles

Description

Function calculates smoothing spline quantiles or linear quantiles as a fall back. Not intended for general use. Expected predicted and residual data. Exported to support related packages.

Usage

.quantilePercentiles(data, LL = 0.1, UL = 0.9, na.rm = TRUE, cut = 4L)

Arguments

data

A dataset of predicted and residual values. Assumed from some sort of (probably parametric) model.

LL

The lower limit for prediction. Defaults to .1 to give the 10th percentile.

UL

The upper limit for prediction. Defaults to .9 to give the 90th percentile.

na.rm

A logical whether to remove missing values. Defaults to TRUE

cut

An integer, how many unique predicted values there have to be at least for it to use quantile regression or treat the predicted values as discrete. Defaults to 4.

Value

A data.table with the scores and predicted LL and UL, possibly missing if quantile regression models do not converge.


JWiley/JWileymisc documentation built on Feb. 15, 2024, 12:23 p.m.