simDegrossData {degross} R Documentation

## Simulation of grouped data and their sample moments to illustrate the degross density estimation procedure

### Description

Simulation of grouped data and their sample moments to illustrate the degross density estimation procedure

### Usage

simDegrossData(n, plotting=TRUE, choice=2, J=3)


### Arguments

 n Desired sample size plotting Logical indicating whether the histogram of the simulated data should be plotted. Default: FALSE choice Integer in 1:3 indicating from which mixture of distributions to generate the data J Number of big bins

### Value

A list containing tabulated frequencies and central moments of degrees 1 to 4 for data generated using a mixture density. This list contains :

• n : ⁠ ⁠total sample size.

• J : ⁠ ⁠number of big bins.

• Big.bins : ⁠ ⁠vector of length J+1 with the big bin limits.

• freq.j : ⁠ ⁠vector of length J with the observed big bin frequencies.

• m.j : ⁠ ⁠J by 4 matrix with on each row the observed first four sample central moments within a given big bin.

• true.density : ⁠ ⁠density of the raw data generating mechanism (to be estimated from the observed grouped data).

• true.cdf : ⁠ ⁠cdf of the raw data generating mechanism (to be estimated from the observed grouped data).

### Author(s)

Philippe Lambert p.lambert@uliege.be

### References

Lambert, P. (2021) Moment-based density and risk estimation from grouped summary statistics. arXiv:2107.03883.

degrossData.

### Examples

## Generate data
sim = simDegrossData(n=3500, plotting=TRUE, choice=2, J=3)
print(sim\$true.density) ## Display density of the data generating mechanism

# Create a degrossData object
obj.data = with(sim, degrossData(Big.bins=Big.bins, freq.j=freq.j, m.j=m.j))
print(obj.data)



[Package degross version 0.9.0 Index]