risk_quantiles: Return the vector of risk quantiles for a continuous risk...

View source: R/PAF_calc_continuous.R

risk_quantilesR Documentation

Return the vector of risk quantiles for a continuous risk factor.

Description

Return the vector of risk quantiles for a continuous risk factor.

Usage

risk_quantiles(
  riskfactor,
  data,
  model,
  S = 1,
  q = seq(from = 0.01, to = 0.99, by = 0.01)
)

Arguments

riskfactor

The name of the risk factor of interest in the dataset. A character vector

data

A dataframe containing variables used to fit the model

model

The fitted model

S

The number of randomly selected individuals for which risk is measured (defaults to 1). Let to perhaps 100 if risk factor involved in interactions in model

q

The desired risk quantiles

Value

A named vector of size S giving the risk factor quantiles


graphPAF documentation built on Sept. 23, 2022, 1:06 a.m.