In both cases I am trying to produce a chi-squared test statistic, which is sum(((observed-expected)^2)/expected).Īny help would be appreciated. The app displays plots of the fitted distribution superimposed on a histogram of the data. You can choose from 22 built-in probability distributions or create your own custom distribution. The part I'm needing help with is the "teststat" code.įor the Poisson test stat, I am having trouble when a histogram has a break with 0 versus a histogram with first break of 1.įor the Binomial test stat, I am having trouble making an accurate test statistic with the breaks occurring at 0.5, 1.5, 2.5, etc. The Distribution Fitter app interactively fits probability distributions to data imported from the MATLAB ® workspace. I am pretty sure the code works for the uniform distribution, but I am struggling to find code that works for any histogram produced under the rbinom and rpois functions. I am currently working on making a Shiny app that can store an accurate test statistic for any of these three distributions (Poisson, Binomial, or Uniform).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |