When you're invited to an event or party, do you usually still give a gift even if you don't attend?

I find the gift giving is more situational for me. If it's someone who usually doesn't give a gift when they don't attend, I don't bother myself. But, when it's something like a shower we usually give a gift regardless.