A child's temperament could easily affect both the independent and dependent variables in this situation. The base personality characteristics that allow secure attachments to be formed easily could also offer benefits later in life, allowing a person to make more friends and be more successful.
The personality characteristics that cause insecure attachments could have the opposite effect.