[Rd] Re: PR#886: Error (?) in documentation of 'swiss'

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Sat, 21 Apr 2001 14:07:47 +0200 (MET DST)


>From k.j.mcconway@open.ac.uk  Wed Mar 28 16:46:49 2001

Hardly crucial, but I've come upon a potential error in the documentation
of the 'swiss' datafram in the R base package. The description accurately
matches what is said in the Mosteller and Tukey source quoted, but
according to the data archived at Princeton (links from
http://opr.princeton.edu/archive/eufert/switz.html), the variable that
Mosteller and Tukey report as infant mortality is actually the proportion
of 'draftees' with education beyond primary school. Infant mortality is on
the archived file, but the values are quite a lot different. Of course,
it's possible that Mosteller and Tukey were right and the people who did
the archiving at Princenton, later, got it wrong.

It seems it is you that got it wrong! In the file sw1888.dat in their
switz.zip, the variable

 36 USCHOOL        321-330       3  Prop. draftees with > primary educ.

corresponds to `Education' and

 22 INFMORT        181-190       3  Infant Mortality Rate

corresponds to `Infant Mortality'.

Apart from guessing factors of 10, the data correspond to the 47 districts
with > 50% French speakers to the accuracy they are given.

If you still disagree, can you please explain how you did this?  I used

> read.fwf("sw1888.dat", widths=c(rep(10, 45),1,2,2,2,8,1,15)) ->sw0
> ind <- sw0[, 27] > 50000
> sw <- sw0[ind, ]
> sw[, c(5, 12, 34, 36, 9, 22)-3]

the first column in the file being variable 4.


Thanks for the source: as from 1.3.0 I have added the district names.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._