[R] [FORGED] Testing wether my dataset follows a poisson distribution with R
Rolf Turner
r@turner @end|ng |rom @uck|@nd@@c@nz
Wed Jul 22 13:31:41 CEST 2020
On 22/07/20 2:26 pm, Paul Bernal wrote:
> Dear friends,
>
> I have a sample dataset, which is basically the number of transits through
> a particular waterway, and is on a daily basis.
>
> MyDat <- dataset$DailyTransits
>
> What I´d like to do is to test whether MyDat follows a poisson distribution
> or not. What R function could accomplish this?
>
> Any help and/or guidance will be greatly appreciated,
I presume (your question is a bit vague) that you want to do a goodness
of fit test of the Poisson distribution to your data. Doing such a test
would, I think, involve the assumption that your observations are
independent and identically distributed (i.i.d.). Since you appear to
have a time series of daily counts, this assumption is unlikely to be valid.
Modelling such a time series and investigating whether the underlying
marginal distributions are Poisson is likely to be a fairly subtle
problem. Others may be able to offer more insight here. However such a
discussion would be about statistical theory and methodology and hence
inappropriate for this list.
If you make the (likely to be untenable) assumption that your data are
i.i.d. then such a g.o.f. test is probably most appropriately done using
a chi-squared goodness of fit test.
The function chisq.test() would help you. Getting the details right
may prove a bit tricky, but if you can't handle that, then you should
probably seek "local" statistical advice.
In fact, you should (in view of the likely lack of independence of your
data) seek local statistical advice in any case.
cheers,
Rolf Turner
P.S. Please note that it's "whether" not "wether". (A wether is a
castrated ram.) Also "Poisson" should be capitalised. (It's a bloke's
name.)
R. T.
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
More information about the R-help
mailing list