Determination of higher-twist effects from nucleon polarized structure functions in the resonance region