Estimating distribution goodness-of-fit

Hello. I need to compare empirical data and the corresponding theoretical data, generated from the Variance-Gamma distribution.
'a' - empirical data; 'VG_sim' - theoretical data.
I've tried to do it with the help of chisq.test(), but when I run chisq.test(a,VG_sim), RStudio stops reacting on my commands and soon switches off. Maybe it's connected with the extreme length of both vectors: they are 16000 values each.

Could you, please, recommend me any statistical packages or tests (with tutorials), which can help me to understand, whether theoretically generated data are in consistency with the empirical ones or not. Moreover, maybe I've done some mistakes in chisq.test(), and it is possible to run this code successfully if I specify arguments of this function right.

Thank you for your help.

requires that a, as x in the function signature and VG_sim as y conform to

x a numeric vector or matrix. x and y can also both be factors.

y a numeric vector; ignored if x is a matrix. If x is a factor, y should be a factor of the same length.

VG_sim is not a numeric vector; it's an object of class vgFit.

Well, I have two vectors:

  1. vector of empirical data - 'a';
  2. vector of theoretical data - 'VG_sim'

Both of them are of equal length.
How can I compare them by using chisq.test()? How does the right code for this look like?

v1 <- rnorm(100)
v2 <- rnorm(100)
#> Warning in chisq.test(v1, v2): Chi-squared approximation may be incorrect
#>  Pearson's Chi-squared test
#> data:  v1 and v2
#> X-squared = 9900, df = 9801, p-value = 0.239

Created on 2020-10-01 by the reprex package (v0.3.0.9001)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.