These functions provide the first two steps of multinomial inverse regression (see MNIR paper).
mnlm
fits multinomial logistic regression
parameters under gamma lasso penalization on a factorized Poisson likelihood. The mnlm
function, which remains in this package for backwards compatability only, is just call to the dmr
function of the distrom
library (see DMR paper). For simplicity, we recommend using dmr
instead of mnlm
. For model selection, coefficients, prediction, and plotting see the relevant functions in help(dmr)
.
srproj
calculates the MNIR Sufficient Reduction projection from text counts
on to the attribute dimensions of interest (covars
in mnlm
or dmr
). In particular, for counts \(C\), with row sums \(m\), and mnlm
/dmr
coefficients \(\phi_j\) corresponding to attribute \(j\),
\(z_j = C'\phi_j/m\) is the SR projection in the direction of \(j\). The MNIR paper explains how \(V=[v_1 ... v_K]\), your original covariates/attributes, are independent of text counts \(C\) given SR projections \(Z=[z_1 ... z_K]\).
The final step of MNIR is `forward regression' for any element of \(V\) onto \(Z\) and the remaining elements of \(V\). We do not provide a function for this because you are free to use whatever you want; see the MNIR and DMR papers for linear, logistic, and random forest forward regression examples.
Note that if you were previously using textir
not for inverse regression, but rather just as fast code for multinomial logistic regression, you probably want to work directly with the gamlr
(binary response) or dmr
(multinomial response) packages.