Re: [R] Goodness fit test HELP!

From: Amit Kabiri <akabiri_at_012.net.il>
Date: Sun 04 Dec 2005 - 03:43:28 EST


If I have a Uniform distribution to check, How can I use visual fits? Can I also use in some way the qqnorm?

Thanks

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Elizabeth Lawson Sent: Friday, November 18, 2005 8:06 PM
To: David Zhao
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Goodness fit test HELP!

What about trying a qqplot to see how the distribution fits...    

  For the normal distribution thta is very stright forward, use qqnorm.    

  To test gamma distribtution (or any other) do some thing like this    

  n<-length(data)
  for(i in 1:n){
  prob<-(i-1/3)/(n1/3)
  }  

quantiles<-qgamma(prob,shape=mean(data)/var(data),scale=var(data)/mean(data) }    

  qqplot(data,quantiles)    

  If the distribution is a good for, you should a stright line, like wiht a qqnorm plot!    

  Good luck!!    

  Elizbaeth Lawson

David Zhao <wzhao6898@gmail.com> wrote:
  Hi there,

I'm a newbie, plesae bear with me.
I have a dataset with about 10000 ~ 30000 data points. Would like fit to both Gamma and Normal distribution to see which one fits better. How do I do this in R? Or I could do a normality test of the data, if it's normal, I then will do a normal fit, otherwise, a gamma fit. But again, I don't know how to do this either.
Please help!

David

[[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html                    

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Dec 04 03:49:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:28 EST