looking at the documentation, it seems `prestondistr' returns you the coefficients of the distribution, but not a random sample from that distribution.
colony size is discrete, yes? so really you want to sample numbers 1, 2, ...., MAX you could do that with something like: trunc <- 20 # max number probs <- plnorm(1:(trunc+1),meanlog=0,sdlog=1) # example parameters probs <- diff(probs) # the unstandardized prob of each colony size samp <- sample(trunc,100,rep=TRUE,prob=probs) # `sample' will internally standardize your probabilities ######## here i arbitrarily sampled 100 colonies from this distribution, you'd put your "n" here, and of course change the mean and sd of the log-normal as well. also, i did what some might consider a strange binning--i said anyting [0,1] = 1, (1,2] = 2, ... etc. maybe you'd prefer [0.5,1.5) = 1, etc. that can all be changed in how you calculate the probs object above. good luck, hope that helps! andy On Thu, Nov 4, 2010 at 9:38 AM, Nicolas PERU <nicolas.p...@univ-lyon1.fr>wrote: > Hi Peter, > > It seems that prestondistr function in vegan package can do what you need > > Hope this help > > Nicolas > > > Le Thu, 04 Nov 2010 08:30:15 +0100, Peter Houk <peterh...@gmail.com> a > écrit: > > > Greetings - >> >> I'm hoping to compare contemporary coral colony size distributions with >> historical datasets reported in technical reports in the late 1980's. The >> reports have only summary statistics (n-number of colonies observed, >> x-mean >> size, and sd-standard deviation). Assuming the distribution represents >> the >> truncated log-normal (typically observed for coral colony size data), I'm >> trying to generate a population distribution given the known summary >> statistics. Generating a simple vector dataset using the rlnorm function >> in >> R is easy, however I am requesting insight to apply the truncated model, >> encompassing all non-zero values and a maximum value of my choosing that >> applies to the dataset. >> >> I'd appreciate any insight on the topic, >> >> Peter >> >> >> ********************************************* >> Peter Houk, PhD >> Marine Biologist >> Pacific Marine Resources Institute >> www.pacmares.com >> www.micronesianfishing.com >> > > > -- > Nicolas PERU, PhD > 33-(0)4 72 43 28 94 > 06-88-15-23-10 > Laboratoire d'Ecologie des Hydrosystèmes Fluviaux > Université Claude Bernard - Lyon 1 > 43 Bld du 11 novembre 1918 > Rdc Bât Forel > 69622 VILLEURBANNE cedex FRANCE >