I started to use the function multinom
of R
package nnet
in order to fit several conditional probability distributions with the multinomial logistic model. I need the parameters of the fittings in order to pass them to a Java program, which will compute the probabilities and use them.
My problem is that the probabilities computed with the parameters returned by multinom
, following the usual definition of multinomial logistic model, are not the same as those directly computed in R
, which are the correct ones. On Stack Overflow I have already asked a question about this issue, but I do not still know how the R
function multinom
computes these probabilities; my guess is that it relies on neural networks, since this function belongs to R
package nnet
, but I do not have any idea about the details, and an inspection of the code led to nowhere.
Do you know an R
package which fits conditional probabilities and returns the corresponding parameters of the model, so that we may easily compute the probabilities in another program? E.g., using the MARS model (R
package earth
) or Projection Pursuit Regression (R
package ppr
) is not feasible, since computing the probabilities from the parameters of these models would be a mess. Besides, the function mlogit
from the R
package with the same name is not applicable as well, since the dataset should be in a certain format (we would also need the predictors corresponding to the alternative, "non-chosen" response variable).