RegressionClass: R6 class that defines regression models evaluating P(sA|sW),...

Description Usage Format Details Methods Active Bindings


This R6 class defines fields and methods that controls all the parameters for non-parametric modeling and estimation of multivariate joint conditional probability model P(sA|sW) for summary measures (sA,sW). Note that sA can be multivariate and any component of sA[j] can be either binary, categorical or continuous. The joint probability for P(sA|sA) = P(sA[1],...,sA[k]|sA) is first factorized as P(sA[1]|sA) * P(sA[2]|sA, sA[1]) * ... * P(sA[k]|sA, sA[1],...,sA[k-1]), where each of these conditional probability models is defined by a new instance of a GenericModel class (and a corresponding instance of the RegressionClass class). If sA[j] is binary, the conditional probability P(sA[j]|sW,sA[1],...,sA[j-1]) is evaluated via logistic regression model. When sA[j] is continuous (or categorical), its estimation will be controlled by a new instance of the ContinModel class (or the CategorModel class), as well as the accompanying new instance of the RegressionClass class. The range of continuous sA[j] will be fist partitioned into K bins and the corresponding K bin indicators (B_1,...,B_K), with K new instances of GenericModel class, each instance defining a single logistic regression model for one binary bin indicator outcome B_j and predictors (sW, sA[1],...,sA[k-1]). Thus, the first instance of RegressionClass and GenericModel classes will automatically spawn recursive calls to new instances of these classes until the entire tree of binary logistic regressions that defines the joint probability P(sA|sW) is build.




An R6Class generator object



new(sep_predvars_sets = FALSE, outvar.class = gvars$sVartypes$bin, outvar, predvars, subset_vars, subset_exprs, intrvls, ReplMisVal0 = TRUE, useglm = getopt("useglm"), nbins = getopt("nbins"), bin_bymass = getopt("bin.method") bin_bydhist = getopt("bin.method") max_nperbin = getopt("maxNperBin"), pool_cont = getopt("poolContinVar")

Uses the arguments to instantiate an object of R6 class and define the future regression model.

ChangeManyToOneRegresssion(k_i, reg)

Take a clone of a parent RegressionClass (reg) for length(self$outvar) regressions and set self to a single univariate k_i regression for outcome self$outvar[[k_i]].


Take the clone of a parent RegressionClass for univariate (continuous outvar) regression and set self to length(regs_list) bin indicator outcome regressions.



Active Bindings





stremr documentation built on May 30, 2017, 6:35 a.m.