[R] smoothing binary data
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Dec 18 18:39:52 CET 2000
> Date: Tue, 12 Dec 2000 12:24:43 -0700
> From: "Bill Oliver" <wloliver at qwest.net>
>
> I'm trying to figure out a good way to smooth binary data. The ideal
> approach appears to be the "sm.logit" function in library "sm", but I
> haven't had success with it. Below, is some code illustrating what I've come
> up with so far, but I'm hoping there is a better approach. I'm using R 1.2
> (development) under Windows 98.
>
> -Bill
>
> library(MASS)
> data(birthwt)
> attach(birthwt)
>
> # This doesn't work for me, no matter what h equals
> # Maybe I'm doing something wrong
> library(sm)
> sm.logit(age,low,h=3)
R has changed since that port was done, so 0-weight cases are
ignored by glm.fit. There is a new version of sm, sm2, out for
S-PLUS and an R port is in final testing. In fact, the version
on CRAN tomorrow for rw1020 will be 2.0-1. I am still cross-checking
answers against S-PLUS 6.0, looking for anomalies like this.
In sm2, the function is sm.binomial.
--
Brian D. Ripley, ripley at 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-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list