[R-sig-eco] rank lognormal

Mario José mariognu-eco at yahoo.com.br
Fri May 25 15:11:47 CEST 2012


Hi all,

I trying develop a code to implement a recommendation of Wilson et al (1991). In they text formula:

"...

LnA' = fitted mean ln abundance; sigma = fitted standar deviation of ln abundance.

In ranked-abundance terms:

lnAi = lnA' + sigma * fi^-1 * (S-i+0.5)/S

Where
 S = number of species; Ai = abundance of ith out of S species; fi^-1 = 
inverse cumulative distribution function of a norma distribution, i.e. 
the ln abundance at which the area under the normal curve is the value 
indicated.
..."

I developed this code:

rank.lognormal<-function(x){ 
  S <- length(x);
  xlog <- log(x);
  p <- ppoints(xlog);
  mulog <- mean(xlog);
  sdlog <- sd(xlog);
  fi <- function(y){ qnorm(y, mulog, sdlog)  };
  sapply(1:S, FUN=function(i){ exp(1) ^ (mulog + sdlog * fi(p[i]) * (S-i+0.5)/S) });
}

bci<-c(25, 24, 22, 21, 18, 17, 15, 14, 14, 13, 13, 12, 12, 11, 11, 
       10, 9, 8, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 
       3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
       2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
       1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);

sum(rank.lognormal(bci))
plot(log(rank.lognormal(bci)))

But the sum of fitted rank don't match with the sum of rank abundance. The curve don't like lognormal too.

I know rad.lognormal of vegan package, but I'd like follow Wilson recommendation and understand how this procedure works.

Thank you.

Best,

Mario

Wilson et al 1991 Methods for fitting dominance/diversity curves - Journal of Vegetation Science.
http://onlinelibrary.wiley.com/doi/10.2307/3235896/abstract

...................................................

Master student in Ecology

Institute of Biology, Dept. Plant Biology, Ecology Lab.
State University of Campinas - UNICAMP
Campinas, São Paulo, Brazil




More information about the R-sig-ecology mailing list