[R] Fitting function with if-clause (nls; e.g. heaviside)

Karl Knoblick karlknoblich at yahoo.de
Wed Jun 23 18:07:19 CEST 2004


Hallo!

I want to fit a function. The function is e.g.:
y = c+m1*x if x<0, c+m2*x if x>=0
where m1, m2 and c is a parameter and x, y are
variables of a data frame.

I think using  nls is appropriate. But I do not know,
how to type this formula in nls. Can anybody help?

(If there is a possibility to use a Heaviside-function
this would be enough.)

Karl


	

	
		
___________________________________________________________
Bestellen Sie Y! DSL und erhalten Sie die AVM "FritzBox SL" für 0.
Sie sparen 119 und bekommen 2 Monate Grundgebührbefreiung.




More information about the R-help mailing list