This is when you get when you run the first example in ?cph of the rms-package: n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age" sex <- factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens <- 15*runif(n) h <- .02*exp(.04*(age-50)+.8*(sex=='Female')) dt <- -log(runif(n))/h label(dt) <- 'Follow-up Time' e <-...

r,survival-analysis,cox-regression

Please read the help page for predict.coxph. None of those are supposed to be probabilities. The linear predictor for a specific set of covariates is the log-hazard-ratio relative to a hypothetical (and very possibly non-existent) case with the mean of all the predictor values. The 'expected' comes the closest to...

r,plot,logistic-regression,spline,cox-regression

If you want the Odds ratio then you need to add a fun=-argument to transform to the odds ratio scale: plot(Predict(fit,fun=exp), anova=an, pval=TRUE, ylab="Odds ratio") I'm not sure I know what you mean by changing to the "probability of mortality", and "mortality rate" for "fit". The inverse logit function is...

Check if sum(y<=0). The code in the function says it will return that error if y's equal 0 as well. Code is here, error you're referencing is on line 5: https://github.com/jeffwong/glmnet/blob/master/R/coxnet.R...

r,confidence-interval,cox-regression

As per @shadow's comment, the CI of the parameter estimate is based on the whole dataset, if you want age conditional CI's you need to subset your data. If instead you want to generate expected survival curves conditional on a set of covariates (including age) this is how you do...

r,segmentation-fault,stack-overflow,cox-regression

I am able to make a Poisson model with that dataset. (I've got a large dataset that I'm unwilling to risk a probable segfault on.) fit <- glm( I(status == 0) ~ litter +offset(log(time)), data = data, family=poisson) > fit Call: glm(formula = I(status == 0) ~ litter + offset(log(time)),...