Re: [R] Ifs in formula

2011-03-14 Thread Otto Kässi
Dennis, this works perfectly! Thanks, Otto On Fri, Mar 11, 2011 at 2:08 PM, Dennis Murphy wrote: > Hi: > > Perhaps something like > > f1(x, y) * I(z > 0) + f2(x, y) * I(z <= 0)  ?? > > HTH, > Dennis > > On Fri, Mar 11, 2011 at 3:10 AM, Otto Kässi wrote: >> >> Dear r-helpers, >> >> This migh

Re: [R] Ifs in formula

2011-03-11 Thread Dennis Murphy
Hi: Perhaps something like f1(x, y) * I(z > 0) + f2(x, y) * I(z <= 0) ?? HTH, Dennis On Fri, Mar 11, 2011 at 3:10 AM, Otto Kässi wrote: > Dear r-helpers, > > This might be an elementary question, but I have a hard time getting > my head around it, so all help is much appreciated. > > I a

[R] Ifs in formula

2011-03-11 Thread Otto Kässi
Dear r-helpers, This might be an elementary question, but I have a hard time getting my head around it, so all help is much appreciated. I am working on a nonlinear regression model of the form if z > 0 y = f1(x,y), else y = f2(x,t) . In other words, the functional form of f(.) changes accordin