Hi to all the people, I'm having a trouble when trying to plot a quadratic function. I have the code:
regression<-nls(Survival~beta1+beta2*PI+beta3*PI^2, data=cubs, start=list(beta1 = 1, beta2 = 1, beta3 = 1)) plot(Survival~PI,data=cubs, ylab="Survival", xlab="PI") lines(cubs$PI, fitted(regression)) but the plotted line is not the quadratic one, rather it appears a number of lines whose meaning I do not know. It seems to be an stupid trouble, but I tried a number of alternatives and nothing works. Regards, pablo -- View this message in context: http://r.789695.n4.nabble.com/a-question-on-plotting-nonlinear-regression-tp3690828p3690828.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.