[R] prob in sample function

Antonio Olinto aolinto_r at bignet.com.br
Sat Jun 17 01:48:13 CEST 2006


I have a data set with values (L) varying from 1 to 700, with repeated numbers,
and I want to sample them according to the probabilities given by a logistic
curve P=1/(1+e(-r*(L-Lc))) where r gives "S" the inclination
and Lc the "rotation point". P ranges from 0 to 1.

As I could see I cannot use this P as prob in sample function. I'd need the
probabilities as given by dnorm function, isn't it?

Well, how can I “translate” the P given in the logistic function?

Thanks for any help. Best regards.

Antonio Olinto
Sao Paulo Fisheries Institute
WebMail Bignet - O seu provedor do litoral

More information about the R-help mailing list