Skip to content

Commit

Permalink
predab.resample: handled case where fitter doesn't include fail=FALSE
Browse files Browse the repository at this point in the history
  • Loading branch information
harrelfe committed Apr 8, 2018
1 parent 0ecc2f7 commit 6bcaee4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rms
Version: 5.1-3
Date: 2018-04-07
Date: 2018-04-08
Title: Regression Modeling Strategies
Author: Frank E Harrell Jr <f.harrell@vanderbilt.edu>
Maintainer: Frank E Harrell Jr <f.harrell@vanderbilt.edu>
Expand Down
5 changes: 3 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Changes in version 5.1-3 (2018-04-07)
Changes in version 5.1-3 (2018-04-08)
* lrm: when lrm.fit fails, don't stop altogether but print warning and return fit with fail=TRUE
* summary.orm: stopped negating linear predictor before computing hazard ratio for orm fit with log-log family (confidence limits never attempted to do this). See https://github.com/harrelfe/rms/issues/56
* Design: stop with error message any any design matrix column name is duplicated as with a predictor X1 with factor level 2 (forming name X12 in model.matrix) and a numeric predictor named X12. See https://github.com/harrelfe/rms/issues/55
* contrast.rms: for conf.type='simultaneous' shortened fit$coefficients to only have one intercept so will work with multcomp::glht. Thanks: Matthew Shun-Shin
* orm: changed label for Unique Y to Distinct Y
* survplotp: fixed bug in legends

* predab.resample: handled case where fitter doesn't include fail=FALSE

Changes in version 5.1-2 (2018-01-06)
* plot.pentrace: corrected lty for AIC if ! add, interchanged lty for AIC and BIC. Thanks: Ferenci Tamas
* removeFormulaTerms: added width.cutoff=500 to deparse call to avoid problems with long variable names. Thanks: Ferenci Tamas
Expand Down
3 changes: 2 additions & 1 deletion R/predab.resample.s
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ predab.resample <-
}
f <- tryCatch(fit(x[xtrain, , drop=FALSE], y[train, , drop=FALSE],
strata=stra[train], iter=i, tol=tol, ...), error=efit)
if(! length(f$fail)) f$fail <- FALSE
f$assign <- NULL #Some programs put a NULL assign (e.g. ols.val fit)
ni <- num.intercepts(f)

Expand Down Expand Up @@ -328,7 +329,7 @@ predab.resample <-
iter=i, tol=tol, xcol=xcol, ...), error=efit)
}

if(f$fail) fail <- TRUE
if(length(f$fail) && f$fail) fail <- TRUE
else coef <- f$coef
}
}
Expand Down
2 changes: 1 addition & 1 deletion inst/tests/examples.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ plot(nomogram(f, fun=plogis, funlabel='Prob(survive)'))
```

# Survival Plots for `r mu$code('pbc')` Dataset
Hover over the curves to see particular probability estimates and numbers at risk. click on legend components to show/hide components.
Hover over the curves to see particular probability estimates and numbers at risk. Click on legend components to show/hide components.
```{r pbc,fig.height=6,fig.width=7}
getHdata(pbc)
pbc <- upData(pbc,
Expand Down

0 comments on commit 6bcaee4

Please sign in to comment.