-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi Mark,
I hope all is well!
Just a quick question / bug report: I think the default fitting function stpm2 does not play nicely with the with() function:
library(rstpm2)
#> Loading required package: survival
#> Loading required package: splines
#>
#> Attaching package: 'rstpm2'
#> The following object is masked from 'package:survival':
#>
#> colon
data("brcancer")
with(brcancer, stpm2(Surv(rectime, censrec == 1) ~ hormon + x1 + x2 + x3 + x4 + x5 + x6 + x7, df = 3))
#> Error in stpm2(Surv(rectime, censrec == 1) ~ hormon + x1 + x2 + x3 + x4 + : argument "data" is missing, with no defaultWhat I was expecting was for something like this to work:
with(brcancer, glm(censrec == 1 ~ hormon, family = binomial()))
#>
#> Call: glm(formula = censrec == 1 ~ hormon, family = binomial())
#>
#> Coefficients:
#> (Intercept) hormon
#> -0.1366 -0.3440
#>
#> Degrees of Freedom: 685 Total (i.e. Null); 684 Residual
#> Null Deviance: 939.7
#> Residual Deviance: 935.1 AIC: 939.1Any ideas?
Thanks,
Alessandro
Metadata
Metadata
Assignees
Labels
No labels