Noncollapsibility in studies based on nonrepresentative samples