[R] log-normal distribution and shapiro test
Siegfried Gonzi
siegfried.gonzi at stud.uni-graz.at
Wed Nov 17 13:43:10 CET 2004
Hello:
Yes I know that sort of questions comes up quite often. But with all due
respect I din't find how to perform what I want. I am searching archives
and bowsing manuals but it isn't there, though, it is a ridiculous
simple task for the experienced R user.
I have data and can do the following with them:
==
hist(y, prob=TRUE)
lines(density(y,bw=0.03)
==
The result actually is a nice histogram superimposed by a line plot.
The histogram is a bit skewed to the left. My assumption actually is
that a log-normal transformation would cure the problem. But how the
hell can one plot such a density function or Gaussian function which has
logarithmic scales on x axis.
For example I tried:
==
plot(hist(y),log="x")
or
plot(hist(log10(y)),log="x")
==
But with no avail. I want my axis like: 1,10,100
What would be other methods to test whether the data are logaritmically
distributed.
A last question to the Shapiro-Wilk test. Were can I get critical
parameters? I mean I get for my distribution: W=0.9686, p-value=6.887e-07.
What does that mean? Yes I have got some books about statics, but none
of them says what one should do with the values then. The logaritmic
transformation "shapiro.test(log10(y))" says: W=0.9773, p-value= 2.512e-05.
Sorry for disturbing you. Although, it is really no homework. I need it
for my Phd in physics; after a lengthy computation on the computer I
would like to go to see whether the outputs are log-normal or normal
distributed.
Regards,
Siegfried Gonzi
==
University of Graz
Institute for Physics
Tel.: ++43-316-380-8620
==
More information about the R-help
mailing list