Hi all, I've got a project where I have to calculate weight-for-age Z-scores, preferably using the WHO standards. WHO have been very nice to publish macros for doing this in both STATA,SPSS, SAS and Splus formats (see http://www.who.int/childgrowth/software/en/), but for some reason have chosen not to use the free R alternative to Splus. In the Splus zipfile there are nine datafiles with a "sdd" file ending, presumably data dumps from Splus 7.x. I've tried using restore.data from the foreign package, but that does not work (probably because the data is saved in the newer format). I'm considering trying to read in spss files and massaging them to fit to the format that the splus macro is expecting, but I'd prefer to be able to use the Splus files directly. Has anyone on the list tried using the WHO anthro macros with R, and can tell me how they did it? Alternatively, could some, very kind, person try and open the Splus files, and save them in a R-readable format? I would be extremely grateful for any help on this. Best regards, Gustaf Rydevik -- Gustaf Rydevik, M.Sci. tel: +46(0)703 051 451 address:Essingetorget 40,112 66 Stockholm, SE skype:gustaf_rydevik
Gustaf, I would be advisable to first check that such z scores are valid statistically (I have my doubts). They make a number of assumptions, chief among them being that un-normalized weight is not a proper physiologic summary. It is almost always the case that joint modeling of age and weight (e.g., ANCOVA) works better. Frank Gustaf Rydevik wrote:> Hi all, > > I've got a project where I have to calculate weight-for-age Z-scores, > preferably using the WHO standards. > > WHO have been very nice to publish macros for doing this in both > STATA,SPSS, SAS and Splus formats > (see http://www.who.int/childgrowth/software/en/), but for some reason > have chosen not to use the free R alternative to Splus. > > In the Splus zipfile there are nine datafiles with a "sdd" file > ending, presumably data dumps from Splus 7.x. I've tried using > restore.data from the foreign package, but that does not work > (probably because the data is saved in the newer format). > > I'm considering trying to read in spss files and massaging them to fit > to the format that the splus macro is expecting, but I'd prefer to be > able to use the Splus files directly. > > Has anyone on the list tried using the WHO anthro macros with R, and > can tell me how they did it? > Alternatively, could some, very kind, person try and open the Splus > files, and save them in a R-readable format? > I would be extremely grateful for any help on this. > > Best regards, > > Gustaf Rydevik > >-- Frank E Harrell Jr Professor and Chairman School of Medicine Department of Biostatistics Vanderbilt University
On Mon, 28 Dec 2009, Gustaf Rydevik wrote:> Hi all, > > I've got a project where I have to calculate weight-for-age Z-scores, > preferably using the WHO standards. > > WHO have been very nice to publish macros for doing this in both > STATA,SPSS, SAS and Splus formats > (see http://www.who.int/childgrowth/software/en/), but for some reason > have chosen not to use the free R alternative to Splus. ><snip>> I'm considering trying to read in spss files and massaging them to fit > to the format that the splus macro is expecting, but I'd prefer to be > able to use the Splus files directly. > > Has anyone on the list tried using the WHO anthro macros with R, and > can tell me how they did it? > Alternatively, could some, very kind, person try and open the Splus > files, and save them in a R-readable format?It looks as though only very minimal editing of the S-PLUS code would be needed to make it work in R, and read.spss or read.dta would be able to read in the SPSS or Stata versions of the reference data. Making an R package would be pretty straightforward. However, the license says "The User is not permitted to modify, adapt, translate, reverse engineer, decompile, disassemble, or otherwise attempt to discover the source code of the software, without prior permission from WHO. " I'm assuming that simply echoing the .ssc file to the screen doesn't violate this, but anything that would make the functions usable probably would. -thomas Thomas Lumley Assoc. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle
Seemingly Similar Threads
- Fwd: WHO Anthro growth curve macros and R
- Fwd: WHO Anthro growth curve macros and R&In-Reply-To=<CAAOCNNZawGtKkWpgFMYADSyxWGTeWEDxqVVHv7=Azo=1G+H9gg@mail.gmail.com>
- New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())
- New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())
- download.file not working