diff -Nru r-cran-rms-5.1-1/debian/changelog r-cran-rms-5.1-2/debian/changelog --- r-cran-rms-5.1-1/debian/changelog 2018-01-29 02:50:24.000000000 +0000 +++ r-cran-rms-5.1-2/debian/changelog 2018-01-29 02:50:25.000000000 +0000 @@ -1,14 +1,19 @@ -r-cran-rms (5.1-1-1build1) artful; urgency=medium +r-cran-rms (5.1-2-1) unstable; urgency=medium - * No-change rebuild to pick up r-api-3.4 + * New upstream release + + * debian/control: Set Standards-Version: to current version + * debian/control: Set Build-Depends: to current R version + * debian/compat: Set level to 9 - -- Graham Inggs Thu, 28 Sep 2017 15:32:33 +0000 + -- Dirk Eddelbuettel Mon, 08 Jan 2018 21:29:26 -0600 r-cran-rms (5.1-1-1) unstable; urgency=medium * New upstream release * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version -- Dirk Eddelbuettel Fri, 05 May 2017 20:45:45 -0500 diff -Nru r-cran-rms-5.1-1/debian/compat r-cran-rms-5.1-2/debian/compat --- r-cran-rms-5.1-1/debian/compat 2018-01-29 02:50:24.000000000 +0000 +++ r-cran-rms-5.1-2/debian/compat 2018-01-29 02:50:25.000000000 +0000 @@ -1 +1 @@ -7 +9 diff -Nru r-cran-rms-5.1-1/debian/control r-cran-rms-5.1-2/debian/control --- r-cran-rms-5.1-1/debian/control 2018-01-29 02:50:24.000000000 +0000 +++ r-cran-rms-5.1-2/debian/control 2018-01-29 02:50:25.000000000 +0000 @@ -2,8 +2,8 @@ Section: gnu-r Priority: optional Maintainer: Dirk Eddelbuettel -Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.4.0), cdbs, r-cran-hmisc (>= 4.0-0), r-cran-survival (>= 2.40), r-cran-sparsem, r-cran-quantreg, r-cran-nlme, r-cran-rpart, r-cran-foreign, r-cran-nnet, r-cran-polspline, r-cran-multcomp, r-cran-ggplot2, r-cran-htmltable, r-cran-htmltools -Standards-Version: 3.9.8 +Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.4.3), cdbs, r-cran-hmisc (>= 4.0-0), r-cran-survival (>= 2.40), r-cran-sparsem, r-cran-quantreg, r-cran-nlme, r-cran-rpart, r-cran-foreign, r-cran-nnet, r-cran-polspline, r-cran-multcomp, r-cran-ggplot2, r-cran-htmltable, r-cran-htmltools +Standards-Version: 4.1.3 Homepage: http://biostat.mc.vanderbilt.edu/wiki/Main/Rrms Package: r-cran-rms diff -Nru r-cran-rms-5.1-1/debian/README.source r-cran-rms-5.1-2/debian/README.source --- r-cran-rms-5.1-1/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ r-cran-rms-5.1-2/debian/README.source 2018-01-29 02:50:25.000000000 +0000 @@ -0,0 +1,12 @@ + +Explanation for binary files inside source package according to + + http://lists.debian.org/debian-devel/2013/09/msg00332.html + +Files: inst/tests/qt50.rda + -> Sample data for unit testing + +Files: inst/tests/sampledf.rda + -> Sample data frame for tests + + -- Dirk Eddelbuettel , Mon, 8 Jan 2018 21:33:39 -0600 diff -Nru r-cran-rms-5.1-1/DESCRIPTION r-cran-rms-5.1-2/DESCRIPTION --- r-cran-rms-5.1-1/DESCRIPTION 2017-05-03 16:41:23.000000000 +0000 +++ r-cran-rms-5.1-2/DESCRIPTION 2018-01-07 22:27:43.000000000 +0000 @@ -1,13 +1,13 @@ Package: rms -Version: 5.1-1 -Date: 2017-05-01 +Version: 5.1-2 +Date: 2018-01-06 Title: Regression Modeling Strategies Author: Frank E Harrell Jr Maintainer: Frank E Harrell Jr -Depends: Hmisc (>= 4.0-2), survival (>= 2.40-1), lattice, ggplot2 (>= +Depends: Hmisc (>= 4.1-0), survival (>= 2.40-1), lattice, ggplot2 (>= 2.2), SparseM Imports: methods, quantreg, rpart, nlme (>= 3.1-123), polspline, - multcomp, htmlTable, htmltools + multcomp, htmlTable (>= 1.11.0), htmltools Suggests: boot, tcltk, plotly (>= 4.5.6) Description: Regression modeling, testing, estimation, validation, graphics, prediction, and typesetting by storing enhanced model design @@ -27,6 +27,6 @@ URL: http://biostat.mc.vanderbilt.edu/rms LazyLoad: yes NeedsCompilation: yes -Packaged: 2017-05-03 14:03:12 UTC; harrelfe +Packaged: 2018-01-07 18:46:22 UTC; harrelfe Repository: CRAN -Date/Publication: 2017-05-03 16:41:23 UTC +Date/Publication: 2018-01-07 22:27:43 UTC diff -Nru r-cran-rms-5.1-1/INDEX r-cran-rms-5.1-2/INDEX --- r-cran-rms-5.1-1/INDEX 2016-12-28 15:08:01.000000000 +0000 +++ r-cran-rms-5.1-2/INDEX 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -anova.rms Analysis of Variance (Wald and F Statistics) -bj Buckley-James Multiple Regression Model -bootBCa BCa Bootstrap on Existing Bootstrap Replicates -bootcov Bootstrap Covariance and Distribution for - Regression Coefficients -bplot 3-D Plots Showing Effects of Two Continuous - Predictors in a Regression Model Fit -calibrate Resampling Model Calibration -contrast.rms General Contrasts of Regression Coefficients -cph Cox Proportional Hazards Model and Extensions -cr.setup Continuation Ratio Ordinal Logistic Setup -datadist Distribution Summaries for Predictor Variables -ExProb Function Generator For Exceedance Probabilities -fastbw Fast Backward Variable Selection -Function.rms Compose an S Function to Compute X beta from a - Fit -gendata Generate Data Frame with Predictor Combinations -ggplot.Predict Plot Effects of Variables Estimated by a - Regression Model Fit Using ggplot2 -gIndex Calculate Total and Partial g-indexes for an - rms Fit -Glm rms Version of glm -Gls Fit Linear Model Using Generalized Least - Squares -groupkm Kaplan-Meier Estimates vs. a Continuous - Variable -hazard.ratio.plot Hazard Ratio Plot -ie.setup Intervening Event Setup -latex.cph LaTeX Representation of a Fitted Cox Model -latexrms LaTeX Representation of a Fitted Model -lrm Logistic Regression Model -lrm.fit Logistic Model Fitter -matinv Total and Partial Matrix Inversion using - Gauss-Jordan Sweep Operator -nomogram Draw a Nomogram Representing a Regression Fit -npsurv Nonparametric Survival Estimates for Censored - Data -ols Linear Model Estimation Using Ordinary Least - Squares -orm Ordinal Regression Model -orm.fit Ordinal Regression Model Fitter -pentrace Trace AIC and BIC vs. Penalty -plotp.Predict Plot Effects of Variables Estimated by a - Regression Model Fit Using plotly -plot.Predict Plot Effects of Variables Estimated by a - Regression Model Fit -plot.xmean.ordinaly Plot Mean X vs. Ordinal Y -pphsm Parametric Proportional Hazards form of AFT - Models -predab.resample Predictive Ability using Resampling -Predict Compute Predicted Values and Confidence Limits -predict.lrm Predicted Values for Binary and Ordinal - Logistic Models -predictrms Predicted Values from Model Fit -print.cph Print cph Results -print.ols Print ols -psm Parametric Survival Model -residuals.cph Residuals for a cph Fit -residuals.lrm Residuals from an 'lrm' or 'orm' Fit -residuals.ols Residuals for ols -rms rms Methods and Generic Functions -rmsMisc Miscellaneous Design Attributes and Utility - Functions -rmsOverview Overview of rms Package -rms.trans rms Special Transformation Functions -robcov Robust Covariance Matrix Estimates -Rq rms Package Interface to quantreg Package -sensuc Sensitivity to Unmeasured Covariables -setPb Progress Bar for Simulations -specs.rms rms Specifications for Models -summary.rms Summary of Effects in Model -survest.cph Cox Survival Estimates -survest.psm Parametric Survival Estimates -survfit.cph Cox Predicted Survival -survplot Plot Survival Curves and Hazard Functions -validate Resampling Validation of a Fitted Model's - Indexes of Fit -validate.cph Validation of a Fitted Cox or Parametric - Survival Model's Indexes of Fit -validate.lrm Resampling Validation of a Logistic or Ordinal - Regression Model -validate.ols Validation of an Ordinary Linear Model -validate.rpart Dxy and Mean Squared Error by Cross-validating - a Tree Sequence -validate.Rq Validation of a Quantile Regression Model -val.prob Validate Predicted Probabilities -val.surv Validate Predicted Probabilities Against - Observed Survival Times -vif Variance Inflation Factors -which.influence Which Observations are Influential diff -Nru r-cran-rms-5.1-1/inst/tests/examples.Rmd r-cran-rms-5.1-2/inst/tests/examples.Rmd --- r-cran-rms-5.1-1/inst/tests/examples.Rmd 2017-04-19 16:12:25.000000000 +0000 +++ r-cran-rms-5.1-2/inst/tests/examples.Rmd 2018-01-03 14:12:10.000000000 +0000 @@ -3,16 +3,27 @@ author: "FE Harrell" date: '`r Sys.Date()`' output: - html_notebook: - toc: yes - toc_float: - collapsed: yes html_document: toc: yes + toc_depth: 3 + number_sections: true + toc_float: + collapsed: false + code_folding: hide + theme: cerulean +css: stewarttoc.css --- + + + + # Introduction ## Markdown -This is an R Markdown html notebookdocument. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . +This is an R Markdown html document using the template that is [here](http://biostat.mc.vanderbilt.edu/KnitrHtmlTemplate). Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see . ```{r, results='hide'} require(rms) @@ -38,7 +49,7 @@ # For certain print methods set to use html options(grType='plotly', prType='html') s <- summaryM(age + pclass ~ sex, data=titanic3) -s +html(s) plot(s) d <- describe(titanic3) plot(d) @@ -53,13 +64,13 @@ ``` # Logistic Regression Model -```{r lrmt} +```{r lrmt,results='asis'} dd <- datadist(titanic3); options(datadist='dd') f <- lrm(survived ~ rcs(sqrt(age),5) * sex, data=titanic3) -f +print(f) latex(f) a <- anova(f) -a +print(a) plot(a) ``` @@ -90,5 +101,5 @@ diff -Nru r-cran-rms-5.1-1/inst/tests/plot.Predict.s r-cran-rms-5.1-2/inst/tests/plot.Predict.s --- r-cran-rms-5.1-1/inst/tests/plot.Predict.s 2013-08-02 16:32:11.000000000 +0000 +++ r-cran-rms-5.1-2/inst/tests/plot.Predict.s 2017-09-30 18:05:39.000000000 +0000 @@ -16,3 +16,27 @@ plot(p, ~ x1, groups='group', col=3:1) +## From Ferenci Tamas +set.seed( 1 ) +d <- data.frame(x1 = rnorm( 1000 ), + x2 = sample( 1:2, 1000, replace = TRUE ), + x3 = sample( 1:2, 1000, replace = TRUE ) ) +d <- transform( d, y = x3*( x1 + x2 )+rnorm( 1000 ) ) + +dd <- datadist( d ) +options( datadist = "dd" ) + +fit <- ols( y ~ x3*( x1 + x2 ), data = d ) + +p1 <- Predict( fit, x1, x3 ) +p2 <- Predict( fit, x2, x3 ) +p <- rbind(x1=p1, x2=p2) +plot(p, groups='x3', varypred=TRUE) + +#Now, if you run plot( p1 ) or plot( p2 ), everything is fine. However, in +#the last call above the panel for the continuous predictor, x1 is +#fine, the same as plot( p1 ), but for the categorical predictor, it is +#something completely different (and wrong, quite fundamentally: the +#two groups do not even appear). + + diff -Nru r-cran-rms-5.1-1/inst/tests/rms.r r-cran-rms-5.1-2/inst/tests/rms.r --- r-cran-rms-5.1-1/inst/tests/rms.r 2016-07-25 12:09:21.000000000 +0000 +++ r-cran-rms-5.1-2/inst/tests/rms.r 2017-09-11 18:09:15.000000000 +0000 @@ -44,3 +44,16 @@ cph(S ~ x1 + x4 + x1 %ia% x4) +## From https://github.com/harrelfe/rms/issues/29#issuecomment-303423887 +## https://github.com/harrelfe/rms/issues/29#issuecomment-328581864 +d <- expand.grid( +X1 = factor(c('05: X1 <= 178','01: X1 <= 6', '03: X1 <= 52', '05: X1 <= 178')), +X2 = factor(c('04: X2 <= 75','01: X2 <= 6', '05: X2 > 75', '05: X2 > 75')), +X3 = factor(c('04: X3 <= 552','01: X3 <= 1', '04: X3 <= 552', '06: X3 > 1313')), +rep = 1 : 100) +set.seed(1) +d$TARGET <- sample(0 : 1, nrow(d), replace=TRUE) + +lrm(TARGET ~ ., data = d) +options(debug=TRUE) +cph(Surv(TARGET) ~ ., data=d) diff -Nru r-cran-rms-5.1-1/inst/tests/robcov2.r r-cran-rms-5.1-2/inst/tests/robcov2.r --- r-cran-rms-5.1-1/inst/tests/robcov2.r 2016-04-25 18:44:12.000000000 +0000 +++ r-cran-rms-5.1-2/inst/tests/robcov2.r 2017-09-30 16:20:39.000000000 +0000 @@ -17,3 +17,18 @@ g <- robcov(f, id) g$clusterInfo +# From Jennifer Thompson, modified +afun <- function(...) bootcov(..., B=500) # or just robcov +set.seed(56) +df <- data.frame(y = rnorm(n = 100), + x1 = rnorm(n = 100), + x2 = rnorm(mean = 5, sd = 0.5, n = 100)) + +cat('Error expectedd in solvet when nsides=2\n') +for(nsites in 7:2) { + cat('nsites:', nsites, '\n') + df$site <- sample(LETTERS[1:nsites], size = 100, replace = TRUE) + f <- ols(y ~ rcs(x1, 3) + rcs(x2, 3), data = df, x = TRUE, y = TRUE) + g <- afun(f, cluster=df$site) + print(anova(g)) +} diff -Nru r-cran-rms-5.1-1/inst/tests/robcov.r r-cran-rms-5.1-2/inst/tests/robcov.r --- r-cran-rms-5.1-1/inst/tests/robcov.r 2014-11-04 22:17:47.000000000 +0000 +++ r-cran-rms-5.1-2/inst/tests/robcov.r 2017-11-23 14:40:02.000000000 +0000 @@ -15,6 +15,8 @@ g <- ols(y ~ x1 + x2, x=TRUE, y=TRUE) vcov(g) h <- robcov(g, clus) +h +sqrt(diag(h$var)) vcov(h) vcov(h) / vcov(f) diff -Nru r-cran-rms-5.1-1/man/fastbw.Rd r-cran-rms-5.1-2/man/fastbw.Rd --- r-cran-rms-5.1-1/man/fastbw.Rd 2016-05-16 18:05:08.000000000 +0000 +++ r-cran-rms-5.1-2/man/fastbw.Rd 2017-09-30 15:34:39.000000000 +0000 @@ -22,7 +22,8 @@ statistic for each model. } \usage{ -fastbw(fit, rule="aic", type="residual", sls=.05, aics=0, eps=1e-9, +fastbw(fit, rule=c("aic", "p"), + type=c("residual", "individual", "total"), sls=.05, aics=0, eps=1e-9, k.aic=2, force=NULL) \method{print}{fastbw}(x, digits=4, estimates=TRUE, \dots) diff -Nru r-cran-rms-5.1-1/man/ggplot.Predict.Rd r-cran-rms-5.1-2/man/ggplot.Predict.Rd --- r-cran-rms-5.1-1/man/ggplot.Predict.Rd 2016-11-13 14:33:39.000000000 +0000 +++ r-cran-rms-5.1-2/man/ggplot.Predict.Rd 2017-12-31 16:18:26.000000000 +0000 @@ -25,6 +25,7 @@ \method{ggplot}{Predict}(data, mapping, formula=NULL, groups=NULL, aestype=c('color', 'linetype'), conf=c('fill', 'lines'), + conflinetype=1, varypred=FALSE, sepdiscrete=c('no', 'list', 'vertical', 'horizontal'), subset, xlim., ylim., xlab, ylab, colorscale=function(...) scale_color_manual(..., @@ -74,6 +75,8 @@ \code{size}, \code{shape}.} \item{conf}{specify \code{conf="line"} to show confidence bands with lines instead of filled ribbons, the default} +\item{conflinetype}{specify an alternative \code{linetype} for confidence + intervals if \code{conf="line"}} \item{varypred}{set to \code{TRUE} if \code{data} is the result of passing multiple \code{Predict} results, that represent different predictors, to \code{rbind.Predict}. This will cause the \code{.set.} diff -Nru r-cran-rms-5.1-1/man/lrm.fit.Rd r-cran-rms-5.1-2/man/lrm.fit.Rd --- r-cran-rms-5.1-1/man/lrm.fit.Rd 2014-08-20 12:35:43.000000000 +0000 +++ r-cran-rms-5.1-2/man/lrm.fit.Rd 2017-09-14 16:17:53.000000000 +0000 @@ -99,7 +99,7 @@ d.f., and P-value are not corrected for the effective d.f. } \item{fail}{ -set to \code{TRUE} if convergence failed (and \code{maxiter>1}) +set to \code{TRUE} if convergence failed (and \code{maxit>1}) } \item{coefficients}{ estimated parameters diff -Nru r-cran-rms-5.1-1/man/lrm.Rd r-cran-rms-5.1-2/man/lrm.Rd --- r-cran-rms-5.1-1/man/lrm.Rd 2016-12-03 13:29:28.000000000 +0000 +++ r-cran-rms-5.1-2/man/lrm.Rd 2017-09-29 21:15:06.000000000 +0000 @@ -177,7 +177,7 @@ \eqn{Y >} its lowest level, the \eqn{g}-index, \eqn{gr} (the \eqn{g}-index on the odds ratio scale), and \eqn{gp} (the \eqn{g}-index on the probability scale using the same cutoff used for the Brier -score). Probabilities are rounded to the nearest 0.002 +score). Probabilities are rounded to the nearest 0.0002 in the computations or rank correlation indexes. In the case of penalized estimation, the \code{"Model L.R."} is computed without the penalty factor, and \code{"d.f."} is the effective d.f. from diff -Nru r-cran-rms-5.1-1/man/orm.fit.Rd r-cran-rms-5.1-2/man/orm.fit.Rd --- r-cran-rms-5.1-1/man/orm.fit.Rd 2016-02-17 17:12:24.000000000 +0000 +++ r-cran-rms-5.1-2/man/orm.fit.Rd 2017-09-14 16:18:07.000000000 +0000 @@ -97,7 +97,7 @@ d.f., and P-value are not corrected for the effective d.f. } \item{fail}{ -set to \code{TRUE} if convergence failed (and \code{maxiter>1}) +set to \code{TRUE} if convergence failed (and \code{maxit>1}) } \item{coefficients}{ estimated parameters diff -Nru r-cran-rms-5.1-1/man/robcov.Rd r-cran-rms-5.1-2/man/robcov.Rd --- r-cran-rms-5.1-1/man/robcov.Rd 2014-12-16 20:11:59.000000000 +0000 +++ r-cran-rms-5.1-2/man/robcov.Rd 2017-11-23 14:41:09.000000000 +0000 @@ -84,11 +84,6 @@ Long, JS, Ervin, LH. The American Statistician 54:217--224, 2000. } -\section{Warnings}{ -Adjusted \code{ols} fits do not have the corrected standard errors printed with -\code{print.ols}. Use \code{sqrt(diag(adjfit$var))} to get this, where -\code{adjfit} is the result of \code{robcov}. -} \seealso{ \code{\link{bootcov}}, \code{\link{naresid}}, \code{\link{residuals.cph}}, \code{http://gforge.se/gmisc} interfaces diff -Nru r-cran-rms-5.1-1/MD5 r-cran-rms-5.1-2/MD5 --- r-cran-rms-5.1-1/MD5 2017-05-03 16:41:23.000000000 +0000 +++ r-cran-rms-5.1-2/MD5 2018-01-07 22:27:43.000000000 +0000 @@ -1,54 +1,53 @@ -7c6b04b8571f12757a9416ef7d4b0f0d *DESCRIPTION -f8ef737636e050d264cf2a56823241bf *INDEX +2bcb26439a775b74f8b576311d4eb05f *DESCRIPTION ad9817531a5aeb3ddb3a9e845d7b0ff9 *NAMESPACE -9749b9c89af1cd7a6623e8b9a4251aa1 *NEWS +fe669bdb5ecf030cdc41304e45bb9db2 *NEWS 756acad7b93dc956759a54d1b36990c1 *R/Function.rms.s cfc474a1f3b2c2ecf27a4ddaadfe0daa *R/Glm.s -6daa8e99e8cdeb7b4ac8b206f2f27656 *R/Gls.s +bb679c037dd774df497420c28a00ded9 *R/Gls.s ebd90ed405f0b9a6e22c5babb547934c *R/Predict.s 8a5f0d530c6c9524d4b6affe962545cb *R/Rq.s -a0e506c0923faecb841b4c471344c5fa *R/anova.rms.s +14b6ccac06739ba79c3540cd0d7dbaca *R/anova.rms.s f6ad40680769f374cdf3263ecadbfd97 *R/bj.s a684122d37546a33ee8a827018e88f20 *R/bootcov.s 3facce56093ac3e4e904d8f640e6046f *R/bplot.s 23f0df5a6888c89a8e9407f2891a0a18 *R/calibrate.cph.s -7471257cf222580da4b91e81c6cff6c7 *R/calibrate.default.s +fcfe89654ce90c827b941f8116a2d802 *R/calibrate.default.s 80addcca001f92bf9c9f1c8bd7ca73be *R/calibrate.psm.s b669693cb946283723841f9836f5fca5 *R/calibrate.s 51c3ea2ad29631574bbabca560053a32 *R/contrast.s 69424421d3657c8ff11fe7d27ecab6df *R/cph.s 707e17e96143dc6256fe44d671f43963 *R/cr.setup.s 4bcb6d69d3c683eca38eaf28fc37b019 *R/datadist.s -39e3bf2f2bf40253aec3ff1d165d6761 *R/fastbw.s +3c0fca0e0221ccc08a0536c8fc8d170d *R/fastbw.s 07800d51720e07511fca35baa694143f *R/gIndex.s c4108b6a3c4d35f3b55b5207cd238563 *R/gendata.s -d977f787f6159193039a9b182d6e1ab5 *R/ggplot.Predict.s -802e0648ee698b11177910fc8d23b9d5 *R/groupkm.s +a2615133d96d0f606e23c68b85ad2407 *R/ggplot.Predict.s +842d64b40e1837283bef2cd41952bc72 *R/groupkm.s 9a2d001d398705fbd7588aa6591b6942 *R/hazard.ratio.plot.s 020407ed74c1c5d884f44ddcfccf6f7c *R/ia.operator.s 0c9042c90e269e41bb589b4e7807a356 *R/ie.setup.s -9c89c0abe5f055fab32c94849c8c8046 *R/latex.cph.s +1b7186005f70c0cc8aa9ffff66a3ff6f *R/latex.cph.s 68486fb68f058962fe96a12b191f5611 *R/latex.lrm.s 30b997920c57c5e219d4518305535b06 *R/latex.ols.s 47deda7fdf6457f32f18eef08fdac084 *R/latex.pphsm.s 6703b6b709c779699ba9426f09aad843 *R/latex.psm.s -56733078ea3507658a365876ac1c93f9 *R/latex.rms.s -6ed66f4af261a3896a95ab7b9b34c014 *R/lrm.fit.s -8f75af7be0acef5d5708387971edfb73 *R/lrm.fit.strat.s +232909048428a0ff67d916b184f4c9a7 *R/latex.rms.s +d11d829d57b6386510607a72b58124d9 *R/lrm.fit.s +1b2865fba391dbf3c72801a41fd403ed *R/lrm.fit.strat.s 2d5b1336bc96c8d13702e70fb6241832 *R/lrm.s b6eef10f1355b1fa4f609f8e8fd7270a *R/matinv.s 7832702f9f63b4be5c6cd64f83dbed9c *R/nomogram.s b7e6ee255b33f18e303167efb6755bce *R/npsurv.s -b6d310961e81576e7c2554d369a7fb81 *R/ols.s -1eebbdfe1c1af93479ac70115eecccd1 *R/orm.fit.s +6b16ada11f40cb5c842e0fc3dc3accc7 *R/ols.s +6d20907ddb54d86cec3397371af2c0e7 *R/orm.fit.s 5211aa533c9e7393820eca268feeb105 *R/orm.s -e5a9def2c0568c61cbc0562b9f683058 *R/pentrace.s +f764acd51c355b1a0aa7250cadab35f2 *R/pentrace.s 58d4ce516aa760f8dd295e9e99fc0925 *R/plot.Predict.s 181837dc6972d157884f57239e4f944e *R/plot.nomogram.s 13e3c07f0bef461881b7f3e2688c8502 *R/plot.xmean.ordinaly.s 3d1024623241a7fb5e4f9db4149261d9 *R/plotp.Predict.s 5863a81bcc7e54c317961a96567734de *R/pphsm.s -22614aa151f01af0f557d7466548e242 *R/predab.resample.s +921ba77f0ae17f1f24ac3fbfd1d7cf00 *R/predab.resample.s e1b9bcdfdcba638377ddd9e66bc7fdb5 *R/predict.lrm.s 0f57f4c56eb70fa294af95f9b9b15034 *R/predictrms.s 2cd80fa82463bbcae153072dafc09c5c *R/print.psm.s @@ -56,26 +55,26 @@ 489aa87bc081c9beb220dbc832db9f97 *R/residuals.cph.s ddff5237c60fbe79c72e6a1567f6c505 *R/residuals.lrm.s b68bfa76a0838cec25be23f352234d82 *R/residuals.ols.s -255a41dc0f48ef69ea437c629fdd6934 *R/rms.s +7358f57ea13969810ca22dd1760adb81 *R/rms.s 63afedefc8c5cdfb441cfda338e52ab5 *R/rms.trans.s -4208857a3903293bcee80e6b6dec590d *R/rmsMisc.s +57b03dc36402ec749d42ca8ecbee6804 *R/rmsMisc.s e9d38f83f574873c3bfe7bb3989c25f7 *R/robcov.s 72c85f219fc0d0570ddb2f9c64e6f4f3 *R/sensuc.s f9b32e895f447b50391e86912da129d5 *R/specs.rms.s -01e08e2293888da55e365fd3dfe77f2e *R/summary.rms.s +14c547c1ca7336b8fd55d05f0d4b4b23 *R/summary.rms.s 199f066cfd4820002b9c554ad90a8f33 *R/survest.cph.s 0beb2e9b0b69a54cbb9706466991232e *R/survest.psm.s b9b6b0b7aaa6475625958a7488af2158 *R/survfit.cph.s dc5f5dd552db8e67bc04a8f102addcf6 *R/survplot.npsurv.s ee251131b9dc4f6ef7c54cb8b191a0b6 *R/survplot.rms.s -940df793d300635a7cc9eae7ee23a0ab *R/survplotp.npsurv.s +5edbaa645644a0f3f760d19a0ea238a4 *R/survplotp.npsurv.s 042d1cab4966f0c9c484b072266526f2 *R/survreg.distributions.s 25e3b5e119ebe51f1dce5f74eba4e675 *R/val.prob.s 254230ab29d9c613551a37c98faf4419 *R/val.surv.s 5af5237b40d2f105e0a895aa6cebd334 *R/validate.Rq.s 4e147182ce1494f08ae9531d3225ed08 *R/validate.cph.s e442db117a13ffd5520af7ad36104305 *R/validate.lrm.s -25775f6cf393dc682fa4cda62dc647cd *R/validate.ols.s +cf225a529e2b8f149b9458591a03acda *R/validate.ols.s fab33cc743061a2dd8e4ef2362043d9c *R/validate.psm.s 0a23e640e49d1020d9204dad743cb00f *R/validate.rpart.s 8f27669bd7cda4463da5d9e6143f8f06 *R/which.influence.s @@ -97,7 +96,7 @@ 8df570ced5278d86a1567cf69b4a11f4 *inst/tests/cph3.r a54fbdf9d11eb39db2e0b89f8fda5d9c *inst/tests/cph4.r 0ef542ac08db6a1c88f02cfe1c8209f9 *inst/tests/cphtdc.r -e5217889a61598134d6839d08c6ca851 *inst/tests/examples.Rmd +8b31a65bc696d76885389769145e21ee *inst/tests/examples.Rmd 27f517ba6ad9743756bc9495ce7ed4cd *inst/tests/ggplot.Predict.Rd.timing.r 614dbbecfaeb31d079ebd5ed37d27948 *inst/tests/ggplot2-without-ggplot.Predict.r 805ca8322aeef7fb0b6f17bc1f43e157 *inst/tests/ggplot2.r @@ -125,7 +124,7 @@ 7792ed341fe1b3fe9731ae107263ee73 *inst/tests/orm4.r a5775dcc1798405805eee86e3298b7dc *inst/tests/pentrace.s 69b043a0be51ad0b4de8c3a4cc9a02a2 *inst/tests/perlcode.s -1e9ec84290636a62fe7a2695aee756e0 *inst/tests/plot.Predict.s +01bb632b0c7bbf05df816b87cdaebb84 *inst/tests/plot.Predict.s c4d07b10b33c09476c5e36d9052e3946 *inst/tests/plotly-Predict.r 003ea0bb57c65c09ad9e70e36cf06945 *inst/tests/predictrms.s 12a88bc8b9dbc7273ea2e59de6ee2e4c *inst/tests/psm.s @@ -133,10 +132,10 @@ 1f42f45a8ae0cfd473cd93ae972f9211 *inst/tests/psm3.s 39eb77b8feecabe1d30a3ed68a8aa1d0 *inst/tests/qt50.rda 9e632d6adca8c8cd913cd6594b0ac764 *inst/tests/rcs.r -57b9bbd8f8c855cf46919cbcee77c9d6 *inst/tests/rms.r +0f9966600de1adea550c3f1c4df50ef9 *inst/tests/rms.r 9a3297de7c30c85b4507000d8beb258e *inst/tests/rms2.r -865328a999350d96b5616d6fb512cff6 *inst/tests/robcov.r -1e7b43af548dd761c070130f7fbbdc1c *inst/tests/robcov2.r +47a0a4f75d74265a2d00c4fbc17eb0c6 *inst/tests/robcov.r +dfdbff284243ac14df051472485ac284 *inst/tests/robcov2.r 8dbb2cc72806004b13683a4f2a278fcd *inst/tests/sampledf.rda 27c039706d73f61ac6c182fcb67b0a02 *inst/tests/scale.r de76d469e88cbf53beace54bb8d62408 *inst/tests/simult.s @@ -170,23 +169,23 @@ ebe8ccd9557593b9591a3733e5721d03 *man/cph.Rd 3598858327353344473dd49b3148aae5 *man/cr.setup.Rd 6976d93ef2dcf0c5be28ad0f10b0f0fe *man/datadist.Rd -b40ce70a8150beee68ee75b2fb89960c *man/fastbw.Rd +609760e55e434b97076a1f905fd0e83e *man/fastbw.Rd 860168872bbcedb4143520ead7d9864f *man/gIndex.Rd 7af2e5fc58f3280fd0c1a32f0f16f5e1 *man/gendata.Rd -57d5529425a998357757dee0228a8117 *man/ggplot.Predict.Rd +14f8e9e66084a0386cc1df1f5071bbf2 *man/ggplot.Predict.Rd ff83596fa5313d3026cd655433246cbf *man/groupkm.Rd eb4e4fa5a9ed9efea6e4b43473ec060e *man/hazard.ratio.plot.Rd c7d3f229584c62b812481195592e0823 *man/ie.setup.Rd 69867942fe72121e668989833cf7a2c1 *man/latex.cph.Rd 04b8b84bbca0e1bbcc7d862962ed6000 *man/latexrms.Rd -91d5e20ced90d78f508048af751f3dae *man/lrm.Rd -a38e076613fa72e927564572f0b19c29 *man/lrm.fit.Rd +af4a9ae458045f8bffaba54b16a0f4e9 *man/lrm.Rd +95b5fcce4ef319f46a5496e5e2211ecf *man/lrm.fit.Rd 75ea79a8d4c9c93306325f86197f20d1 *man/matinv.Rd 8cab09dc2722e4389cf0c404d91f896b *man/nomogram.Rd bc52dc0397eb9a52797855930b20db99 *man/npsurv.Rd c6861299ac7727cd6599b4109670958f *man/ols.Rd 020fff1a9ae00e92401ed5d38fc42cb7 *man/orm.Rd -d8baca60cd4aa78f8bec5d38edf0e8eb *man/orm.fit.Rd +32a273eb34719f6bcde2a5158cb62af8 *man/orm.fit.Rd 009dcfc34d11944fbca2900fbc6168a8 *man/pentrace.Rd 89e845cf3aea3289425f040568646514 *man/plot.Predict.Rd 444214bc44e3d3197df7158b051b0dcb *man/plot.xmean.ordinaly.Rd @@ -205,7 +204,7 @@ 66f56c754426cedbb9582b5cb620254f *man/rms.Rd 05d0db6c1c214f5fd5d8ca66008c0ff9 *man/rms.trans.Rd df41d2cdb8accc985e1fff567c01a49c *man/rmsMisc.Rd -b50fb9475b51fa77c0ac2958b6a520b8 *man/robcov.Rd +449111bd5b87f10d03467f0b5ea31c43 *man/robcov.Rd da0b2b1a2f51ed9058d72c0575068c7e *man/sensuc.Rd 66f608027598577fe42e4e88c9a9b1d9 *man/setPb.Rd a88339681eb0cc11e57bb5500f0d770a *man/specs.rms.Rd @@ -226,7 +225,7 @@ 61c878449adba2ddbb2c7c317cda323e *man/which.influence.Rd 944bdeffba3a4e1a805a720a71307850 *man/zzzrmsOverview.Rd 88fcae3360fb4e5e92d60d78002a9bc5 *src/init.c -52e5158b30a8a7b6f6832a10e09133ee *src/lrmfit.f +00d319c508c47356a6b281cbe701cdcc *src/lrmfit.f ce0bcaf5e15b9792ebb9f634476f90d7 *src/mlmats.f 2ae77be06ac3f9ba6267485431a27cd8 *src/ormuv.f 3dcf4cf19fb5328393d19f0657d8e485 *src/ratfor/ormuv.r diff -Nru r-cran-rms-5.1-1/NEWS r-cran-rms-5.1-2/NEWS --- r-cran-rms-5.1-1/NEWS 2017-05-01 12:08:04.000000000 +0000 +++ r-cran-rms-5.1-2/NEWS 2018-01-07 18:46:08.000000000 +0000 @@ -1,3 +1,25 @@ +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 + * removeFormulaTerms: changed above fix to use paste collapse instead (Thanks: Tamas) + * Design: mmnames function: escaped <= like >= already escaped. See https://github.com/harrelfe/rms/issues/29#issuecomment-303423887 + * groupkm: speed improvement (helps calibrate*; thanks Cole Beck) + * fastbw: improved messages for rule and type + * prModFit: changed to have htmlSpecial, htmlTranslate do all the html special character coding, allowing default to unicode + * lrm, lrm.fit: for rank correlation measures, made more accurate by binning probabilities into bins of width 0.0002 instead of 0.002 + * ggplot.Predict: fixed case of empty labels when defining pmlabel + * vcov.orm: fixed bug when intercepts longer than 1 + * lrm.fit, orm.fit: diag(1 / sd) not returning matrix if sd is a matrix and not a vector + * ols: respected data in terms call, for case where formula is . + * robcov: removed warning in help file about printed standard errors (Thanks: Ferenci Tamás) + * anova, rmsMisc, survplotp.npsurv: changed nbsp to htmlSpecial version + * prModStat, anova, latex.cph, latex.rms, summary, validate.ols: added escape.html=FALSE to htmlTable + * print.summary.rms: for html returned HTML object instead of invisible + * validate.ols, calibrate.default: fixed fitter so that NA coefficient results in fail=TRUE + * Gls: fixed major bug where correlation pattern was being ignored if not corAR1,corCAR1,corCompSymm. Thanks: Tamas Ferenci + * latex.cph.s: changed to use latex instead of latex.default + * ggplot.Predict: added conflinetype parameter (thanks: jphdotam; https://github.com/harrelfe/rms/pull/54) + Changes in version 5.1-1 (2017-05-01) * latex.anova.rms: if table.env is FALSE but caption is specified, passes caption as insert.top argument to latex.default; when options(prType='latex') you can do print(anova(), caption=) to use this * prModFit: fixed one latex to lang=='latex' bug diff -Nru r-cran-rms-5.1-1/R/anova.rms.s r-cran-rms-5.1-2/R/anova.rms.s --- r-cran-rms-5.1-1/R/anova.rms.s 2017-02-11 17:16:37.000000000 +0000 +++ r-cran-rms-5.1-2/R/anova.rms.s 2017-12-04 02:25:27.000000000 +0000 @@ -540,7 +540,7 @@ w <- htmlTable::htmlTable(dstats, caption=caption, css.cell=rep('padding-left:3ex;', ncol(dstats)), align=al, align.header=al, - rowlabel='') + rowlabel='', escape.html=FALSE) htmltools::HTML(as.character(paste0(w, '\n'))) } else @@ -572,6 +572,7 @@ htmlSpecs <- markupSpecs$html schisq <- htmlSpecs$chisq() + nbsp <- htmlSpecial('nbsp') if(! length(xlab)) { @@ -592,7 +593,7 @@ switch(what, chisq = schisq, "proportion chisq" = paste('Proportion of Overall', schisq), - chisqminusdf = paste0(schisq, ' - df'), + chisqminusdf = paste0(schisq, nbsp, '-', nbsp, 'df'), aic = "Akaike Information Criterion", P = "P-value", "partial R2" = 'Partial R2', @@ -709,7 +710,7 @@ else auxdata <- aux[[2]] } else auxdata <- if(length(auxdata)) - paste(auxdata, aux, sep='  ') + paste(auxdata, aux, sep=paste0(nbsp,nbsp)) else aux } diff -Nru r-cran-rms-5.1-1/R/calibrate.default.s r-cran-rms-5.1-2/R/calibrate.default.s --- r-cran-rms-5.1-1/R/calibrate.default.s 2013-10-01 02:25:54.000000000 +0000 +++ r-cran-rms-5.1-2/R/calibrate.default.s 2017-12-15 01:58:23.000000000 +0000 @@ -57,23 +57,26 @@ cal - predy } - fitit <- function(x, y, model, penalty.matrix=NULL, xcol=NULL, ...) - { + fitit <- function(x, y, model, penalty.matrix=NULL, xcol=NULL, ...) { if(length(penalty.matrix) && length(xcol)) { if(model=='ol') xcol <- xcol[-1] - 1 # take off intercept position penalty.matrix <- penalty.matrix[xcol, xcol, drop=FALSE] } - switch(model, - lr=lrm.fit(x, y, penalty.matrix=penalty.matrix, tol=1e-13), - ol=c(if(length(penalty.matrix)==0) - { + f <- + switch(model, + lr = lrm.fit(x, y, penalty.matrix=penalty.matrix, tol=1e-13), + ol = if(length(penalty.matrix)==0) + { w <- lm.fit.qr.bare(x, y, intercept=TRUE, xpxi=TRUE) w$var <- w$xpxi * sum(w$residuals^2) / (length(y) - length(w$coefficients)) w } else - lm.pfit(x, y, penalty.matrix=penalty.matrix), fail=FALSE)) + lm.pfit(x, y, penalty.matrix=penalty.matrix) + ) + if(any(is.na(f$coefficients))) f$fail <- TRUE + f } z <- predab.resample(fit, method=method, fit=fitit, measure=cal.error, diff -Nru r-cran-rms-5.1-1/R/fastbw.s r-cran-rms-5.1-2/R/fastbw.s --- r-cran-rms-5.1-1/R/fastbw.s 2013-08-24 00:22:38.000000000 +0000 +++ r-cran-rms-5.1-2/R/fastbw.s 2017-08-20 12:32:18.000000000 +0000 @@ -11,9 +11,13 @@ # # F. Harrell 18Jan91 -fastbw <- function(fit, rule="aic", type="residual", sls=.05, aics=0, - eps=1e-9, k.aic=2, force=NULL) +fastbw <- function(fit, rule=c("aic", "p"), + type=c("residual","individual","total"), sls=.05, aics=0, + eps=1e-9, k.aic=2, force=NULL) { + rule <- match.arg(rule) + type <- match.arg(type) + ns <- num.intercepts(fit) if(length(force)) force <- force + ns L <- if(ns==0) NULL else 1:ns @@ -43,13 +47,7 @@ name <- atr$name[assume != 8] ed <- as.integer(strt + len - 1) - rule <- charmatch(rule, c("aic","p"), 0) - if(rule==0) - stop("rule must be aic or p for Akaike's info criterion or p-value") - type <- charmatch(type,c("residual","individual","total"), 0) - if(type==0) - stop("type must be residual or individual") - if(type==3) type <- 1 + if(type == 'total') type <- 'residual' if(length(force) && type != 'individual') warning('force probably does not work unless type="individual"') @@ -123,7 +121,7 @@ beta[q] %*% solvet(cov[q,q], beta[q], tol=eps) df <- length(q) - switch(rule, crit <- chisq-k.aic * df, crit <- pchisq(chisq, df)) + crit <- switch(rule, aic=chisq-k.aic * df, p=pchisq(chisq, df)) if(crit < crit.min) { jmin <- j crit.min <- crit @@ -153,11 +151,11 @@ resid <- fit$coef[q] %*% solvet(Cov[q,q], fit$coef[q], tol=eps) resid.df <- length(q) - switch(type, - switch(rule, del <- resid - k.aic*resid.df <= aics, - del <- 1 - pchisq(resid,resid.df) > sls), - switch(rule, del <- crit.min <= aics, - del <- 1 - crit.min > sls) ) + del <- switch(type, + residual = switch(rule, aic=resid - k.aic*resid.df <= aics, + p=1 - pchisq(resid,resid.df) > sls), + individual = switch(rule, aic = crit.min <= aics, + p = 1 - crit.min > sls) ) if(del) { d <- d + 1 factors.del[d] <- jmin diff -Nru r-cran-rms-5.1-1/R/ggplot.Predict.s r-cran-rms-5.1-2/R/ggplot.Predict.s --- r-cran-rms-5.1-1/R/ggplot.Predict.s 2017-04-17 02:27:50.000000000 +0000 +++ r-cran-rms-5.1-2/R/ggplot.Predict.s 2017-12-31 16:18:26.000000000 +0000 @@ -2,6 +2,7 @@ function(data, mapping, formula=NULL, groups=NULL, aestype=c('color', 'linetype'), conf=c('fill', 'lines'), + conflinetype=1, varypred=FALSE, sepdiscrete=c('no', 'list', 'vertical', 'horizontal'), subset, xlim., ylim., xlab, ylab, @@ -91,10 +92,12 @@ pmlabel <- character(length(label)) names(pmlabel) <- names(label) - for(i in 1 : length(label)) - pmlabel[i] <- - if(isbase) as.character(labelPlotmath(label[i], units[i])) - else markupSpecs$html$varlabel(label[i], units[i]) + for(i in 1 : length(label)) { + rl <- if(isbase) as.character(labelPlotmath(label[i], units[i])) + else + markupSpecs$html$varlabel(label[i], units[i]) + if(length(rl)) pmlabel[i] <- rl + } if(predpres) data$.Predictor. <- if(vnames != 'labels') data$.predictor. @@ -275,8 +278,8 @@ if(conf == 'fill') sprintf("geom_ribbon(aes(x=.xx., ymin=lower, ymax=upper),%s)", ribbonargs) - else c("geom_line(aes(x=.xx., y=lower))", - "geom_line(aes(x=.xx., y=upper))") + else c("geom_line(aes(x=.xx., y=lower), linetype=conflinetype)", + "geom_line(aes(x=.xx., y=upper), linetype=conflinetype)") g <- c(g, h) } @@ -498,8 +501,8 @@ if(conf == 'fill') sprintf("geom_ribbon(aes(ymin=lower, ymax=upper), %s)", ribbonargs) - else c("geom_line(aes(x=.xx., y=lower))", - "geom_line(aes(x=.xx., y=upper))") + else c("geom_line(aes(x=.xx., y=lower), linetype=conflinetype)", + "geom_line(aes(x=.xx., y=upper), linetype=conflinetype)") ## geom_ribbon with fill=NA draws vertical lines at ## ends of confidence regions } @@ -604,8 +607,8 @@ if(conf == 'fill') sprintf("geom_ribbon(data=data, aes(ymin=lower, ymax=upper),%s)", ribbonargs) - else c(sprintf('geom_line(data=data, aes(x=%s, y=lower))', xn), - sprintf('geom_line(data=data, aes(x=%s, y=upper))', xn)) + else c(sprintf('geom_line(data=data, aes(x=%s, y=lower), linetype=conflinetype)', xn), + sprintf('geom_line(data=data, aes(x=%s, y=upper), linetype=conflinetype)', xn)) g <- c(g, h) } # end if(conf.int) } diff -Nru r-cran-rms-5.1-1/R/Gls.s r-cran-rms-5.1-2/R/Gls.s --- r-cran-rms-5.1-1/R/Gls.s 2016-12-03 00:08:55.000000000 +0000 +++ r-cran-rms-5.1-2/R/Gls.s 2017-12-17 17:49:01.000000000 +0000 @@ -22,7 +22,7 @@ method <- match.arg(method) REML <- method == "REML" - if (length(correlation)) + if (! is.null(correlation)) groups <- getGroupsFormula(correlation) else groups <- NULL glsSt <- glsStruct(corStruct = correlation, varStruct = varFunc(weights)) diff -Nru r-cran-rms-5.1-1/R/groupkm.s r-cran-rms-5.1-2/R/groupkm.s --- r-cran-rms-5.1-1/R/groupkm.s 2013-12-27 20:41:21.000000000 +0000 +++ r-cran-rms-5.1-2/R/groupkm.s 2017-08-08 19:04:12.000000000 +0000 @@ -66,7 +66,7 @@ else { pred[i] <- mean(x[s], na.rm=TRUE) - dummystrat <- as.factor(rep(1, nobs)) + dummystrat <- as.factor(rep("1", nobs)) f <- survfitKM(dummystrat,Srv[s,]) ##doesn't need conf.int since only need s.e. tt <- c(0, f$time) diff -Nru r-cran-rms-5.1-1/R/latex.cph.s r-cran-rms-5.1-2/R/latex.cph.s --- r-cran-rms-5.1-1/R/latex.cph.s 2016-12-04 15:51:12.000000000 +0000 +++ r-cran-rms-5.1-2/R/latex.cph.s 2017-12-17 17:53:49.000000000 +0000 @@ -71,14 +71,14 @@ dimnames(s) <- list(format(times), "$S_{0}(t)$") if(md) { z <- htmlTable::txtRound(s, digits=dec) - z <- htmlTable::htmlTable(z, rowlabel='$t$', + z <- htmlTable::htmlTable(z, rowlabel='$t$', escape.html=FALSE, css.cell='min-width: 9em;') Z <- c(Z, as.character(z)) } else - latex.default(s, file=file, append=TRUE, rowlabel="$t$", - rowlabel.just="r", - dec=dec, table.env=FALSE) + latex(s, file=file, append=TRUE, rowlabel="$t$", + rowlabel.just="r", + dec=dec, table.env=FALSE) } else { ## Change . to ,blank @@ -101,12 +101,13 @@ z <- htmlTable::txtRound(s, digits=dec) Z <- c(Z, as.character( htmlTable::htmlTable(z, rowlabel='$t$', + escape.html=FALSE, css.cell='min-width: 9em;'))) } else - latex.default(s, file=file, append=TRUE, - rowlabel="$t$", rowlabel.just="r", - dec=dec, table.env=FALSE) + latex(s, file=file, append=TRUE, + rowlabel="$t$", rowlabel.just="r", + dec=dec, table.env=FALSE) } } if(md) htmltools::HTML(Z) diff -Nru r-cran-rms-5.1-1/R/latex.rms.s r-cran-rms-5.1-2/R/latex.rms.s --- r-cran-rms-5.1-1/R/latex.rms.s 2016-12-03 15:17:49.000000000 +0000 +++ r-cran-rms-5.1-2/R/latex.rms.s 2017-12-04 02:28:28.000000000 +0000 @@ -609,7 +609,9 @@ as.character(htmlTable::htmlTable(z, caption='Pre-transformations', css.cell='min-width: 9em;', align='|l|l|', - align.header='|c|c|'), sep='\n') + align.header='|c|c|', + escape.html=FALSE)) +# sep='\n') } else c("\\vspace{0.5ex}\\begin{center}{\\bf Pre--Transformations}\\\\", diff -Nru r-cran-rms-5.1-1/R/lrm.fit.s r-cran-rms-5.1-2/R/lrm.fit.s --- r-cran-rms-5.1-1/R/lrm.fit.s 2017-05-01 12:05:30.000000000 +0000 +++ r-cran-rms-5.1-2/R/lrm.fit.s 2017-09-30 17:50:19.000000000 +0000 @@ -104,7 +104,7 @@ if(n < 3) stop("must have >=3 non-missing observations") kint <- as.integer(length(ylevels) - 1) - ftable <- integer(501 * (kint + 1)) + ftable <- integer(5001 * (kint + 1)) levels(y) <- ylevels numy <- table(y) names(numy) <- ylevels @@ -241,7 +241,8 @@ if(scale && nx > 0) { trans <- rbind(cbind(diag(kint), matrix(0, nrow=kint, ncol=nx)), - cbind(-matrix(rep(xbar/xsd, kint), ncol=kint), diag(1 / xsd))) + cbind(-matrix(rep(xbar/xsd, kint), ncol=kint), + diag(1 / as.vector(xsd)))) v <- t(trans) %*% v %*% trans kof <- (kof %*% trans)[,, drop=TRUE] } diff -Nru r-cran-rms-5.1-1/R/lrm.fit.strat.s r-cran-rms-5.1-2/R/lrm.fit.strat.s --- r-cran-rms-5.1-1/R/lrm.fit.strat.s 2013-12-06 23:47:56.000000000 +0000 +++ r-cran-rms-5.1-2/R/lrm.fit.strat.s 2017-09-29 21:13:04.000000000 +0000 @@ -44,7 +44,7 @@ if(n < 3)stop("must have >=3 non-missing observations") kint <- as.integer(length(ylevels)-1) if(kint != 1) stop('only works for binary y') - ftable <- integer(501*(kint+1)) + ftable <- integer(5001*(kint+1)) levels(y) <- ylevels numy <- table(y) y <- as.integer(y-1) diff -Nru r-cran-rms-5.1-1/R/ols.s r-cran-rms-5.1-2/R/ols.s --- r-cran-rms-5.1-1/R/ols.s 2016-12-03 13:33:49.000000000 +0000 +++ r-cran-rms-5.1-2/R/ols.s 2017-11-10 14:09:47.000000000 +0000 @@ -13,8 +13,9 @@ m$na.action <- na.action m$drop.unused.levels <- TRUE m[[1]] <- as.name("model.frame") - ##X's present) - if(length(attr(terms(formula), "term.labels"))) { + ##X's present) + w <- if(missing(data)) terms(formula) else terms(formula, data=data) + if(length(attr(w, "term.labels"))) { ## R's model.frame.default gives wrong model frame if [.factor ## removes unused factor levels dul <- .Options$drop.unused.levels diff -Nru r-cran-rms-5.1-1/R/orm.fit.s r-cran-rms-5.1-2/R/orm.fit.s --- r-cran-rms-5.1-1/R/orm.fit.s 2017-05-01 12:06:08.000000000 +0000 +++ r-cran-rms-5.1-2/R/orm.fit.s 2017-09-30 17:51:37.000000000 +0000 @@ -183,7 +183,8 @@ } if(scale) { trans <- rbind(cbind(1, matrix(0, nrow=1, ncol=nx)), - cbind(-matrix(rep(xbar/xsd, 1), ncol=1), diag(1 / xsd))) + cbind(-matrix(rep(xbar/xsd, 1), ncol=1), + diag(1 / as.vector(xsd)))) v <- t(trans) %*% v %*% trans } name <- if(kint == 1) "Intercept" else diff -Nru r-cran-rms-5.1-1/R/pentrace.s r-cran-rms-5.1-2/R/pentrace.s --- r-cran-rms-5.1-1/R/pentrace.s 2016-09-29 10:52:50.000000000 +0000 +++ r-cran-rms-5.1-2/R/pentrace.s 2017-05-12 12:38:42.000000000 +0000 @@ -290,10 +290,10 @@ xlab="Penalty", ylab=expression(paste("Information Criterion (", chi^2, " scale)")), - type=if('aic' %in% which)"l" else "n", lty=1, ...) + type=if('aic' %in% which)"l" else "n", lty=3, ...) else - if('aic' %in% which) lines(penalty, aic, lty=2, ...) - if('bic' %in% which) lines(penalty, bic, lty=3, ...) + if('aic' %in% which) lines(penalty, aic, lty=3, ...) + if('bic' %in% which) lines(penalty, bic, lty=2, ...) if('aic.c' %in% which) lines(penalty, aic.c, lty=1, ...) if(!add && length(setdiff(which, 'effective.df')) > 1) title(sub=paste(if('aic.c' %in% which) "Solid: AIC_c", diff -Nru r-cran-rms-5.1-1/R/predab.resample.s r-cran-rms-5.1-2/R/predab.resample.s --- r-cran-rms-5.1-1/R/predab.resample.s 2017-03-25 18:26:40.000000000 +0000 +++ r-cran-rms-5.1-2/R/predab.resample.s 2017-12-15 01:48:24.000000000 +0000 @@ -343,7 +343,6 @@ measure(xb[xtrain], y[train,,drop=FALSE], strata=stra[xtrain], fit=f, iter=i, fit.orig=fit.orig, evalfit=TRUE, kint=kint, ...) - test.statj <- measure(xb[test], y[test,,drop=FALSE], strata=stra[test], fit=f, iter=i, fit.orig=fit.orig, diff -Nru r-cran-rms-5.1-1/R/rmsMisc.s r-cran-rms-5.1-2/R/rmsMisc.s --- r-cran-rms-5.1-1/R/rmsMisc.s 2017-01-30 03:26:50.000000000 +0000 +++ r-cran-rms-5.1-2/R/rmsMisc.s 2017-12-04 02:37:59.000000000 +0000 @@ -54,13 +54,14 @@ intercepts='mid', ...) { v <- object$var if(! length(intercepts)) return(v) + li1 <- length(intercepts) == 1 iat <- attr(v, 'intercepts') # handle fit.mult.impute (?), robcov # robcov re-writes var object and uses all intercepts iref <- object$interceptRef - if(is.numeric(intercepts) && length(intercepts) == 1 && + if(is.numeric(intercepts) && li1 && intercepts == iref) intercepts <- 'mid' if(! length(iat)) { - if(length(intercepts) == 1 && intercepts == 'mid') { + if(li1 && intercepts == 'mid') { i <- c(iref, (num.intercepts(object, 'var') + 1) : nrow(v)) return(object$var[i, i, drop=FALSE]) } @@ -68,10 +69,10 @@ intercepts=intercepts, ...)) } - if(intercepts == 'none') + if(li1 && intercepts == 'none') return(object$var[-(1 : length(iat)), -(1 : length(iat)), drop=FALSE]) - if(intercepts == 'mid' && length(iat) == 1) return(object$var) + if(li1 && intercepts == 'mid' && length(iat) == 1) return(object$var) iref <- object$interceptRef info <- object$info.matrix @@ -82,15 +83,18 @@ nx <- p - ns scale <- attr(info, 'scale') name <- names(coef(object)) - if(length(scale) && (! is.character(intercepts) || intercepts == 'all')) { + if(length(scale) && (! is.character(intercepts) || + (li1 && intercepts == 'all'))) { xbar <- scale$mean xsd <- scale$sd trans <- rbind(cbind(diag(ns), matrix(0, nrow=ns, ncol=nx)), - cbind(-matrix(rep(xbar / xsd, ns), ncol=ns), diag(1 / xsd))) + cbind(-matrix(rep(xbar / xsd, ns), ncol=ns), + diag(1 / as.vector(xsd)))) } + - if(is.character(intercepts)) { + if(li1 && is.character(intercepts)) { if(intercepts != 'mid' && isbootcov) stop('intercepts must be "mid" if object produced by bootcov') switch(intercepts, @@ -683,6 +687,13 @@ lang <- prType() specs <- markupSpecs[[lang]] + +# cca <- htmlSpecial('combiningcircumflexaccent') + nbsp <- htmlSpecial('nbsp') + gt <- htmlTranslate('>') + vbar <- htmlTranslate('|') + chi2 <- specs$chisq() + beta <- htmlGreek('beta') R <- character(0) @@ -785,14 +796,14 @@ errordf <- obj$errordf beta <- obj$coef se <- obj$se - Z <- beta/se + Z <- beta / se P <- if(length(errordf)) 2 * (1 - pt(abs(Z), errordf)) else 1 - pchisq(Z ^ 2, 1) pad <- function(x) switch(lang, latex = paste0('~', x, '~'), - html = paste0(' ', x), + html = paste0(nbsp, x), plain = x) U <- cbind('Coef' = @@ -808,13 +819,15 @@ 'Pr$(>|Z|)$') else if(lang == 'html') - colnames(U) <- c('β̂', 'S.E.', 'Wald Z', - 'Pr(>|Z|)') + colnames(U) <- c(htmlGreek('beta'), # did have cca + 'S.E.', 'Wald Z', + paste0('Pr(', gt, vbar, 'Z', vbar, ')')) if(length(errordf)) colnames(U)[3:4] <- switch(lang, latex = c('$t$', 'Pr$(>|t|)$'), - html = c('t', 'Pr(>|t|)'), + html = c('t', paste0('Pr(', gt, vbar, 't', + vbar, ')')), plain = c('t', 'Pr(>|t|)') ) rownames(U) <- names(beta) @@ -856,7 +869,7 @@ htmlTable::htmlTable(U, css.cell = 'min-width: 7em;', align=al, align.header=al, - rowlabel=''))) + rowlabel='', escape.html=FALSE))) } } else { if(is.numeric(coefs)) { @@ -977,6 +990,13 @@ lorh <- lang != 'plain' specs <- markupSpecs[[lang]] + partial <- htmlSpecial('part') + vbar <- htmlTranslate('|') + cca <- htmlSpecial('combiningcircumflexaccent') + beta <- htmlGreek('beta') + geq <- htmlTranslate('>=') + + spaces <- function(n) if(n <= 0.5) '' else substring(' ', 1, floor(n)) @@ -1029,21 +1049,23 @@ if(lorh) { maxl <- max(sapply(w, length)) z <- matrix('', nrow=maxl, ncol=p) - fil <- if(lang == 'latex') '~\\hfill ' else ' ' + fil <- if(lang == 'latex') '~\\hfill ' else htmlSpecial('emsp') + + chisq <- specs$chisq() trans <- rbind( 'Dxy' = c(latex = '$D_{xy}$', html = 'Dxy'), - 'LR chi2' = c(latex = 'LR $\\chi^{2}$', - html = 'LR χ2'), - 'Score chi2' = c(latex = 'Score $\\chi^{2}$', - html = 'Score χ2'), + 'LR chi2' = c(latex = paste0('LR ', chisq), + html = paste0('LR ', chisq)), + 'Score chi2' = c(latex = paste0('Score ', chisq), + html = paste0('Score ', chisq)), 'Pr(> chi2)' = c(latex = 'Pr$(>\\chi^{2})$', - html = 'Pr(>χ2)'), + html = paste0('Pr(', htmlTranslate('>'), chisq, ')')), 'tau-a' = c(latex = '$\\tau_{a}$', - html = 'τa'), + html = paste0(htmlGreek('tau'), 'a')), 'gamma' = c(latex = '$\\gamma$', - html = 'γ'), + html = htmlGreek('gamma')), 'R2' = c(latex = '$R^{2}$', html = 'R2'), 'R2 adj' = c(latex = '$R^{2}_{\\textrm{adj}}$', @@ -1057,16 +1079,22 @@ 'gr' = c(latex = '$g_{r}$', html = 'gr'), 'max |deriv|' = c(latex = '$\\max|\\frac{\\partial\\log L}{\\partial \\beta}|$', - html = 'max |∂log L/∂β|'), + html = paste0('max ', vbar, partial, + 'log L/', partial, + beta, vbar)), 'mean |Y-Yhat|' = c(latex = 'mean $|Y-\\hat{Y}|$', - html = 'mean |Y - Ŷ|'), + html = paste0('mean ', vbar, 'Y - Y', + cca, vbar)), 'Unique Y' = c(latex = 'Unique $Y$', html = 'Unique Y'), 'Median Y' = c(latex = '$Y_{0.5}$', html = 'Y0.5'), '|Pr(Y>=median)-0.5|' = c(latex = '$|\\overline{\\mathrm{Pr}(Y\\geq Y_{0.5})-\\frac{1}{2}}|$', - html = '|Pr(Y ≥ median)-½|') + html = paste0('', vbar, + 'Pr(Y ', geq, ' median)-', + htmlSpecial('half'), vbar, + '')) ) @@ -1080,7 +1108,7 @@ plain = k[j], latex = latexTranslate(k[j], greek=TRUE), html = htmlTranslate (k[j], greek=TRUE) ) - + z[1 : length(k), i] <- paste0(k, fil, w[[i]]) } @@ -1094,7 +1122,8 @@ w <- htmlTable::htmlTable(z, header=labels, css.cell = 'min-width: 9em;', - align=al, align.header=al) + align=al, align.header=al, + escape.html=FALSE) w <- htmltools::HTML(paste0(w, '\n')) } return(w) @@ -1169,7 +1198,7 @@ w <- paste0('0.', paste0(rep('0', digits - 1), collapse=''), '1') f[s] <- switch(lang, latex = paste0('\\textless ', w), - html = paste0('<', w), + html = paste0(htmlTranslate('<'), w), plain = paste0('<', w)) } f @@ -1259,7 +1288,7 @@ } ## [.terms ignores offset variables. Above logic handles nested () unlike ## what is below - form <- deparse(form) + form <- paste(deparse(form), collapse='') # no string splitting if(delete.response) form <- gsub('.*~', '~', form) for(w in which) { pattern <- sprintf('\\+?[ ]*?%s\\(.*?\\)[ ]*?\\+{0,1}', w) ## assume additive form diff -Nru r-cran-rms-5.1-1/R/rms.s r-cran-rms-5.1-2/R/rms.s --- r-cran-rms-5.1-1/R/rms.s 2017-04-24 20:20:49.000000000 +0000 +++ r-cran-rms-5.1-2/R/rms.s 2017-09-29 20:50:57.000000000 +0000 @@ -42,8 +42,11 @@ ## prn(assume.code); prn(rmstrans.names); prn(term.label); prn(iaspecial); prn(class) ## Don't let >=i be translated to >i: rmst <- gsub('>=', '>>', rmstrans.names) + ## Don't let <=i be translated to >', '>=', w) + w <- gsub('<<', '<=', w) w <- gsub('@EQ@', '==', w) alt <- if(assume.code == 10) if(length(rmst) > 1) diff -Nru r-cran-rms-5.1-1/R/summary.rms.s r-cran-rms-5.1-2/R/summary.rms.s --- r-cran-rms-5.1-1/R/summary.rms.s 2017-03-25 18:34:46.000000000 +0000 +++ r-cran-rms-5.1-2/R/summary.rms.s 2017-12-04 03:09:43.000000000 +0000 @@ -277,7 +277,7 @@ { switch(prType(), latex = latex.summary.rms(x, ..., file='', table.env=table.env), - html = html.summary.rms(x, ...), + html = return(html.summary.rms(x, ...)), plain = { cstats <- dimnames(x)[[1]] @@ -361,7 +361,8 @@ htmlTable::htmlTable(cstats, caption=caption, ## css.cell = 'min-width: 6em;', css.cell=c('', rep('padding-left:4ex;', ncol(cstats))), - rowlabel='', align='r', align.header='r'), '\n')) + rowlabel='', align='r', align.header='r', + escape.html=FALSE))) } diff -Nru r-cran-rms-5.1-1/R/survplotp.npsurv.s r-cran-rms-5.1-2/R/survplotp.npsurv.s --- r-cran-rms-5.1-1/R/survplotp.npsurv.s 2016-12-11 13:49:18.000000000 +0000 +++ r-cran-rms-5.1-2/R/survplotp.npsurv.s 2017-12-04 00:29:15.000000000 +0000 @@ -31,7 +31,8 @@ if(length(mylim)) c(min(ylim[1], mylim[1]), max(ylim[2], mylim[2])) else ylim - mu <- markupSpecs$html + mu <- markupSpecs$html + nbsp <- htmlSpecial('nbsp') if(funtype %in% c('identity', 'inverse')) survdiffplotp <- @@ -177,7 +178,8 @@ pl <- function(p, x, y, n.risk=NULL, col, slev, type='est') { sname <- if(ns == 1) '' else slev snames <- if(sname == '') '' else paste0(sname, ' ') - d <- paste0('Difference
', mu$half(), ' ', conf.int, ' CL') + d <- paste0('Difference
', mu$half(), ' ', + conf.int, ' CL') nam <- switch(type, est = sname, lower = paste0(snames, conf.int, ' CL'), @@ -342,7 +344,7 @@ paste('/', tolower(units), sep='') haz <- round(nevents / totaltime, 4) txt <- paste(nevents, 'events') - if(aehaz) txt <- paste0(txt, '
   ', + if(aehaz) txt <- paste0(txt, '
