[R] offset in survreg

Ming-Wen An man at jhsph.edu
Wed Oct 3 16:44:48 CEST 2007


I have a question regarding the use of an offset term with survreg(),
in the Survival library.  In particular, I am trying to figure out on
what scale the offset term should be.

Here's a simple example with no censoring and no coefficients:

y = rlnorm(1000, meanlog = 10, sdlog = 2)
delta = rep(1, 1000)
int = rep(1, 1000)

survreg(Surv(y,delta)~offset(10*int), dist = "lognormal")

survreg(formula = Surv(y, delta) ~ offset(10 * int), dist = "lognormal")


Scale= 1.985558

Loglik(model)= -11973.1   Loglik(intercept only)= -11973.1
n= 1000

I would have expected the intercept estimate to be 10, since I
specified offset = 10, unless the offset term should be specified on
another scale.

Thank you,

More information about the R-help mailing list