Description Usage Format Methods
This class represents the structure we see as a relevant variable. A relevant variable in our case is a variable for which we want to estimate its conditional distribution. This class helps organizing / creating its formula (the parametric form of the covariates that could predict this relevant variable).
1 |
An object of class R6ClassGenerator of length 24.
initialize(formula, family) Creates a new RelevantVariable object. It creates this object
according to a formula (the y ~ x1 + x2 representation we expect to
predict this relevant variable) and the family (gaussian if it is a double
/ integer value, and binomial if it is a binary variable)
@param formula formula the formula to use for predicting this relevant variable. @param family string a string representing the type of relevant variable this is.
get_formula_string(X = NULL, Y = NULL) Returns a string representation as a formula of the current relevant variable and its predictors.
@param X string (default = NULL) the variables to use as the predicting
variables in this formula. If NULL, it will use the X of the
current relevant variable.
@param Y string (default = NULL) the variables to use as the outcome
variable in this formula. If NULL, it will use the X of the
current relevant variable.
parse_formula(formula) Converts a formula to its separate X and Y components.
@param formula formula the formula to convert.
@return list a list with two attributes: the Y which is the
output of the formula and the X the independent variables in
this formula.
getFamiltyActive method. Returns the family provided on initialization.
@return string the family.
getXActive method. Returns the X component of the formula provided on initialization.
@return list the X component of the formula
getYActive method. Returns the Y component of the formula provided on initialization.
@return string the outcome variable name
getValidityActive method. Checks the validity of the RelevantVariable
instance. This method is called automatically on initialization.
@return boolean true if everything is valid, or it throws if not valid.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.