> On Jul 24, 2016, at 8:20 AM, Qinghua He via R-help <r-help@r-project.org> > wrote: > > Dear all, > I have the following table for a breast cancer study and I was trying to > calculate the odds ratio of different subtypes based on AR (AR+ as the base > case). > AR- AR+Luminal A 1 19Luminal B 1 15Her2 > 0 4Basal-like 20 1Normal Like 2 2 > I did Firth logistic regression using the model: > fit <- logistf(AR ~ > Age+LumA+LumB+HER2+Basal+Normal-1,data=df).summary(fit)exp(coef(fit))exp(confint(fit))
Edited from the HTML-garbled posting that appeared. Rhelp is a plain text mailing list and HTML ends up as a mess. coef se(coef) lower 0.95 upper 0.95 Chisq p Age 0.02675758 0.03138425 -0.03462915 0.09404934 0.7210455 0.39580118 LumA -4.04312870 2.08208148 -8.91195072 -0.32580912 4.6216454 0.03157094 LumB -3.74769116 1.96613514 -8.19454796 -0.16290619 4.2262682 0.03980286 HER2 -3.71796180 2.45080140 -9.50654675 0.54467296 2.8798910 0.08969209 Basal 1.12126338 1.83884710 -2.45335167 5.00553060 0.3763601 0.53955773 Normal -1.51899257 2.05597939 -5.97976670 2.40100862 0.5806537 0.44605621 > My question is: how come the p-value of Basal is so large? I was expecting a > smaller p-value than LumA or LumB. Your question is not on-topic for Rhelp., since it really has nothing to do with problems in R programming. You should be posing the question on a mailing list or a web forum where purely statistical questions are welcomed. I would expect that you would get a followup question asking you for more information, since there are many aspects of datasets that may affect p-values that you have not yet described. You for instance have not even described what "AR" might be. I'd suggest that you first read the Posting Guide and then post a question on http://stats.stackexchange.com with some more information about the study and better descriptive statistics about your population size and the covariates. > Some extra information: >> exp(coef(fit)) >> Age LumA LumB HER2 Basal Normal >> 1.02711878 0.01754250 0.02357211 0.02428341 3.06872873 0.21893233 >> exp(confint(fit)) >> Lower 95% Upper 95% >> Age 9.659636e-01 1.0986139 >> LumA 1.347687e-04 0.7219430 >> LumB 2.761551e-04 0.8496709 >> HER2 7.436339e-05 1.7240445 >> Basal 8.600484e-02 149.2362476 >> Normal 2.529416e-03 11.0343002 > If I calculate odds ratio using an online calculator based on: AR- > AR+Basal 20 1Non-basal 4 40 > I got: > OR:200 95% CI: 20.9510 to 1909.2138 p < 0.0001 > Can someone please help me explain? > Thank you very much! > Peter > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. David Winsemius Alameda, CA, USA ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.