I use the following model in my code:
model <- nls(y ~ SSlogis(x, Asym, xmid, scal),
data = data.frame(x, y))
There is a variable (V) with two levels: V1 and V2
- Model 1: Fitting Y to X with a sigmoid function when V=V1 --> asymptote1
- Model 2: Fitting Y to X with a sigmoid function when V=V2 --> asymptote2
Where asymptote1 and asymptote2 are not equal.
How can we show that the asymptotes are significantly different?
Is there any way to use V as an interaction term and get the interaction coefficient? I introduces V-Dummy in the model and it generates the following error:
Error in (attr(object, "initial"))(mCall = mCall, data = data, LHS = LHS) : too few distinct input values to fit a logistic model
If not, what do you suggest as an alternative approach?
Use
nlme::gnls:By default, this will return two parameters for
Asym: one for the baseline level (V1by default) and one for the difference in asymptotes between V1 and V2.summary()should include all of the usual inferential information (std error, p-value, etc.)From
?nlme::gnls: