1 John 3:24
And he that keepeth his commandments dwelleth in him, and he in him. And hereby we know that he abideth in us, by the Spirit which he hath given us.
When we keep the commandments of God, it is proof that He abides in us. We can know that He abides in us by the Spirit which He has given us. If we do not have the Spirit, we do not have an abiding relationship with God.