Re: [R] logistic regression in R - changing defaults

From: Dimitris Rizopoulos <dimitris.rizopoulos_at_med.kuleuven.be>
Date: Tue 09 Jan 2007 - 12:35:52 GMT

an option is to use ?relevel(), e.g.,

life.use$where. <- relevel(life.use$where, 3) model<- glm(cbind(sucesses, failures) ~ where. + who + firstep + dxnarrow +

            age + sex + medyear, family = binomial, data = life.use)

print(model, digits = 1)
print(model, digits = 2)
print(model, digits = 3)
print(model, digits = 4)


I hope it helps.

Best,
Dimitris



Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium

Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


> Hello,
>
> I was hoping for some advice in changing 2 defaults in a logistic
> regression.
>
> 1. It looks like the first category is the reference category? In
> the
> following syntax 'where' has 4 levels, how can I make the reference
> category the third category?
>
> model<- glm(cbind(sucesses, failures) ~ where + who + firstep +
> dxnarrow +
> age + sex + medyear, family = binomial, data=life.use)
> model
>
> 2. Is it possible to round results to 4 decimal points? If so, what
> syntax
> is required?
>
> Any assistance is appreciated,
>
> Bob Green
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



R-help@stat.math.ethz.ch 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. Received on Tue Jan 09 23:41:50 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 09 Jan 2007 - 13:30:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.