[R] prob in sample function

From: Antonio Olinto <aolinto_r_at_bignet.com.br>
Date: Sat 17 Jun 2006 - 09:48:13 EST


Hi,

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
Brazil



WebMail Bignet - O seu provedor do litoral www.bignet.com.br

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jun 17 09:56:28 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 17 Jun 2006 - 14:10:59 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.