Terry,
  There are lots of different functions that meet your criteria. Below is 
an easy one that might work.

f <- function(x, scale, power) ifelse(x <=0, 0, 1 -exp(-(x/scale)^power))

  Scale and power are scalars and must be strictly greater than 0. Plot 
some examples to see how it fits your data and your expectations.
Dave


From:
"Beutel, Terry S" <Terry.Beutel@deedi.qld.gov.au>
To:
"r-sig-ecology@r-project.org" <r-sig-ecology@r-project.org>
Date:
04/12/2012 11:17 PM
Subject:
[R-sig-eco] Which function would fit these data (Version 2)
Sent by:
r-sig-ecology-bounces@r-project.org



Hi list members

Sending this again as symbols in the previous version did not translate.

Apologies if this is not too specifically R related, but I am looking fit 
a model to some simulated data. X is distance to sample point, y is binary 
outcome (present/absent). I was hoping someone can suggest a (presumably) 
non linear function that might meet the following criteria

A.   0 <= y <=1 (actual responses are binary)
B.   xmax = infinity
C.   xmin <= 0
D.   Where x = 0 then y >= 0
E.   Where x equals Infinity then y equals 1
F.   As x approaches Infinity from xmin, the slope of the function 
declines monotonically toward 0.

Thanks in advance for any suggestions

Dr Terry Beutel
Agri-Science Queensland





********************************DISCLAIMER**************...{{dropped:12}}

