[Rd] buglet?? in nlme:::corRatio documentation

From: Ben Bolker <bolker_at_zoo.ufl.edu>
Date: Mon, 03 Sep 2007 11:15:14 -0400

  [hoping to redeem myself for my last spurious bug report]

 From ?corRatio:

   Letting d denote the range and n denote the nugget effect, the

     correlation between two observations a distance r apart is
     (r/d)^2/(1+(r/d)^2) when no nugget effect is present and
     (1-n)*(r/d)^2/(1+(r/d)^2) when a nugget effect is  assumed.

  This disagrees with the C code (corStruct.c)

/* Rational class */

static double
ratio_corr(double val)

    double val2 = val * val;

  and with common sense (correlation structures should start from 1 and reach zero for large distances; the structure listed in the documentation starts at 0 and goes to 1 [or (1-n)] for large distances) -- if you don't want to think about it, use R instead:  


  What's odd, and makes me really nervous, is that the expression found in the documentation is also that found in Pinheiro and Bates 2000 (Table 5.2, p. 232). It's not listed in the errata for the first printing http://cm.bell-labs.com/cm/ms/departments/sia/project/nlme/MEMSS/Errata ; I have the second printing.

  (I haven't dug out my geostats books to check this, but found at least one paper that cites the "correct" (1/(1+(d/r)^2) formula -- see below


    Ben Bolker

  author = {Ekstr{\o}m, Claus T. and Bak, S{\o}ren and Rudemo, Mats},   title = {Pixel-level Signal Modelling with Spatial Correlation for Two-Colour

  journal = {Statistical Applications in Genetics and Molecular Biology},   year = {2005},
  volume = {4},
  number = {1}
  timestamp = {2007.09.03},
  url = {http://www.bepress.com/sagmb/vol4/iss1/art6}

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 03 Sep 2007 - 16:58:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 03 Sep 2007 - 18:40:40 GMT.

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