', nbsp, nbsp, nbsp, htmlGreek('lambda'), '=', haz, un, sep='') z <- paste(paste0(sleva, ':', txt), collapse='
') diff -Nru r-cran-rms-5.1-1/R/validate.ols.s r-cran-rms-5.1-2/R/validate.ols.s --- r-cran-rms-5.1-1/R/validate.ols.s 2016-08-05 03:09:27.000000000 +0000 +++ r-cran-rms-5.1-2/R/validate.ols.s 2017-12-15 01:49:59.000000000 +0000 @@ -68,31 +68,34 @@ ols.fit <- function(x, y, tolerance=1e-7, backward, penalty.matrix=NULL, xcol=NULL, ...) - { - if(!length(x)) { - ybar <- mean(y) - n <- length(y) - residuals <- y - ybar - v <- sum(residuals^2)/(n-1) - return(list(coef=ybar, var=v/n, residuals=residuals, fail=FALSE)) - } - if(length(penalty.matrix) > 0) { - if(length(xcol)) { - xcol <- xcol[-1]-1 # remove position for intercept - penalty.matrix <- penalty.matrix[xcol, xcol, drop=FALSE] - } - fit <- lm.pfit(x, y, penalty.matrix=penalty.matrix, - tol=tolerance) - } - else { - fit <- lm.fit.qr.bare(x, as.vector(y), tolerance=tolerance, - intercept=TRUE, xpxi=TRUE) - if(backward) - fit$var <- sum(fit$residuals^2) * fit$xpxi/ - (length(y) - length(fit$coefficients)) + { + fail <- FALSE + if(!length(x)) { + ybar <- mean(y) + n <- length(y) + residuals <- y - ybar + v <- sum(residuals ^ 2) / (n - 1) + return(list(coef=ybar, var=v / n, residuals=residuals, fail=fail)) + } + if(length(penalty.matrix) > 0) { + if(length(xcol)) { + xcol <- xcol[-1] - 1 # remove position for intercept + penalty.matrix <- penalty.matrix[xcol, xcol, drop=FALSE] } - c(fit, fail=FALSE) + fit <- lm.pfit(x, y, penalty.matrix=penalty.matrix, + tol=tolerance) + if(any(is.na(fit$coefficients))) fail <- TRUE } + else { + fit <- lm.fit.qr.bare(x, as.vector(y), tolerance=tolerance, + intercept=TRUE, xpxi=TRUE) + if(any(is.na(fit$coefficients))) fail <- TRUE + if(backward) + fit$var <- sum(fit$residuals^2) * fit$xpxi/ + (length(y) - length(fit$coefficients)) + } + c(fit, fail=fail) + } predab.resample(fit.orig, method=method, fit=ols.fit, measure=discrim, pr=pr, B=B, bw=bw, rule=rule, type=type, sls=sls, aics=aics, @@ -228,24 +231,29 @@ z <- unclass(x) for(i in 1 : length(cdec)) z[, i] <- round(z[, i], cdec[i]) cat(htmlTable::htmlTable(z, rowlabel='Index', caption=caption, - css.cell = c('', rep('padding-left:3ex;', ncol(z) - 1)), - sep='\n')) + css.cell = c('', rep('padding-left:3ex;', + ncol(z) - 1)), + escape.html=FALSE), + sep='\n') cat('

