factor_estimate_normal: factor_estimate_normal

Description Usage Format Value Fields Inherits Methods Examples

Description

A class for factor estimates based on the normal distribution ("Gaussian").
It may be inherited by subclasses, e.g. to implement complementary estimation techniques.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Value

An instance of the factor_estimate_normal R6Class.

Fields

sd

(numeric, scalar) The standard deviation parameter of the normal distribution.

mean

(numeric, scalar) The mean parameter of the normal distribution.

limit_min_value

A strict lower bound applied to the factor simulation values. If NULL or NA, no lower bound will be applied.

limit_max_value

A strict upper bound applied to the factor simulation values. If NULL or NA, no upper bound will be applied.

limit_min_behavior

One of the following options determining how values will be maintained within limit_min_value: "Limit" (default), "Replace", "Discard". "Limit": When an out of bound value is drawn, apply min/max functions to force it within bounds. "Replace": When an out of bound value is drawn, we replace it until it is within bound. "Discard": When an out of bound value is drawn, remove it from the sample.

limit_max_behavior

One of the following options determining how values will be maintained within limit_max_value: "Limit" (default), "Replace", "Discard". "Limit": When an out of bound value is drawn, apply min/max functions to force it within bounds. "Replace": When an out of bound value is drawn, we replace it until it is within bound. "Discard": When an out of bound value is drawn, remove it from the sample.

Inherits

factor_estimate

Methods

get_random(n = 1, output_class = "vector")

Returns a random sample of size n. Returns a vector by default. If output_class = "data.frame", returns a data.frame with a column "factor_value". This second parameterization may be enriched by R6 subclasses to provide additional columns with complementary information.

Examples

1
f1 <- factor_estimate_normal$new(sd = 5, mean = 100)

daviddoret/GRCRToolkit documentation built on May 23, 2019, 7:31 a.m.