Re: [R] About poisson distribution fitting and testing

2006-04-22 Thread Spencer Graves
  The easiest, general function in R that I know for fitting 
distributions is fitdistr in library(MASS).  However, for Poisson, I 
might also try glm(y~1, family = poisson, ...).  Regarding testing for 
goodness of fit, I just got 44 hits for RSiteSearch(goodness of fit to 
Poisson).

  hope this helps.
  spencer graves
p.s.  My reply might have been more informative if you had provided 
example data.  For example, for the Poisson, the theoretical variance 
equals the mean.  Clearly, if the sample mean and variance are 6 and 11, 
that alone could raise questions about the adequacy of the Poisson 
assumption, depending on the sample size.

Linda Lei wrote:

 Hi All,
 
  
 
 I have a sequence of positive integers, which is right skewed. The mean
 value is 6 and variance is 11. 
 
 I suspect it can be fitted by poisson distribution. But I'm not familiar
 with the function to fit distribution. 
 
 Could you please help me with it? Also, once I fit the poisson 
 
 distribution, how can I check the good-ness of this fitting?
 
  
 
 Thank you!
 
 
   [[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


[R] About poisson distribution fitting and testing

2006-04-19 Thread Linda Lei
Hi All,

 

I have a sequence of positive integers, which is right skewed. The mean
value is 6 and variance is 11. 

I suspect it can be fitted by poisson distribution. But I'm not familiar
with the function to fit distribution. 

Could you please help me with it? Also, once I fit the poisson 

distribution, how can I check the good-ness of this fitting?

 

Thank you!


[[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


Re: [R] About poisson distribution fitting and testing

2006-04-19 Thread Peter Ehlers
Does fitdistr() in package MASS help?

  Peter Ehlers

Linda Lei wrote:

 Hi All,
 
  
 
 I have a sequence of positive integers, which is right skewed. The mean
 value is 6 and variance is 11. 
 
 I suspect it can be fitted by poisson distribution. But I'm not familiar
 with the function to fit distribution. 
 
 Could you please help me with it? Also, once I fit the poisson 
 
 distribution, how can I check the good-ness of this fitting?
 
  
 
 Thank you!
 
 
   [[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


Re: [R] About poisson distribution fitting and testing

2006-04-19 Thread Rolf Turner

(a) Surely to gumdrops, fitting a ***Poisson*** distribution
is as trivial as it gets.  There's one parameter to estimate;
lambda.hat -  x.bar - mean(x).

(b) If the mean is 6 and the variance is 11, the data are VERY
unlikely to be Poisson.  If X is Poisson, var(X) = E(X).  No
indication of the sample size was given, but let's take a sample size
of 30 for the purposes of illustration.  In this case the probability
of getting a variance of 11 from a Poisson distribution with
(population) mean equal to 6 is (approximately, by simulation) 0.004.

(c) A chi-squared goodness of fit test will also (almost surely!)
tell you that the data are not Poisson.

cheers,

Rolf Turner
[EMAIL PROTECTED]

__
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