Estimates the density of each covariates with gaussian mixture models and then gives the associated BIC.

1 2 3 |

`X` |
the dataset (matrix) |

`nbclustmax` |
max number of clusters in the gaussian mixtures |

`nbclustmin` |
min number of clusters in the gaussian mixtures |

`verbose` |
verbose or not |

`detailed` |
boolean to give the details of the mixtures found |

`max` |
boolean. Use an heuristic to shrink nbclustmax according to the number of individuals in the dataset |

`package` |
package to use (Rmixmod,mclust) |

`nbini` |
number of initial points for Rmixmod |

`matshape` |
boolean to give the detail in matricial shape |

`...` |
additional parameters |

a list that contains:

`BIC_vect` |
vector of the BIC (one per variable) |

`BIC` |
global value of the BIC ( |

`nbclust` |
vector of the numbers of components |

`details` |
list of matrices that describe each Gaussian Mixture (proportions, means and variances) |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
## Not run:
rm(list=ls())#clean the workspace
require(CorReg)
#dataset generation
base=mixture_generator(n=150,p=10,valid=0,ratio=0.4,tp1=1,tp2=1,tp3=1,positive=0.5,
R2Y=0.8,R2=0.9,scale=TRUE,max_compl=3,lambda=1)
X_appr=base$X_appr #learning sample
density=density_estimation(X = X_appr, detailed = TRUE)#estimation of the marginal densities
density$BIC_vect #vector of the BIC (one per variable)
density$BIC #global value of the BIC (sum of the BICs)
density$nbclust #vector of the numbers of components.
density$details #matrices that describe each Gaussian Mixture (proportions, means and variances)
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.