R-beta: questions and comments

Fritz Scholz scholz at redwood.rt.cs.boeing.com
Wed Jan 21 00:44:30 CET 1998


Let me first tell you that you and your cohorts are
doing a great service to the statistical community
with R. I have been working with Rseptbeta under
Win95 and I am very impressed with its capabilities.
 
I thought I give you some feedback gained from
my limited playing with R.
 
 
Fritz Scholz
 
fritz.scholz at boeing.com
 
=============================================================
When loading the Survival package, which is
not yet supposed to work, it seems that glm
does not work either. Without Survival glm
seems to work. I am not sure whether this
gives a clue concerning the problems with Survival.
 
One interesting application is to Weibull data
which is only observed at single inspection
points T_1, ..., T_n, not all the same and
contained in insp.times. The only thing that is
known about the actual lifetimes X_1, ..., X_n
is whether X_i < T_i or not, giving me the 0,1
vector status. One can then get the mle's of the
Weibull scale (alpha) and shape (beta) parameters
by using
 
dat <- data.frame(status=status,insp.times=insp.times)
out <- glm(status ~ log(insp.times),
family=binomial(link=cloglog),data=dat).
 
Then alpha <- exp(-out$coef[1]/out$coef[2]) and
beta <- out$coef[2] will do it.
 
I don't know whether this example usage is known
in this form?
 
 
=============================================================
The fix function seems to work on an existing
object although I did not see it documented.
However, a few times after repeated use of
fix I was unable to write to a file on trying
to exit. The only way out was to stop R without
the ability to save the workspace. Can't quite
make this reproducible yet, but it has happened
a few times.
 
=============================================================
In glm the offset does not seem to work.
When I generate data like
 
n <- 100
beta <- 2
x <- 5*(0:n)/n
y <- x+beta*x+rnorm(n)
dat <- data.frame(y=y,x=x)
out1_glm.fit(x,y,family=gaussian(),offset=x,intercept=FALSE)
out2_glm(y~x-1,family=gaussian,offset=x,data=dat)
out_c(out1$coef,out2$coef)
 
then out contains two numbers differing by 1, indicating
that glm.fit seems to work and glm does not
honor the offset.
 
I was trying to implement the Weibull estimation routines
as described in Chapter 13 of Gen. Lin. Models 2nd ed
by McCullagh and Nelder, and that's when I ran into
trouble with offset.
 
=============================================================
 
Data entry
 
It seems that xx <- de() works, whereas xx <- data.entry()
does not, gives me xx=NULL on exit.
 
=============================================================
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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