Re: Normality test
- To: mathgroup at smc.vnet.net
- Subject: [mg107100] Re: Normality test
- From: Ray Koopman <koopman at sfu.ca>
- Date: Tue, 2 Feb 2010 06:54:41 -0500 (EST)
- References: <hk8nns$8jv$1@smc.vnet.net>
On Feb 2, 12:28 am, michael partensky <parten... at gmail.com> wrote: > Hi. > I wonder if anybody knows a function similar to qqnorm(data) from *R*, > producing a normal scores plot, or some related tools in M. for testing > normality of data? > > Thanks > Michael Partenskii qqnorm[y_] := Block[ {n = Length@y, m = Mean@y, s = StandardDeviation@y, x}, x = InverseErf[Range[1-n,n-1,2]/n]*Sqrt[2.]; ListPlot[Transpose@{x,Sort@y}, PlotRange->All, Frame->True, Axes->None, AspectRatio->1, Prolog->Line[{{x[[1]],x[[1]]*s+m},{x[[-1]],x[[-1]]*s+m}}], FrameLabel->{"Theoretical Standard Normal Quantiles", "Observed Quantiles"}]]
- Follow-Ups:
- Re: Re: Normality test
- From: michael partensky <partensky@gmail.com>
- Re: Re: Normality test