[R] regression analysis with interactions

Erik Iverson eriki at ccbr.umn.edu
Thu Aug 5 23:14:33 CEST 2010



Jennifer Hou wrote:
> Thank you very much for your kind reply, I have found that the error
> was in the stdCoeff function and not in the linear model. summary()
> works pretty well on my model, I will simply use another function to
> compute my coefficients. Best regards, Jennifer
> 

See ?coef , summary should also give them to you.

>> Date: Wed, 4 Aug 2010 15:27:40 -0500 From: eriki at ccbr.umn.edu To:
>> jennifer.hou at hotmail.de CC: r-help at r-project.org Subject: Re: [R]
>> regression analysis with interactions
>> 
>> 
>> 
>> Jennifer Hou wrote:
>>> Hello,
>>> 
>>> I have got a linear model that looks like this: lm(criterion ~
>>> variable.A*variable.a + variable.B*variable.b + variable.C
>>> *variable.c)
>>> 
>>> The output computed with stdCoeff() seems to be all right, but it
>>> does not show the coefficients of the interaction of the first
>>> pair of variables. Instead, it shows "NA":
>>> 
>> And what package is the `stdCoeff` function in? If we don't have a
>>  reproducible example, it's very hard to help.
>> 
>> What does calling the summary function on your lm object give you?
>> 
>> 
>>> (Intercept) NA
>>> 
>>> variable.A 0.0925094150 variable.a 0.1517246479 variable.B 
>>> -0.0023847092 variable.b 0.0256653197 variable.C 0.0194313471 
>>> variable.c 0.0192897539
>>> 
>>> variable.A : variable.a NA variable.B : variable.b 0.0471111439 
>>> variable.C : variable.c 0.0696702457 
>>> ______________________________________________ 
>>> 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.
>  [[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.



More information about the R-help mailing list