Description Usage Arguments Value Author(s) References See Also Examples
Quantile function based on an object resulting from the estimation procedure in degross.
1 |
p |
Scalar or vector of probabilities in (0,1) indicating the requested fitted quantiles Q(p) based on the density estimation results in |
degross.fit |
A |
phi |
(Optional) vector of spline parameters for the log density (default: |
get.se |
Logical indicating if standard errors for Q(p) are requested (default: FALSE). |
cred.level |
Level of credible intervals for Q(p). |
eps |
Precision with which each quantile should be computed (default: 1e-4). |
A scalar or vector x
of the same length as p
containing the values Q(p) at which the cdf pdegross(x,degross.fit)
is equal to p
.
When get.se
is TRUE, a vector or a matrix containing the quantile estimate(s), standard errors and credible interval limits for Q(p) is provided.
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
, pdegross
, degross
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## 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)
## Corresponding fitted quantiles
p = c(.01,.05,seq(.1,.9,by=.1),.95,.99) ## Desired probabilities
Q.p = qdegross(p,obj.fit) ## Compute the desired quantiles
print(Q.p) ## Estimated quantiles
## Compute the standard error and a 90% credible interval for the 60% quantile
Q.60 = qdegross(.60,obj.fit,get.se=TRUE,cred.level=.90) ## Compute the desired quantile
print(Q.60) ## Estimated quantile, standard error and credible interval
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.