On 2024-08-27 9:43 a.m., Therneau, Terry M., Ph.D. via R-devel wrote:
You are right of course, Peter, but I can see where some will get
some symbols and functions are special operators, and others are simple
is the reason one needs I(events/time) to put a rate in as a
types 'offset' at the command line will see that there actually IS a
scenes.
Does anyone see a downside to Bill Dunlap's suggestion where the first
processing would be to "clean off" any survival:: modifiers? That is,
will break? After all, the code already has a lot of "if (....) "
user errors. I could view it as just saving me the time to deal with
error' emails. I would output the corrected version as the "call"
component.
I don't know if you have any data vectors that someone might use in a
fit, but conceivably
survdiff( Surv(time, status) ~ survival::datavector +
strata(inst), data=lung)
would mean something different than
survdiff( Surv(time, status) ~ datavector +
strata(inst), data=lung)
if a user had a vector named datavector.
Duncan Murdoch
Terry
On 8/27/24 03:38, peter dalgaard wrote:
In my view, that's just plain wrong, because strata() is not a function
but a special operator in a model formula. Wouldn't it also blow up on
stats::offset()?
Call:
lm(formula = y ~ x + offset(z))
Coefficients:
(Intercept) x
0.7350 0.0719
Call:
lm(formula = y ~ x + stats::offset(z))
Coefficients:
(Intercept) x stats::offset(z)
0.6457 0.1078 0.8521
Or, to be facetious:
Call:
lm(formula = y ~ base::"+"(x, z))
Coefficients:
(Intercept) base::"+"(x, z)
0.4516 0.4383
-pd
On 26 Aug 2024, at 16:42 , Therneau, Terry M., Ph.D. via R-devel<
r-devel at r-project.org> wrote:
The survival package makes significant use of the "specials" argument
calling model.frame; it is part of nearly every modeling function. The
strata argments simply have to be handled differently than other
side. Likewise for tt() and cluster(), though those are much less
I now get "bug reports" from the growing segment that believes one
packagename:: in front of every single instance. For instance
fit <- survival::survdiff( survival::Surv(time, status) ~
survival::strata(inst), data= survival::lung)
This fails to give the correct answer because it fools terms(formula,
"strata"). I've stood firm in my response of "that's your bug, not
to believe I am swimming uphill. One person responded that it was
qualify everything.
I don't see an easy way to fix survival, and even if I did it would be
of work. What are other's thoughts?
Terry
--
Terry M Therneau, PhD
Department of Quantitative Health Sciences
Mayo Clinic
therneau at mayo.edu
"TERR-ree THUR-noh"
[[alternative HTML version deleted]]