Estimation And Inference Of Random Effect Models With Applications To Population Genetics And Proteomics