# mkde: Multivariate kernel density estimation In Compositional: Compositional Data Analysis

## Description

Multivariate kernel density estimation.

## Usage

 `1` ```mkde(x, h, thumb = "silverman") ```

## Arguments

 `x` A matrix with Euclidean (continuous) data. `h` The bandwidh value. It can be a single value, which is turned into a vector and then into a diagonal matrix, or a vector which is turned into a diagonal matrix. `thumb` Do you want to use a rule of thumb for the bandwidth parameter? If no, leave it "none", or else put "estim" for maximum likelihood cross-validation, "scott" or "silverman" for Scott's and Silverman's rules of thumb respectively.

## Details

The multivariate kernel density estimate is calculated with a (not necssarily given) bandwidth value. It is used a wrapper for the function `comp.kerncontour`.

## Value

A vector with the density estimates calculated for every vector.

## Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <[email protected]> and Giorgos Athineou <[email protected]>

## References

Arsalane Chouaib Guidoum (2015). Kernel Estimator and Bandwidth Selection for Density and its Derivatives. The kedd R package.

M.P. Wand and M.C. Jones (1995). Kernel smoothing, pages 91-92.

B.W. Silverman (1986). Density estimation for statistics and data analysis, pages 76-78.

```mkde.tune, comp.kerncontour ```

## Examples

 ```1 2``` ```mkde( as.matrix(iris[, 1:4]), thumb = "scott" ) mkde( as.matrix(iris[, 1:4]), thumb = "silverman" ) ```

### Example output

```  [1] 0.089301980 0.060964368 0.080683410 0.069757751 0.080530967 0.041622363
[7] 0.070556755 0.093622444 0.037505023 0.072633743 0.061714350 0.086969991
[13] 0.060712179 0.038316997 0.021707244 0.009225153 0.041353575 0.089645507
[19] 0.035559725 0.057599117 0.067102894 0.067766067 0.047188567 0.071335217
[25] 0.079386424 0.056582385 0.087769254 0.086047485 0.086064293 0.080795155
[31] 0.075426107 0.065548672 0.023269872 0.019016311 0.075420294 0.080490124
[37] 0.059798291 0.072041933 0.047909515 0.091581644 0.088618949 0.004822917
[43] 0.057147832 0.064853371 0.050822898 0.060987394 0.056584947 0.075334980
[49] 0.066858403 0.091085632 0.034399304 0.059254538 0.053581667 0.035177416
[55] 0.077102065 0.081322253 0.047181813 0.021596199 0.065427232 0.041481710
[61] 0.009790151 0.079447047 0.020659055 0.094323585 0.056087376 0.055579577
[67] 0.065128176 0.060705148 0.022173907 0.054381361 0.050631954 0.077436370
[73] 0.048627891 0.077783160 0.073791105 0.067948418 0.050611120 0.078693252
[79] 0.095954777 0.047955510 0.044522912 0.040901677 0.072032204 0.078292507
[85] 0.047771548 0.026260799 0.065048447 0.026489338 0.060336397 0.054582111
[91] 0.059381858 0.087340015 0.067057436 0.022274595 0.073809768 0.062140975
[97] 0.077842867 0.083342991 0.025984082 0.080024218 0.031536783 0.058210358
[103] 0.049569828 0.078069751 0.064200374 0.022742154 0.014247533 0.031167417
[109] 0.024156865 0.010344876 0.068311206 0.065062863 0.069572383 0.030600234
[115] 0.026539983 0.056298934 0.082022919 0.008614031 0.009976685 0.021546733
[121] 0.052740175 0.044942953 0.018637233 0.074356565 0.051924667 0.033710737
[127] 0.086879317 0.086228124 0.060569378 0.036030261 0.027096517 0.007966429
[133] 0.053646630 0.085703128 0.045609710 0.018891541 0.031716677 0.075800726
[139] 0.081480123 0.065101424 0.056382663 0.052708199 0.058210358 0.053330314
[145] 0.040221204 0.060118742 0.041327439 0.082898855 0.031054074 0.072691642
[1] 0.103622136 0.070288630 0.093323951 0.080913211 0.092850215 0.047053633
[7] 0.079783027 0.108655039 0.042523718 0.083917682 0.070289076 0.100152621
[13] 0.070194931 0.043321485 0.023985126 0.010431829 0.046649593 0.104070125
[19] 0.039431904 0.065592902 0.076057678 0.077504373 0.051777751 0.080714847
[25] 0.090586967 0.064630827 0.101274250 0.099663386 0.099390794 0.093470540
[31] 0.087584872 0.074173194 0.025704341 0.021341796 0.087377611 0.092507822
[37] 0.067414763 0.082120384 0.054915087 0.106199899 0.102620105 0.005643991
[43] 0.064731304 0.072935491 0.057277473 0.070362896 0.064298342 0.086855918
[49] 0.076565583 0.105414569 0.037249137 0.064688359 0.058742728 0.038621750
[55] 0.085032078 0.091424021 0.050715433 0.024102432 0.072276768 0.044942721
[61] 0.010800881 0.088681682 0.022246788 0.105849475 0.062302257 0.061331282
[67] 0.072339943 0.067608016 0.024161072 0.061250577 0.054314989 0.086118074
[73] 0.052067639 0.086239455 0.081926163 0.075383913 0.054513823 0.086875150
[79] 0.107845464 0.053325017 0.050118898 0.045977872 0.080909118 0.086085137
[85] 0.052237697 0.027649993 0.071939089 0.028378499 0.067473358 0.060863345
[91] 0.065994496 0.097638460 0.074902560 0.024983395 0.082876150 0.069393797
[97] 0.087999435 0.093216718 0.028615472 0.090442404 0.034845007 0.063353988
[103] 0.054604501 0.085705286 0.071190639 0.025309225 0.014755329 0.034040430
[109] 0.025099038 0.011030904 0.075305466 0.071187926 0.077655235 0.032291888
[115] 0.027824518 0.062556424 0.090544981 0.010181489 0.011178238 0.023160966
[121] 0.059363301 0.048136343 0.021079360 0.081647687 0.057550300 0.036084712
[127] 0.096067999 0.095234647 0.066153560 0.038572321 0.029612706 0.009486091
[133] 0.058271770 0.094882457 0.048238828 0.020681012 0.035180681 0.083186735
[139] 0.089747059 0.072858784 0.063544693 0.058648977 0.063353988 0.060057807
[145] 0.045106667 0.066815576 0.044328283 0.092061557 0.033936445 0.079495551
```

Compositional documentation built on June 4, 2018, 5:04 p.m.