LRBIC | R Documentation |

selecting number of communities by asymptotic likelihood ratio based the methdo of Wang and Bickel 2015

```
LRBIC(A, Kmax, lambda = NULL, model = "both")
```

`A` |
adjacency matrix |

`Kmax` |
the largest possible number of communities to check |

`lambda` |
a tuning parameter. By default, will use the number recommended in the paper. |

`model` |
selecting K under which model. If set to be "SBM", the calculation will be done under SBM. If set to be "DCSBM", the calculation will be done under DCSBM. The default value is "both" so will give two selections under SBM and DCSBM respectively. |

Note that the method cannot distinguish SBM and DCSBM, though different calculation is done under the two models. So it is not valid to compare across models. The theoretical analysis of the method is done under maximum likelhood and variational EM. But as suggested in the paper, we use spectral clustering for community detection before fitting maximum likelhood.

a list of

`SBM.K ` |
estimated number of communities under SBM |

`DCSBM.K ` |
estimated number of communities under DCSBM |

`SBM.BIC ` |
the BIC values for the K sequence under SBM |

`DCSBM.BIC ` |
the BIC values for the K sequence under DCSBM |

Tianxi Li, Elizaveta Levina, Ji Zhu

Maintainer: Tianxi Li tianxili@virginia.edu

Wang, Y. R. & Bickel, P. J. Likelihood-based model selection for stochastic block models The Annals of Statistics, Institute of Mathematical Statistics, 2017, 45, 500-528

`BHMC.estimate`

, `ECV.block`

, `NCV.select`

```
dt <- BlockModel.Gen(30,300,K=3,beta=0.2,rho=0.9,simple=FALSE,power=TRUE)
A <- dt$A
### test LRBIC
lrbic <- LRBIC(A,6,model="both")
lrbic$SBM.K
lrbic$DCSBM.K
```

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.