  Determining the precise rank is an important problem in many large-scale
applications with matrix data exploiting low-rank plus noise models. In this
paper, we suggest a universal approach to rank inference via residual
subsampling (RIRS) for testing and estimating rank in a wide family of models,
including many popularly used network models such as the degree corrected mixed
membership model as a special case. Our procedure constructs a test statistic
via subsampling entries of the residual matrix after extracting the spiked
components. The test statistic converges in distribution to the standard normal
under the null hypothesis, and diverges to infinity with asymptotic probability
one under the alternative hypothesis. The effectiveness of RIRS procedure is
justified theoretically, utilizing the asymptotic expansions of eigenvectors
and eigenvalues for large random matrices recently developed in Fan et al.
(2019a) and Fan et al. (2019b). The advantages of the newly suggested procedure
are demonstrated through several simulation and real data examples.
