Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I'm trying to calculate logistic regression coefficients by defining log likelihood function and using maximum likelihood In some cases when the init (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 init values for logistic regression (or, in other words, what are the values that are being used in glm?) Thanks

share|improve this question
1  
Typically ${\bf \beta}={\bf 0}$ works well when there are no collinearity problems. Could you provide more information about the sample size and the number of covariates? – user10525 Aug 7 '12 at 16:14
I have around 20,000 vectors with ~20 features per vector. The features has some dependencies between them. y values are 0 or 1 with around 1-5% or ones (hope that help, because I can't add all the data here... – user5497 Aug 7 '12 at 16:21
@user5497 How different are the results? Are we talking difference at the 10th decimal place or at the 1st? Can you perhaps provide the output from R (obfuscated if need be)? – Jason Morgan Aug 8 '12 at 1:44
I'm not using glm, so as I understand safeBinaryRegression can't help me. What I've done is implemented my own log likelihood function and used maximum likelihood (R's mle2 - bbmle) to find the coefficients. I've compared the results to regular glm (which works without any problems). mle2 should get start values. Currently I'm using zeros for all the coefficients. When I'm using those start values, in some cases I get very weird results (the differences between the mle2 results and the glm results are big). So I wanted to know what are the start values that glm uses – user5497 Aug 8 '12 at 8:15
for example, here are the first 7 coefficients in the glm run: -6.2307913208130525, 6.110187257533295e-06, -2.0577042478307273, 0.4786093240660332, 0.38126727104872804, -0.625615435816033, 0.04482479648912922 And the first 7 coefficients in the mle2 run (with zeros start values): -1.4625013759985311e-08, -0.0005046844214205488, 1.2295071793926704e-08, 1.632233091079531e-08, -1.8873962762517583e-08, -6.607669091467728e-09. You can see that it seems that it was "stuck" in a local minimum near 0,0,0,0,0,.... – user5497 Aug 8 '12 at 8:22
show 1 more comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.