Re: [R] lm for log log

From: David Winsemius <dwinsemius_at_comcast.net>
Date: Sun, 20 Jun 2010 21:30:26 -0400

On Jun 20, 2010, at 9:14 PM, David Winsemius wrote:

>
> On Jun 20, 2010, at 8:17 PM, (Ted Harding) wrote:
>
>> On 20-Jun-10 19:54:02, David Winsemius wrote:
>>> On Jun 20, 2010, at 1:38 PM, Ekaterina Pek wrote:
>>>> Hi, Ted.
>>>> Thanks for your reply. It helped. I have further a bit of
>>>> questions.
>>>>
>>>>> It may be that lm(log(b) ~ log(a)) is, from a substantive point of
>>>>> view, a more appropriate model for whetever it is than lm(b ~ a).
>>>>> Or it may not be. This is a separate question. Again, Spearman's
>>>>> rho is not definitive.
>>>>
>>>> How one determines if one linear model is more appropriate than
>>>> another ?
>>>> And : linear model "log(b) ~ log(a)" is okay ? I hesitated to use
>>>> such
>>>> thing from the beginning, because it seemed to me like it would
>>>> have
>>>> meant a nonlinear model rather than linear.. (Sorry, if the
>>>> question
>>>> is stupid, I'm not that good at statistics)
>>>
>>> Your earlier description of the plots made me think both "a" and "b"
>>> were right-skewed. Such a situation (if my interpretation were
>>> correct) would seriously undermine the statistical validity of an
>>> analysis like lm(a ~ b) .
>>> --
>>> David Winsemius, MD
>>
>> That doesn't follow. If b is linearly related to a: b = A + B*a +
>> error,
>> and if the distribution of a is highly skewed, then so also will be
>> the distribution of b, even if the error is a nice Gaussian error
>> with constant variance (and small compared with the dispersion
>> of a & b).
>
> Yes, but that was not what was suggested in the OP's description of
> the scatterplot of a and b.

Or rather I should say that is not the data picture that came to mind. Your theory can be visualized as:

 > a <- rlnorm(3000)
 > b <- 1 + 2*a +rnorm(3000)
 > plot(a,b)

Mine was a more heteroskedastic picture:

 > a <- rlnorm(3000)
 > b <- rlnorm(3000)
 > plot(a,b)

-- 
David Winsemius, MD
West Hartford, CT

______________________________________________
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.
Received on Mon 21 Jun 2010 - 01:33:42 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Jun 2010 - 02:10:33 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.

list of date sections of archive