Manually Credit Referrals?

I have users who have sent referral links to other users that have signed up, but for one reason or another the referrals weren't credited to the original affiliate. How can I manually credit referrals after the fact?