Learn R Programming

stremr (version 0.4)

GenericModel: Generic R6 class for modeling (fitting and predicting) P(A=a|W=w) where A can be a multivariate (A[1], ..., A[k]) and each A[i] can be binary, categorical or continous

Description

This R6 class Class for defining, fitting and predicting the probability model P(A|W) under g_star or under g_0 for variables (A,W). Defines and manages the factorization of the multivariate conditional probability model P(A=a|...) into univariate regression models A[j] ~ A[j-1] + ... + A[1] + W. The class self$new method automatically figures out the correct joint probability factorization into univariate conditional probabilities based on name ordering provided by (A_nms, W_nms). When the outcome variable A[j] is binary, this class will automatically call a new instance of BinaryOutcomeModel class. Provide self$fit() function argument data as a DataStorageClass class object. This data will be used for fitting the model P(A|W). Provide self$fit() function argument newdata (also as DataStorageClass class) for predictions of the type P(A=1|W=w), where w values are coming from newdata object. Finally, provide self$predictAeqa function newdata argument (also DataStorageClass class object) for getting the likelihood predictions P(A=sa|W=w), where both, sa and sw values are coming from newdata object.

Usage

GenericModel

Arguments

Format

An R6Class generator object

Methods

Active Bindings

Details

  • n_regs - .