An analytical and numerical study of fiber microbuckling