I'm trying to calculate logistic regression coefficients by defining the log-likelihood function and using maximum likelihood.
In some cases when the initial (start) values I gave to the maximum likelihood were not correct I got wrong results for the logistic regression (different from the ones I get when using glm
for example).
Given the input data and y values, what should be the optimum initial values for logistic regression (or, in other words, what are the values that are being used in glm
)?
R
(obfuscated if need be)? $\endgroup$