Statistical inference for parametric and semiparametric models