tmlenet (version 0.1.0)

CategorSummaryModel: R6 class for fitting and predicting joint probability for a univariate categorical summary measure sA[j]

Description

This R6 class defines and fits a conditional probability model P(sA[j]|sW,...) for a univariate categorical summary measure sA[j]. This class inherits from SummariesModel class. Defines the fitting algorithm for a regression model sA[j] ~ sW + .... Reconstructs the likelihood P(sA[j]=sa[j]|sW,...) afterwards. Categorical sA[j] is first redefined into length(levels) bin indicator variables, where levels is a numeric vector of all unique categories in sA[j]. The fitting algorithm estimates the binary regressions for hazard for each bin indicator, Bin_sA[j][i] ~ sW, i.e., the probability that categorical sA[j] falls into bin i, Bin_sA[j]_i, given that sA[j] does not fall in any prior bins Bin_sA[j]_1, ..., Bin_sA[j]_{i-1}. The dataset of bin indicators (BinsA[j]_1,...,BinsA[j]_M) is created inside the passed data or newdata object when defining length(levels) bins for sA[j].

Usage

CategorSummaryModel

Arguments

Format

An R6Class generator object

Methods

new(reg, DatNet.sWsA.g0, ...)
...
fit(data)
...
predict(newdata)
...
predictAeqa(newdata)
...

Active Bindings

cats
...

Details

  • reg - .
  • outvar - .
  • levels - .
  • nbins - .