246:0
     +ˆÃ�þDë‹6V_‘¸ð ð?ŸÍ630ÌÄÊ v    +  Øxœ‹àb```f`abd`f2XCCÜt-€bÂ ó1‹ ±(ó�øöï>®üý<§ÛþE”ÌCu¸ø¶[,#’ì—üý¼Íuái 90ýŒ`‹€6�Ù,œ@š-'µ,5§È€8,Ê˜c$ÁÉhY“s‹aúà¦¥%&—äYÿ�ì…b�vÆÿPL0sa'ˆ
¦ÿøÌDuB^bn*Ì	¬pÁÒÜxCdŽ2ÇÆšŠPâá°Ÿ+%±$Q/­hšýœEùåz07€=Û $þÿÿÿäX Î[=�  ðxœ‹àb```f`abd`f2XCCÜt-€bÂ ó131X1TŽˆÙ�˜ˆ9�d7T=ˆ¶Ô®ÍÄã¹ËþêÂSš…òíOÅ™Ú×¼�hÿ°âÊßÏÛÜìßÝ©°b¨ö²âÊ?û—·•.<Mp²?5_Ù‰-–öW,#’|/ÛoéÊ(¶|¬Áþñ±åïçnÒ…ÛsÙX¿ƒØ¿ª.Ú hÿTnGàëVyûC¾—>®üýÜ�Ä•ÛaÿêŽŽÉ%{²ê~Ù?ü¼Íuá©ƒöÏ6(™½ô±ýF�sþ~±Vô6r8 c&4ÌŒŠY˜ÀêXÀáÃ–“Z–šSd	@‚,Ê˜c$ÁÉhY“s‹aúà¦¥%&—äYÿÐÜÇD<²†ñ?Ôd&˜ýŽ0†DÓ|v£:5/17æTV¸`in¼!2Ç™cã ME(qŒpØÏ•’X’¨—V´Í~Î¢ür=˜@�ÂÔ $þÿÿÿäX @Ä�¼  N   -ˆl–Ãa¾”J_)â‚À¹q·Å£‘äÇò 8àdq˜ÊÔ…•ŸçÎƒh¹Ía–Ãa¾”J_)â‚À¹q·Å£Ì      -8:3
      /ˆ¿‘äÇò 8àdq˜ÊãN6çóÏƒh¹Î¾Ì      /8:17
     1ˆÇ�þ\”7+MG)[xÏÏƒ®¹Î¾Ì ð    1## From John.Stickley@bch.nhs.uk

require(rms)

test_data <-
structure(
    list(group = structure( c(1L, 2L, 2L, 1L, 2L, 1L, 2L,
        1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L,
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 1L,
        2L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L),
    .Label = c("a", "b"), class = "factor"),
    survival = c(17.46772065, 98.92209528,78.29864249, 9.822413669, 79.55050186, 82.36595474, 1.42766417,
                71.48805748, 61.33571345, 84.62631825, 93.03022837, 44.04354499,
                81.06711649, 26.19891261, 68.64477557, 52.2160246, 17.780942,
                4.515968877, 95.46066172, 73.63010059, 40.13833451, 20.39467002,
                50.80529216, 70.23087236, 23.89309088, 53.86527662, 3.422234859,
                35.30675488, 50.07307746, 4.68602929, 86.04636345, 72.98976535,
                33.18048902, 37.94566436, 83.17678398, 16.95356411, 80.5844794,
                8.599290846, 46.06581857, 1.644574571, 34.81582745, 49.96017595,
                11.74200883, 60.07697075, 80.40946019, 55.00705828, 17.75483404,
                98.69523629, 68.15668013, 4.959304343),
    outcome = c(0L, 0L, 0L,0L, 0L, 0L, 1L, 0L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 1L, 0L, 1L, 0L,
                    1L, 0L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 0L, 0L, 1L, 1L, 0L, 1L, 0L,
                    1L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L)),
    .Names = c("group", "survival", "outcome"), class = "data.frame",
    row.names = c(NA, -50L))

table(test_data$group)
s <- npsurv(Surv(survival, outcome) ~ group, data = test_data)
s$n.risk[c(1, s$strata['group=a'] + 1)]

survplot(s, conf='none', lwd=2, lty=c(1,1,1), n.risk=TRUE, time.inc=5,
         label.curves=FALSE, cex.lab=1.75)

  0   3ˆÇ�þB!Æ³r´Ôr•°�—�üÿÏƒi×_Î_�$å¤ÄyZ™(ZÉ%5¿Í «    3require(rms)
tt <- function() {
  dp <- function(...) {
    pdf('/tmp/z.pdf')
    print(...)
    dev.off()
  }
n <- 350     # define sample size
set.seed(17) # so can reproduce the results
age            <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol    <- rnorm(n, 200, 25)
sex            <- factor(sample(c('female','male'), n,TRUE))
label(age)            <- 'Age'      # label is in Hmisc
label(cholesterol)    <- 'Total Cholesterol'
label(blood.pressure) <- 'Systolic Blood Pressure'
label(sex)            <- 'Sex'
units(cholesterol)    <- 'mg/dl'   # uses units.default in Hmisc
units(blood.pressure) <- 'mmHg'

# Specify population model for log odds that Y=1
L <- .4*(sex=='male') + .045*(age-50) +
  (log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male')) +
  .01 * (blood.pressure - 120)
# Simulate binary y to have Prob(y=1) = 1/[1+exp(-L)]
y <- ifelse(runif(n) < plogis(L), 1, 0)

ddist <<- datadist(age, blood.pressure, cholesterol, sex)
options(datadist='ddist')

fit <- lrm(y ~ blood.pressure + sex * (age + rcs(cholesterol,4)),
               x=TRUE, y=TRUE)
an <- anova(fit)
# Plot effects in two vertical sub-panels with continuous predictors on top
# ggplot(Predict(fit), sepdiscrete='vertical')
# Plot effects of all 4 predictors with test statistics from anova, and P
dp(ggplot(Predict(fit), anova=an, pval=TRUE))
#