A method for resolution correction and shape factor analysis of beta spectra