Many of us measure our friendships by depth or quantity: Do I have enough close friends? Are they texting me back? Do they like me?

But having spent the last 15 years studying happiness, I’ve learned that when you evaluate your friendships based only on these metrics, you become lonelier.

Strong relationships are the key to happiness and good health, according to the Harvard Study of Adult Development. But “strong relationships” doesn’t mean one deep friendship with your bestie or a long list of friends who are indistinguishable from one another. It means having the right mix.

In my research, I’ve found that there are three essential types of friends you need in your life to be truly happy. Here’s how you can identify them, and why they are so important.

Your anchor friend is the one you’d call at 2 a.m. The one who sees all your flaws and loves you for them. This is a friendship where you feel safe to be vulnerable.