Using just nls() you can set the complete model and the alternative model in this way
da <- expand.grid(x=20:50, trat=c(0.9,1)) da$y <- 10*da$trat*da$x/(12+da$x)+rnorm(da$x,0,0.1) plot(y~x, da) da$trat <- as.factor(da$trat) n0 <- nls(y~A[trat]*x/(B[trat]+x), data=da, start=list(A=c(9,10), B=c(12,12))) n1 <- nls(y~A*x/(B[trat]+x), data=da, start=list(A=c(9.5), B=c(12,12))) anova(n1,n0) Look at gnls() function in the nlme package for a easier way to specify the model. Walmes Zeviani. ----- ..ooo0 ................................................................................................... ..(....)... 0ooo... Walmes Zeviani ...\..(.....(.....)... Master in Statistics and Agricultural Experimentation ....\_)..... )../.... walmeszevi...@hotmail.com, Lavras - MG, Brasil ............ (_/............................................................................................ -- View this message in context: http://n4.nabble.com/testing-parallelism-of-does-response-curves-using-nls-tp1591356p1596256.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.