Dear all, I am encountering some odd results from the summary(object) command for coxph and hurdle models. In both cases the result of summary(object) function leaves out one of the categories of a categorical variable used in the model. It is typically the first category if sorted alphabetically. Is there any way around this problem? For example, if I have categorical variable "type" with values {A,B,C,D,E}, it typically leaves out A in the result of the summary. Thanks! [[alternative HTML version deleted]]
These are **not** odd results. You just don't understand how linear models work, in particular, you need to understand contrasts for categorical factors. As this is not the place for a statistics tutorial, I suggest you read up on linear models or consult a local expert. Cheers, Bert On Tue, Sep 3, 2013 at 11:51 AM, Soumitro Dey <soumitrodey1@gmail.com>wrote:> Dear all, > > I am encountering some odd results from the summary(object) command for > coxph and hurdle models. In both cases the result of summary(object) > function leaves out one of the categories of a categorical variable used in > the model. It is typically the first category if sorted alphabetically. Is > there any way around this problem? > > For example, if I have categorical variable "type" with values {A,B,C,D,E}, > it typically leaves out A in the result of the summary. > > Thanks! > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm [[alternative HTML version deleted]]
Hi see ?contrasts ?model.matrix go through archives and through chapter 11.1.1 Contrasts from R-Intro document. Anyway, when you go through this chapter you will probably benefit from reading previous chapters too. Regards Petr> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Soumitro Dey > Sent: Tuesday, September 03, 2013 8:51 PM > To: r-help at r-project.org > Subject: [R] summary(object) not showing all values of a factor > > Dear all, > > I am encountering some odd results from the summary(object) command for > coxph and hurdle models. In both cases the result of summary(object) > function leaves out one of the categories of a categorical variable > used in the model. It is typically the first category if sorted > alphabetically. Is there any way around this problem? > > For example, if I have categorical variable "type" with values > {A,B,C,D,E}, it typically leaves out A in the result of the summary. > > Thanks! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.
Possibly Parallel Threads
- inconsistent handling of factor, character, and logical predictors in lm()
- Multiple Integration
- inconsistent handling of factor, character, and logical predictors in lm()
- Plotting time data for various countries in same graph
- little manipulation on data frame