Factors in an nls model

#1
Hello,

I have some nls model fitted with a four parameter logistic curve.

model<-nls(V1 ~ SSfpl(V2, a, b, c, e))

I want to test the effect of a factor on this fit, something like:

model<-nls(V1 ~ SSfpl(V2+factor, a, b, c, e))

or

model<-nls(V1 ~ SSfpl(V2, a, b, c, e)+factor)

However, it doesn't work.
Do you know if there is anyway to perform something similar to an ANCOVA but with a non linear regression???
I could do that using GAM but i'm particularly interested in the logistic function.
Thank you in advance for the suggestions

Luca