Skip to content

Instantly share code, notes, and snippets.

@Ddedalus
Created May 7, 2018 22:48
Show Gist options
  • Save Ddedalus/a3e358dda64a6332d5bbd4fc8b9d9fa4 to your computer and use it in GitHub Desktop.
Save Ddedalus/a3e358dda64a6332d5bbd4fc8b9d9fa4 to your computer and use it in GitHub Desktop.
Fit discrete distribution and qq plot in R
library(fitdistrplus)
library(lattice)
in_geom_fit <- fitdist(in_deg, "geom")
summary(in_geom_fit)
plot(in_geom_fit)
quantiles <- seq(0, 1, 0.05)
qqmath(~in_deg, distribution=function(p){ qgeom(p, prob = in_geom_fit$estimate)}, main="Q-Q plot against geometric distribution", xlab = "geometirc from estimate")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment