Displaying 20 results from an estimated 30000 matches similar to: "Potential bug in update.formula when updating offsets"
2019 Aug 06
0
Potential bug in update.formula when updating offsets
Terry, Martin
Would this happen to be related to the "indexing term objects" issue that has been bothering you?
-pd
> On 5 Aug 2019, at 21:44 , Paul Buerkner <paul.buerkner at gmail.com> wrote:
>
> Hi all,
>
> update.formula does not seem to correctly update (i.e. remove in my case)
> offset terms.
>
> Here is an example:
>
> update(~x +
2019 Apr 05
3
[EXTERNAL] Re: Re: all.equal failure
>>>>> Duncan Murdoch
>>>>> on Fri, 5 Apr 2019 11:12:48 -0400 writes:
> On 05/04/2019 10:46 a.m., Therneau, Terry M., Ph.D. wrote:
>>
>>
>> On 4/5/19 9:39 AM, Duncan Murdoch wrote:
>>> On 05/04/2019 10:19 a.m., Therneau, Terry M., Ph.D. wrote:
>>>> Duncan,
>>>> ?? I should have
2024 Aug 26
9
specials and ::
The survival package makes significant use of the "specials" argument of terms(), before
calling model.frame; it is part of nearly every modeling function. The reason is that
strata argments simply have to be handled differently than other things on the right hand
side. Likewise for tt() and cluster(), though those are much less frequent.
I now get "bug reports" from the
2020 Feb 24
6
specials issue, a heads up
I recently had a long argument wrt the survival package, namely that the following code
didn't do what they expected, and so they reported it as a bug
? survival::coxph( survival::Surv(time, status) ~ age + sex + survival::strata(inst),
data=lung)
a. The Google R style guide? recommends that one put :: everywhere
b. This breaks the recognition of cluster as a "special" in the
2018 Mar 08
4
Fwd: Re: [EXTERNAL] Re: backquotes and term.labels
Ben,
Looking at your notes, it appears that your solution is to write your own terms() function
for lme.? It is easy to verify that the "varnames.fixed" attribute is not returned by the
ususal terms function.
Then I also need to write my own terms function for the survival and coxme pacakges?
Because of the need to treat strata() terms in a special way I manipulate the
formula/terms in
2005 Oct 19
6
how to prevent "blinking" when adding an element with an effect
Hi,
I add a div to my document and use an effect to make it apear gracefully.
Unfortunatly, when adding the element, the element apears shortly, then
the effect (slideDown) lets it apear nicely - so the page flickers abit -
What is the best practice to avoid it?
Cheers,
Ron
2013 Apr 18
2
how to control the environment of a formula
Dear List
I have experienced that objects generated with one of my packages used
a lot of space when saved on disc (object.size did not show this!).
some debugging revealed that formula and call objects carried the full
environment of subroutines along, including even stuff not needed by the
formula or call. here is a sketch of the problem
,----
| test <- function(x){
| x <-
2015 Feb 01
4
Filtering which identities are forwarded by ssh-agent to a given host
Howdy,
I'm looking for a way to restrict which ssh keys are forwarded to a
given remote host because we have several ssh domains. That is, I have
two keys which I use throughout the day:
.ssh/network-a-2014-10-12
.ssh/network-b-2014-11-22
I need to forward my network A key to the ssh gateway host for Network A
to allow me to log into hosts on the other side of the gateway but I
2012 Jan 25
4
formula error inside function
I want use survfit() and basehaz() inside a function, but it doesn't work.
Could you take a look at this problem. Thanks for your help. Following is my
codes:
library(survival)
n <- 50 # total sample size
nclust <- 5 # number of clusters
clusters <- rep(1:nclust,each=n/nclust)
beta0 <- c(1,2)
set.seed(13)
#generate phmm data set
Z <- cbind(Z1=sample(0:1,n,replace=TRUE),
2002 May 27
2
Samba stuck!
Hi I wonder if you can help me.
I'm currently studying Networking as a college course and one of the challenges we have been set is to research, then put into practice the mapping of a linux server onto a Windows NT server.
I'll be honest with you, I'm very new to all this so I hope I explain this correctly.
I have successfully created my own smb.conf file, usernames, areas and a
2010 May 06
1
Understanding of survfit.formula output
Dear list,
I am not familiar with survival analysis and I would need your help to
understand a result I have obtained.
I have used the following command line to look at number of events and
probability of survival at the first 5 years:
> su = summary(survfit(Surv(a[, Date], a[, Event]) ~ strata(a[,Prediction]),
data = a), times=c(0,1,2,3,4,5))
I have studied two kind of events (disease-free
2014 Oct 03
2
How I() works in a formula
Dear all,
I'm updating a package regarding a new type of models, and I'm looking to
extend the formula interface with two functions (L() and R() ) for
construction of these models. I want to use as much of the formula
interface as possible, and hoped to do something similarly to I().
I know the I() function does nothing more than add the class "AsIs". I've
been browsing the
2019 Apr 05
6
all.equal failure
This arose in testing [.terms and has me confused.
data(esoph)?? # use a standard data set
t0x <- terms(model.frame( ~ tobgp, data=esoph))
t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
t1x <- (delete.response(t1))[-1]
> all.equal(t0x, t1x)
[1] TRUE
# the above is wrong, because they actually are not the same
> all.equal(attr(t0x, 'dataClasses'),
2018 May 01
4
issue with model.frame()
A user sent me an example where coxph fails, and the root of the failure is a case where
names(mf) is not equal to the term.labels attribute of the formula -- the latter has an
extraneous newline. Here is an example that does not use the survival library.
# first create a data set with many long names
n <- 30? # number of rows for the dummy data set
vname <- vector("character",
2018 Jan 30
2
variable names in lm formula ~.
dear all,
Is the following intentional? Am I missing anything in documentation?
d<-data.frame(y=rnorm(10,5,.5),exp=rnorm(10), age=rnorm(10))
formula(lm(exp(y)~exp+age, data=d))
#--> exp(y) ~ exp + age
formula(lm(exp(y)~., data=d))
#--> exp(y) ~ age
variable 'exp' (maybe indicating "experience") is not included in the
model. The same happens with 'log' (and
2012 Sep 03
1
Typo (?) in 'aggregate.formula'
In the code for 'aggregate.formula', there is
if (as.character(formula[[2L]] == "."))
I believe that it is meant to be
if (as.character(formula[[2L]]) == ".")
However,
if (as.character(formula[[2L]] == "."))
gives the expected result.
Tracing:
- formula[[2L]] == "."
is equivalent to
as.character(formula[[2L]]) == "."
From the help page for
2018 Jun 26
3
list of methods
I recently got a request to add head() and tail() methods for Surv objects, which is quite
reasonable, but not unlike other requests for logLik,? vcov, extractAIC, ...?? What they
all have in common is that are methods added since creation of the survival package, and
that I didn't know they existed.
To try and get ahead of the curve, is there a way to list names of all of the default
2011 May 05
1
Using $ accessor in GAM formula
This is not mission critical, but it's bothering me. I'm getting
inconsistent results when I use the $ accessor in the gam formula
*In window #1:*
> library(mgcv)
> dat=data.frame(x=1:100,y=sin(1:100/50)+rnorm(100,0,.05))
> str(dat)
> gam(dat$y~s(dat$x))
Error in eval(expr, envir, enclos) : object 'x' not found
>
*In window #2:*
> gm = gam(dat$cf~s(dat$s))
>
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of
this has me baffled, however.
Here is a simple test case, using a very stripped down version of survexp:
survexp.test <- function(formula, data,
weights, subset, na.action, rmap,
times, cohort=TRUE, conditional=FALSE,
ratetable=survexp.us, scale=1, npoints, se.fit,
2012 Feb 07
1
na.action in stats::factanal()
> Does factanal() force the user to use the formula interface if they
> wish to specify an na.action?
Short answer: yes.
Long answer: The handling of na.action is a built in part of the formula
processing functions, so it's automatic when dealing with a formula.
There are also downstream effects on predict() and resid() that are
worked out for the formula case, but aren't clear