0

I'm studying on my own the log regression and on the books I think I understood the basics, but I don't get where all the R-packages (in the title I put one as an example) get the fitted values after processing the regression: probably I'm doing my math wrong, but I tried a million time to replicate the numbers by substituting in the regression formula with the logit function but I never achieve a success.

Another big question mark is how R is able to generate the probabilities of each sample after the regression. They seemed to me like others fitted values (in fact one f.v. is always in each line of the matrix with all these probabilities), but don't understand: - what they are - how can I compute them - If I can use them to calculate the probability a posteriori of a sample to belong the j-th class of my category.

Thanks in advance for all the answers, I hope I've been clear enough. -g

  • You can always have a look at the source code and see how they have been calculated: For the default `glm` function type `getAnywhere(glm.fit)` on the console. – LyzandeR Jan 03 '15 at 23:35
  • The `predict` method for whatever multinomial logit function you're using should have options for the output type. – Ari B. Friedman Jan 04 '15 at 00:06
  • 1
    If you really want help, include a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data and the exact code you are using to extract the values of interest. Right now there's no way to know for sure what exactly you are doing. – MrFlick Jan 04 '15 at 02:01

0 Answers0