Skip to content
Prev 199798 / 398502 Next

HEEELP!!!!

Ana Mar?a Prieto wrote:
Well, the line:

  model01 <- (YIELD~FERTIL)

Creates an object of class "formula", which is not a model.  A formula only
expresses a relationship between variables, a model consists of a formula
that has been fit to a data set.  The anova() function has no meaning for
formula objects since no data has been fit.  If you wanted a linear model,
use the lm() function to create it:

  model01 <- lm( YIELD ~ FERTIL )

Non-linear functions may be fit using nls() and R has plenty of other
fitting schemes if you should require them.
Ana Mar?a Prieto wrote:
On my keyboard the '~' character is accessed by pressing SHIFT-backtick,
where backtick is the key above the "Tab" key and to the left of the "1"
key.  You may have a different keyboard.
Ana Mar?a Prieto wrote:
-----
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University