[R] calculating odds ratio in logistic regression with interaction terms
dwinsemius at comcast.net
Thu Feb 7 20:47:34 CET 2013
On Feb 7, 2013, at 10:58 AM, Aminreza Aamini wrote:
> I am comparing SAS commands with R.
> consider i want to assess the effect of one exposure(like CAT where 1
> equals high and 0 equals low) and one cofounding variable (like
> cholesterol leve,CHL) on a diseasee variable (like CHD).
> In SAS to get a numerical value for the odds ratio, consider, for
> example, the specific values CHL equal to 220 and HPT equal to 1 when
> the model contains interaction terms like (CC=CAT*CHL) the command
> PROC GENMOD data=l2 DESCENDING;
> MODEL CHD=CAT CHL CC/LINK=LOGIT DIST=BINOMIAL;
> ESTIMATE CAT 1 CC 200 /EXP;
> I just want to find such a command in R. Its not a homework.
But it _is_ asking an extremely question that would be more rapidly answered by simply typing "how to do logistic regression in R" in a search engine. (I know this because I just tried it.) Such questions are explicitly deprecated in the Posting Guide. You should also do further self-study by reading the Posting Guide, working through the "Introduction to R", and learning to use the help() system.
> On Wed, Feb 6, 2013 at 9:46 PM, Bert Gunter <gunter.berton at gene.com> wrote:
>> 1. Please do not double post.
>> 2. This is a statistics, not an R question. Post on a statistics list,
>> like stats.stackexchange.com instead.
>> 3. Is this a homework question? -- we don't do homework here.
>> -- Bert
>> On Wed, Feb 6, 2013 at 8:59 AM, Aminreza Aamini <amin.r.fan at gmail.com>
>>> Dear all,
>>> How can i obtain odds ratio in logistic regression when the model
>>> contains interaction terms in R?
>>> how can i obtain OR for a special case?
>>> Thanks in advance for any help.
>>> R-help at r-project.org mailing list
>>> PLEASE do read the posting guide
>>> and provide commented, minimal, self-contained, reproducible code.
>> Bert Gunter
>> Genentech Nonclinical Biostatistics
>> Internal Contact Info:
>> Phone: 467-7374
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Alameda, CA, USA
More information about the R-help