Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

new_predictor

Create an object of class "predictor"


Description

Create an object of class "predictor"

Usage

new_predictor(
  f = function() { },
  predictor_type = character(),
  lb,
  ub,
  support
)

Arguments

f

a function that gives the probability mass/distribution function of a random variable.

predictor_type

a character describing the random variable. Either "discrete" or "continuous".

lb, ub

if predictor_type == "continuous" double giving the lower/upper bound of the pdf f.

support

if predictor_type == "discrete" vector of the support of the pmf for f.

Value

an object of class "predictor".

See Also

Examples

new_predictor(
  f = function(x0) dnorm(x0, mean = 0, sd = 1),
  predictor_type = "continuous", lb = -Inf, ub = Inf
)

pcsstools

Tools for Regression Using Pre-Computed Summary Statistics

v0.1.1
GPL (>= 3)
Authors
Jack Wolf [aut, cre, cph] (<https://orcid.org/0000-0002-8919-8740>), R Core Team and contributors worldwide [cph, aut] (Author and copyright holder of modified 'stats' fragments)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.