Panel threshold regressions with latent group structures