Re: [R] Predicting from an nls model

2008-06-12 Thread Ranney, Steven
phone: (406) 994-6643 fax: (406) 994-7479 -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Thu 6/12/2008 7:00 AM To: Ranney, Steven Cc: r-help@r-project.org Subject: Re: [R] Predicting from an nls model To predict from Weight~alpha*Length^beta you need to

Re: [R] Predicting from an nls model

2008-06-12 Thread Prof Brian Ripley
To predict from Weight~alpha*Length^beta you need to specify Length, not Weight. It is most likely finding Length from your workspace. On Thu, 12 Jun 2008, Ranney, Steven wrote: I keep running up against the same error when I try to plot a line from a nls model. The data is fisheries length

Re: [R] Predicting from an nls model

2008-06-12 Thread Ben Bolker
Ranney, Steven montana.edu> writes: > plot(Weight~Length, data = wae, pch=19, > xlab="Length (mm)", ylab="Weight (g)", > xlim = c(150,1000), ylim = c(0, 10050)) > mod = seq(150, 1000)

[R] Predicting from an nls model

2008-06-12 Thread Ranney, Steven
I keep running up against the same error when I try to plot a line from a nls model. The data is fisheries length/weight data. Code follows: require(graphics) pow = nls(Weight~alpha*Length^beta, data=wae, start=list(alpha=0.001, beta=3.0), trace=TRUE) pre