[R] zero cells in one variable in logistic regression
Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This leads to overestimating of odds ratio and inflated confidence interval for odds for given variable. The variable is significant in univariate test. I do not necessarilly need odd ratio, but I need the explained deviance by this variable and I really want to keep this variable in the model. It probably matters for explained deviance. How to treat this problem? Thanks for help, Anna Bucharova -- View this message in context: http://www.nabble.com/zero-cells-in-one-variable-in-logistic-regression-tp24458629p24458629.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] zero cells in one variable in logistic regression
On Jul 13, 2009, at 5:37 AM, anna.bucharova wrote: Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This leads to overestimating of odds ratio and inflated confidence interval for odds for given variable. The variable is significant in univariate test. I do not necessarilly need odd ratio, but I need the explained deviance by this variable and I really want to keep this variable in the model. It probably matters for explained deviance. How to treat this problem? Thanks for help, Anna Bucharova -- You might consider glmrob in package:robustbase. See http://www.jstatsoft.org/v10/i04 David Winsemius, MD Heritage Laboratories West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] zero cells in one variable in logistic regression
dear anna, if you are not interested in point estimate and SE of the parameter of the aforementioned categorical variable, I believe the conventional glm(..,family=binomial) is correct. In particular, the returned deviance is reliable and also it is the relevant likelihood ratio test.. hope this helps, vito David Winsemius ha scritto: On Jul 13, 2009, at 5:37 AM, anna.bucharova wrote: Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This leads to overestimating of odds ratio and inflated confidence interval for odds for given variable. The variable is significant in univariate test. I do not necessarilly need odd ratio, but I need the explained deviance by this variable and I really want to keep this variable in the model. It probably matters for explained deviance. How to treat this problem? Thanks for help, Anna Bucharova -- You might consider glmrob in package:robustbase. See http://www.jstatsoft.org/v10/i04 David Winsemius, MD Heritage Laboratories West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Vito M.R. Muggeo Dip.to Sc Statist e Matem `Vianelli' Università di Palermo viale delle Scienze, edificio 13 90128 Palermo - ITALY tel: 091 6626240 fax: 091 485726/485612 http://dssm.unipa.it/vmuggeo __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] zero cells in one variable in logistic regression
At 10:37 13/07/2009, anna.bucharova wrote: Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This leads to overestimating of odds ratio and inflated confidence interval for odds for given variable. The variable is significant in univariate test. I do not necessarilly need odd ratio, but I need the explained deviance by this variable and I really want to keep this variable in the model. It probably matters for explained deviance. How to treat this problem? Anna, you could consider brglm (from CRAN) which does give you finite estimates for the parameter. @ARTICLE{firth93, author = {Firth, D}, year = 1993, title = {Bias reduction of maximum likelihood estimates}, journal = {Biometrika}, volume = 80, pages = {27--38}, keywords = {glm} } gives the theory Thanks for help, Anna Bucharova -- View this message in context: http://www.nabble.com/zero-cells-in-one-variable-in-logistic-regression-tp24458629p24458629.html Sent from the R help mailing list archive at Nabble.com. Michael Dewey http://www.aghmed.fsnet.co.uk __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] zero cells in one variable in logistic regression
At 10:37 13/07/2009, anna.bucharova wrote: Dear all. I am sort of beginner with R. I do logistic regression with binomial response variable and several continuous and categorical variables. In one categorical variable, zero cell occures (2x2 table looks like 7 - 0 23 - 25 This leads to overestimating of odds ratio and inflated confidence interval for odds for given variable. The variable is significant in univariate test. I do not necessarilly need odd ratio, but I need the explained deviance by this variable and I really want to keep this variable in the model. It probably matters for explained deviance. How to treat this problem? Anna, you could consider brglm (from CRAN) which does give you finite estimates for the parameter. @ARTICLE{firth93, author = {Firth, D}, year = 1993, title = {Bias reduction of maximum likelihood estimates}, journal = {Biometrika}, volume = 80, pages = {27--38}, keywords = {glm} } gives the theory Thanks for help, Anna Bucharova -- View this message in context: http://www.nabble.com/zero-cells-in-one-variable-in-logistic-regression-tp24458629p24458629.html Sent from the R help mailing list archive at Nabble.com. Michael Dewey http://www.aghmed.fsnet.co.uk __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.