Description Usage Arguments Value Examples

View source: R/MvBinaryEstim.R

This function performs the model selection and the parameter inference.

1 2 | ```
MvBinaryEstim(x, nbcores = 1, algorithm = "HAC", modelslist = NULL,
tol.EM = 0.01, nbinit.EM = 40, nbiter.MH = 50, nbchains.MH = 10)
``` |

`x` |
matrix of the binary observation. |

`nbcores` |
number of cores used for the model selection (only for Linux). Default is 1. |

`algorithm` |
algorithm used for the model selection ("HAC": deterministic algorithm based on the HAC of the variables, "MH": stochastic algorithm for optimizing the BIC criterion, "List": comparison of the models provided by the users). Default is "HAC". |

`modelslist` |
list of models provided by the user (only used when algorithm="List"). Default is NULL |

`tol.EM` |
stopping criterion for the EM algorithm. Default is 0.01 |

`nbinit.EM` |
number of random initializations for the EM algorithm. Default is 40. |

`nbiter.MH` |
number of successive iterations without finding a model having a better BIC criterion which involves the stopping of the Metropolis-Hastings algorithm (only used when algorithm="MH"). Default is 50. |

`nbchains.MH` |
number of radom initializations for the stochastic algorithm (only used when algorithm="MH"). Default is 10. |

Returns an instance of the [`MvBinaryResult`

] class.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
# Data loading
data(MvBinaryExample)
# Parameter estimation by the HAC-based algorithm on 2 cores
# where the EM algorithms are initialized 10 times
res.CAH <- MvBinaryEstim(MvBinaryExample, 2, nbinit.EM = 10)
# Parameter estimation for two competing models
res.CAH <- MvBinaryEstim(MvBinaryExample, algorithm="List",
modelslist=list(c(1,1,2,2,3,4), c(1,1,1,2,2,2)), nbinit.EM = 10)
# Summary of the estimated model
summary(res.CAH)
# Print the parameters of the estimated model
print(res.CAH)
``` |

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.