Skip to content

Commit

Permalink
Issue #911
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Sep 25, 2023
1 parent fffdefe commit b962b99
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: marginaleffects
Title: Predictions, Comparisons, Slopes, Marginal Means, and Hypothesis Tests
Version: 0.15.1.001
Version: 0.15.1.9002
Authors@R:
c(person(given = "Vincent",
family = "Arel-Bundock",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## dev

* Add support for `hypotheses()` to `inferences()`. This changes `FUN` argument name in `hypotheses` to `FUN` to not conflict with `inferences`. Thanks to @Tristan-Siegfried for code contribution #908.
* Support `survival::survreg()`. Thanks to Carlisle Rainey for Report #911.

## 0.15.1

Expand Down
1 change: 1 addition & 0 deletions R/sanity_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ sanity_model_supported_class <- function(model) {
"speedglm",
"speedlm",
"stanreg",
"survreg",
"svyolr",
c("tobit", "survreg"),
"tobit1",
Expand Down
3 changes: 3 additions & 0 deletions R/type_dictionary.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ speedglm,response
speedglm,link
stanreg,response
stanreg,link
survreg,response
survreg,link
survreg,quantile
svyglm,response
svyglm,link
svyolr,probs
Expand Down
1 change: 1 addition & 0 deletions data-raw/supported_models.csv
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ survey,svyglm,TRUE,TRUE,,,TRUE,TRUE,TRUE,TRUE
survey,svyolr,TRUE,TRUE,,,,,,
survival,clogit,TRUE,TRUE,,,,,,
survival,coxph,TRUE,TRUE,TRUE,TRUE,U,U,TRUE,TRUE
survival,survreg,TRUE,TRUE,,,,,,
tobit1,tobit1,TRUE,TRUE,,,TRUE,TRUE,U,U
truncreg,truncreg,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,U,U
7 changes: 7 additions & 0 deletions inst/tinytest/test-pkg-survival.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ requiet("survival")
requiet("emmeans")
requiet("broom")


# Issue #911: survreg support
fit <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist='weibull', scale=1)
s <- avg_slopes(fit)
expect_inherits(s, "slopes")


# clogit
N <- 10000
ng <- 5000
Expand Down

0 comments on commit b962b99

Please sign in to comment.