Sonar's FX are non destructive and after your audio passes the sound card's converters, its too late to avoid clipping beyond that point. If you feel the need to compress the audio before it hits sonar, you need hardware, not software FX.
Note, if you do use hardware effects, you will not be able to change the settings, like you would if you use non destructive Fx, like the ones in sonar. Non destructive is the way to go.
Normally, people would use a compressor during recording vocals to limit some loud part and quiet part can be heard as well.
That is not the norm anymore. We are not using analog and 16bit recording is fazed out,. we record in 24 bit and that gives you 256 times more than resolution than 16bit recording. You do not need to record hot in 24 bit.
In 24bit recording, there is no need to record hot. So you do not need to use a compressor or limiter to avoid clipping. There is no need for it!! Anywhere form -24dB to -8dB is great for 24bit recording and this allows for peaks not to clip the converters in your sound card..
Cj