%% Delayed retirement credit benefit factor
function f = benefit_factor_delayed(age, fra)
    if age < fra
        f = -1; % -1 percent increase for delayed retirement
    elseif age <= 70
        years_delayed = age - fra;
        f = 0.08 * years_delayed;
    else
        f = 0.24; % Cap at 24 percent increase after age 70
    end