Description Usage Arguments Value Author(s) References See Also Examples
Cumulative distribution function (cdf) based on an object resulting from the estimation procedure in degross.
1 | pdegross(x, degross.fit, phi)
|
x |
Scalar or vector where the fitted cdf must be evaluated. |
degross.fit |
A |
phi |
(Optional) vector of spline parameters for the log density (default: |
a scalar or vector of the same length as x
containing the value of the fitted cdf at x
.
Philippe Lambert p.lambert@uliege.be
Lambert, P. (2021) Moment-based density and risk estimation from grouped summary statistics. arXiv:2107.03883.
degross.object
, ddegross
, qdegross
, degross
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Generate grouped data
sim = simDegrossData(n=3500, 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 cdf using the <pdegross> function
with(sim, curve(true.cdf(x),min(Big.bins),max(Big.bins),
col="red",lwd=2, ylab="F(x)"))
curve(pdegross(x,obj.fit),add=TRUE,lty="dashed")
legend("topleft", legend=c("Target cdf","Estimated cdf"), lwd=2,
lty=c("solid","dashed"), col=c("red","black"), box.lty=0, inset=.04)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.