To select another reference level from the default that R chooses you can use the "relevel" function
example; Reorder Levels of Factorwarpbreaks$tension <- relevel(warpbreaks$tension, ref="M") summary(lm(breaks ~ wool + tension, data=warpbreaks)) function findlink(pkg, fn) { var Y, link; Y = location.href.lastIndexOf("\\") + 1; link = location.href.substring(0, Y); link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn; location.href = link; } This sets "M" as the reference level for the analysis. At the prompt on the R workspace, type ?relevel A Smile costs Nothing But Rewards Everything Happiness is not perfected until it is shared -Jane Porter --- On Tue, 9/23/08, Bunny, lautloscrew.com <[EMAIL PROTECTED]> wrote: From: Bunny, lautloscrew.com <[EMAIL PROTECTED]> Subject: [R] odds ratio: how to create reference To: r-help@r-project.org Date: Tuesday, September 23, 2008, 4:06 AM HI there, i know this is a basic question, though i need some help because this is somewhat away from my current issue, but nevertheless interesting to me... Lets assume i have some estimated probabilities, say estimated by a logit model. i know i can also state them as an odds ratio. Now i´d like to state these odds ratios as a reference to a specific outcome of my investigated variable. for example, if my covariate of interest is race and possible outcomes are white, black and hispanic, whereas the latter are minorities in my case - how can i state the odds ratio in such a way that white is the reference (always 1) and other races' odds ratio are relative to the reference. e.g. hispanics are 1.5 times more likely to ... Is creating 3 binary dummies for race the right way ? And if so how can i go on. As i said, i know this is rather basic, i am thankful for any links / references... thanks in advance ! ______________________________________________ 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. [[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.