Hi all, I am trying to test wheater the distribution of my samples is normal with QQ plot. I have a values of water content in clays in around few hundred samples. Is the code : qqnorm(w) #w being water content qqline(w) sufficient? How do I know when I get the plots which distribution is normal and which is not? Thanks, m [[alternative HTML version deleted]]
Hi, qqnorm basically plots your actual sample values against what the values would be (approximately) if they were from a normal distribution. qqline() adds a line through the 1st and 3rd quartiles. So roughly speaking, if your QQ plot forms a straight line (particularly the one drawn by qqline), then your sample values match a normal distribution. With real data, it is typically not a "yes/no" decision, rather "is my data normal enough?" Questions like this have been asked many times on this list, so searching the mailing list archives will lead you to many more discussions and suggestions. Here is one way to search: http://tolstoy.newcastle.edu.au/R/ Cheers, Josh On Sat, Apr 30, 2011 at 10:27 AM, Matev? Pavli? <matevz.pavlic at gi-zrmk.si> wrote:> Hi all, > > > > I am trying to test wheater the distribution of my samples is normal with QQ plot. > > > > I have a values of water content in clays in around few hundred samples. Is the code : > > > > qqnorm(w) ? ? ?#w being water content > > qqline(w) > > > > > > sufficient? > > > > How do I know when I get the plots which distribution is normal and which is not? > > > > Thanks, m > > > ? ? ? ?[[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.-- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/
Thanks for the answer and for the link. I was lookin for a search trough the forum posts.... So the slope of the line is not important as long as the data is approx. on the line? Thanks, m -----Original Message----- From: Joshua Wiley [mailto:jwiley.psych at gmail.com] Sent: Saturday, April 30, 2011 8:04 PM To: Matev? Pavli? Cc: r-help at r-project.org Subject: Re: [R] QQ plot for normality testing Hi, qqnorm basically plots your actual sample values against what the values would be (approximately) if they were from a normal distribution. qqline() adds a line through the 1st and 3rd quartiles. So roughly speaking, if your QQ plot forms a straight line (particularly the one drawn by qqline), then your sample values match a normal distribution. With real data, it is typically not a "yes/no" decision, rather "is my data normal enough?" Questions like this have been asked many times on this list, so searching the mailing list archives will lead you to many more discussions and suggestions. Here is one way to search: http://tolstoy.newcastle.edu.au/R/ Cheers, Josh On Sat, Apr 30, 2011 at 10:27 AM, Matev? Pavli? <matevz.pavlic at gi-zrmk.si> wrote:> Hi all, > > > > I am trying to test wheater the distribution of my samples is normal with QQ plot. > > > > I have a values of water content in clays in around few hundred samples. Is the code : > > > > qqnorm(w) ? ? ?#w being water content > > qqline(w) > > > > > > sufficient? > > > > How do I know when I get the plots which distribution is normal and which is not? > > > > Thanks, m > > > ? ? ? ?[[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.-- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/
I would use the vis.test function along with vt.qqnorm (both in TeachingDemos package). This will create several plots, one of which is your data, the rest are simulated normals with the same mean and standard deviation. If you can tell which plot stands out (and it is your real data) then that suggests that the data is not normal. If you cannot tell which plot is the real data then that suggests that your data is close enough to normal. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Matev? Pavlic > Sent: Saturday, April 30, 2011 11:28 AM > To: r-help at r-project.org > Subject: [R] QQ plot for normality testing > > Hi all, > > > > I am trying to test wheater the distribution of my samples is normal > with QQ plot. > > > > I have a values of water content in clays in around few hundred > samples. Is the code : > > > > qqnorm(w) #w being water content > > qqline(w) > > > > > > sufficient? > > > > How do I know when I get the plots which distribution is normal and > which is not? > > > > Thanks, m > > > [[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.
I have found this web page useful http://www.cms.murdoch.edu.au/areas/maths/statsnotes/samplestats/qqplot.html Your mileage may vary. Keith J "Matevz Pavlic" <matevz.pavlic at gi-zrmk.si> wrote in message news:AD5CA6183570B54F92AA45CE2619F9B90120801E at gi-zrmk.si...> Hi all, > > > > I am trying to test wheater the distribution of my samples is normal with > QQ plot. > > > > I have a values of water content in clays in around few hundred samples. > Is the code : > > > > qqnorm(w) #w being water content > > qqline(w) > > > > > > sufficient? > > > > How do I know when I get the plots which distribution is normal and which > is not? > > > > Thanks, m > > > [[alternative HTML version deleted]] >