Skip to content
Prev 172010 / 398503 Next

formula formatting/grammar for regression

This is just (or should be) just a simple example of what I would like to
extend to further regression - which is why I was looking for a resource on
the grammar.  

If I try:
lm(ypts ~ exp(xpts)), I only get an intercept and one coefficient.  And for
the coefficient, I am not sure where that should go?  (ie is that A or r in
the formula y=A*exp(r*x) ) 

Also, when I tried to use nls, I get an error:  
nls(ypts ~ exp(xpts))
Error in getInitial.default(func, data, mCall = as.list(match.call(func,  : 
  no 'getInitial' method found for "function" objects

If someone could please point out what I am doing wrong, or point me to a
good resource on this, I would greatly appreciate it.  

Thanks!
Dieter Menne wrote: