# NOT RUN {
## Generate grouped data
sim = simDegrossData(n=1500, plotting=TRUE, choice=2)
## Create a degrossData object
obj.data = degrossData(Big.bins=sim$Big.bins, freq.j=sim$freq.j, m.j=sim$m.j)
print(obj.data)
## Estimate the density
obj.fit = degross(obj.data)
## Superpose the fitted density using the <ddegross> function
curve(ddegross(x,obj.fit),add=TRUE,lty="dashed")
legend("topright",lty="dashed",lwd=2,legend="Estimated",box.lty=0, inset=.04)
# }
Run the code above in your browser using DataLab