\n') if(length(kept) && B > 0) { - varin <- ifelse(kept, '⚬', ' ') ## html medium white circle + varin <- ifelse(kept, htmlSpecial('mediumsmallwhitecircle'), ' ') nr <- nrow(varin) varin <- varin[1:min(nrow(varin), B),, drop=FALSE] cap <- 'Factors Retained in Backwards Elimination' if(nr > B) cap <- c(cap, paste('First', B, 'Resamples')) cat(htmlTable::htmlTable(varin, caption=cap, rnames=FALSE, - css.cell = c('', rep('padding-left:3ex;', ncol(varin) - 1))), + css.cell = c('', rep('padding-left:3ex;', + ncol(varin) - 1)), + escape.html=FALSE), sep='\n') cap <- 'Frequencies of Numbers of Factors Retained' nkept <- apply(kept, 1, sum) tkept <- t(as.matrix(table(nkept))) cat(htmlTable::htmlTable(tkept, caption=cap, rnames=FALSE, - css.cell = c('', rep('padding-left:3ex;', length(nkept) - 1)))) + css.cell = c('', rep('padding-left:3ex;', length(nkept) - 1)), + escape.html=FALSE)) } } diff -Nru r-cran-rms-5.1-1/src/lrmfit.f r-cran-rms-5.1-2/src/lrmfit.f --- r-cran-rms-5.1-1/src/lrmfit.f 2017-05-03 14:03:12.000000000 +0000 +++ r-cran-rms-5.1-2/src/lrmfit.f 2018-01-07 18:46:22.000000000 +0000 @@ -29,7 +29,7 @@ DOUBLE PRECISION opts(12),prc(4) DOUBLE PRECISION X(NOBS,NX),offset(NOBS) C Dimensions of X, penalt, wt not needed until inside LLOGIT - INTEGER IDX(nxin), R(NOBS), ftable(501,nvi-nxin+1), + INTEGER IDX(nxin), R(NOBS), ftable(5001,nvi-nxin+1), & numy(nvi-nxin+1), pivot(nvi) LOGICAL DVRG,ofpres,piter,normwt eps = opts(1) @@ -165,7 +165,7 @@ & C(nvi), LOGLIK, penalt(nvi,nvi), wt(nmax) DOUBLE PRECISION X(NMAX,nxm),offset(nmax) DOUBLE PRECISION lprob - INTEGER IDX(nxm),R(NMAX),ftable(501,KINT+1) + INTEGER IDX(nxm),R(NMAX),ftable(5001,KINT+1) LOGICAL DVRG,ofpres,calcc,normwt C Default initializations VIY = 0 @@ -217,7 +217,7 @@ C IF(calcc) THEN mid=kint1 / 2 - DO i=1, 501 + DO i=1, 5001 DO j=1, kint1 ftable(i,j)=0 ENDDO @@ -242,7 +242,7 @@ ENDDO cpiy=lprob(bx + off) IF(calcc) THEN - ipp=INT(500d0*cpiy + 1d0) + ipp=INT(5000d0*cpiy + 1d0) if(.NOT. normwt) incobs=INT(w + .5D0) ftable(ipp,iy + 1)=ftable(ipp,iy + 1) + incobs ENDIF @@ -282,7 +282,7 @@ ENDIF C COMPUTE EXCEEDENCE PROBABILITIES AND CHECK FOR DIVERGENCE IF(calcc) THEN - ipp=INT(500d0*lprob(bx + beta(mid) + off) + 1d0) + ipp=INT(5000d0*lprob(bx + beta(mid) + off) + 1d0) if(.NOT. normwt)incobs=INT(w + .5D0) ftable(ipp,iy + 1)=ftable(ipp,iy + 1) + incobs ENDIF @@ -353,7 +353,7 @@ END SUBROUTINE gcorr(ftable, kint, numy, nx, c, somer, & gamma, taua) - INTEGER ftable(501, kint + 1), numy(kint + 1) + INTEGER ftable(5001, kint + 1), numy(kint + 1) DOUBLE PRECISION fn, c, somer, gamma, taua, con, dis, tie, & k, ic, nn kint1=kint + 1 @@ -371,14 +371,14 @@ ENDDO DO i1=1,kint i1p1=i1 + 1 - DO j1=1,501 + DO j1=1,5001 k=ftable(j1,i1) IF(k .GT. 0d0) THEN j1p1=j1 + 1 DO i2=i1p1,kint1 ic=0d0 - if(j1.lt.501) then - DO j2=j1p1,501 + if(j1.lt.5001) then + DO j2=j1p1,5001 ic=ic + ftable(j2,i2) ENDDO ENDIF