Hi all i know this is probably a silly question but im wondering what is the 'reference' category when you run a binomal glm. that is my outcome/DV is 0,1 and i run a regression and get coefficients. do the coefficients refer to the probability to get 0 or 1? thanks so much in advance Z [[alternative HTML version deleted]]
On May 27, 2014, at 3:51 AM, Xebar Saram <zeltakc at gmail.com> wrote:> Hi all > > i know this is probably a silly question but im wondering what is the > 'reference' category when you run a binomal glm. that is my outcome/DV is > 0,1 and i run a regression and get coefficients. do the coefficients refer > to the probability to get 0 or 1? > > thanks so much in advance > > ZAs per the Details section of ?glm: A typical predictor has the form response ~ terms where response is the (numeric) response vector and terms is a series of terms which specifies a linear predictor for response. For binomial and quasibinomial families the response can also be specified as a factor (when the first level denotes failure and all others success) or as a two-column matrix with the columns giving the numbers of successes and failures. Thus, if you have a numeric 0/1 response, you are predicting 1's and if you use a two level factor, you are predicting the second level of the factor. Regards, Marc Schwartz
On 27/05/2014 09:51, Xebar Saram wrote:> Hi all > > i know this is probably a silly question but im wondering what is the > 'reference' category when you run a binomal glm. that is my outcome/DV is > 0,1 and i run a regression and get coefficients. do the coefficients refer > to the probability to get 0 or 1??binomial in R-devel says For the ?binomial? and ?quasibinomial? families the response can be specified in one of three ways: 1. As a factor: ?success? is interpreted as the factor not having the first level (and hence usually of having the second level). 2. As a numerical vector with values between ?0? and ?1?, interpreted as the proportion of successful cases (with the total number of cases given by the ?weights?). 3. As a two-column integer matrix. The first column gives the number of successes and the second the number of failures.> > thanks so much in advance > > Z > > [[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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On May 27, 2014, at 1:51 AM, Xebar Saram wrote:> Hi all > > i know this is probably a silly question but im wondering what is the > 'reference' category when you run a binomal glm. that is my outcome/DV is > 0,1 and i run a regression and get coefficients. do the coefficients refer > to the probability to get 0 or 1?No, would be my quick answer. With logistic regression, i.e., "binomial glm", the coefficients are the log-odds of an outcome of 1 minus the log-odds of an outcome of 0 for a one unit change or difference in the predictor whose effect is being estimated. This is known log of the "odds ratio" or the logit (since subtraction on the log-odds scale is equivalent to division on the odds-ratio scale.) When you ask about a "reference level", it is unclear whether you refer to the reference level for factor coefficients or your are talking about the reference level for the response. With the use of 'predict.glm' (called form by the use of 'predict(.)" with a glm fit), you have a choice of specifying whether you want the "type" to be "response" to return the probabilities or "terms" to return the usual coefficients on the log-odds scale. See: ?predict.glm> > [[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.David Winsemius Alameda, CA, USA