# adk.test: sample size

I'm using the function adk.test (AD test, adk package) to estimate if a data sample follows a distribution family.

My question is I have datawith 100 values, should I simulate the distribution with 100 values or with as many as I want? rnorm(100) or rnorm(1000000)

EDIT: using fitdist and gofstat functions of fitdistrplus package I get the following results:

Ex: Normal distribution

ad = 1.4491191816923,


How can I check the validity of the function conclusion? I must compare ad with....

Also for the same data I get very different conclusions using adk:

1st quartile of 100 runs of adk with 1000 samples:
p-value = 0.20
min p-value = 0.05
conclusion: the null cannot be rejected

-
The AD test can be applied for testing if a sample comes from a certain distribution $F$ or if several samples come from the same distribution but it appears to me that the former is not available in this package. You could simulate from the distribution $F$ and compare it with the data using adk.test(data,simulations) but it is not clear the required number of simulations for obtaining meaningful results (I guess that as many as possible but I would not bet on this). Are you interested on testing normallity? –  user10525 Aug 28 '12 at 14:53
That's also my guess, but this is an important choice that's why I posted :) –  jpcgandre Aug 28 '12 at 14:55
If it is important, then why not implement the single-sample AD test? The test statistic is not extremely difficult and then you do not have to worry about the sample size. –  user10525 Aug 28 '12 at 14:55
Do you mean creating the function? adk is available and I'd like to see if it works. Only if I have evidence that it does not work will I think of developing the test myself. –  jpcgandre Aug 28 '12 at 14:57
I do think the question has improved, in that it more clearly reflects your situation & what you need to know, however, I note that the question now revolves, in large part, around how / why 2 R functions appear to give differing results. We can see how this Q fares in its current incarnation, but if you don't get a satisfactory answer it may do better on Stack Overflow, or probably even as a submission to the R help listserv. –  gung Aug 28 '12 at 17:01
show 1 more comment

fit = fitdist(x, "<some_dist_type>")