Prediction in Cox regression I am doing a multivariate Cox regression, I have my significant independent variables and beta values. The model fits to my data very well. 
Now, I would like to use my model and predict the survival of a new observation.
I am unclear how to do this with a Cox model. In a linear or logistic regression, it would be easy, just put the values of new observation in the regression and multiply them with betas and so I have the prediction of my outcome.
How can I determine my baseline hazard? I need it in addition to computing the prediction.
How is this done in a Cox model?
 A: The basehaz function of survival packages provides the baseline hazard at the event time points. From that you can work your way up the math that ocram provides and include the ORs of your coxph estimates.
A: Following Cox model, the estimated hazard for individual $i$ with covariate vector $x_i$ has the form
$$\hat{h}_i(t) = \hat{h}_0(t) \exp(x_i' \hat{\beta}),$$
where $\hat{\beta}$ is found by maximising the partial likelihood, while $\hat{h}_0$ follows from the Nelson-Aalen estimator,
$$
\hat{h}_0(t_i) = \frac{d_i}{\sum_{j:t_j \geq t_i} \exp(x_j' \hat{\beta})}
$$ 
with $t_1$, $t_2, \dotsc$ the distinct event times and $d_i$ the number of deaths at $t_i$ 
(see, e.g., Section 3.6).
Similarly, 
$$\hat{S}_i(t) = \hat{S}_0(t)^{\exp(x_i' \hat{\beta})}$$
with $\hat{S}_0(t) = \exp(- \hat{\Lambda}_0(t))$ and
$$\hat{\Lambda}_0(t) = \sum_{j:t_j \leq t} \hat{h}_0(t_j).$$
EDIT:
This might also be of interest :-)
A: The whole point of the Cox model is the proportional hazard's assumption and the use of the partial likelhood.  The partial likelihood has the baseline hazard function eliminated.  So you do not need to specify one.  That is the beauty of it!
A: The function predictSurvProb in the pec package can give you absolute risk estimates for new data based on an existing cox model if you use R.
The mathematical details I cannot explain.
EDIT: The function provides survival probabilities, which I have so far taken as 1-(Event probability).
EDIT 2:
One can do without the pec package. Using only the survival package, the following function returns absolute risk based on a Cox model
risk = function(model, newdata, time) {
  as.numeric(1-summary(survfit(model, newdata = newdata, se.fit = F, conf.int = F), times = time)$surv)
}

A: Maybe you would also like to try something like this? Fit a Cox proportional hazards model and use it to get the predicted Survival curve for a new instance.
Taken out of the help file for the survfit.coxph in R (I just added the lines part)
# fit a Cox proportional hazards model and plot the  
# predicted survival for a 60 year old 
fit <- coxph(Surv(futime, fustat) ~ age, data=ovarian) 
plot(survfit(fit, newdata=data.frame(age=60)),
     xscale=365.25, xlab="Years", ylab="Survival", conf.int=F) 
# also plot the predicted survival for a 70 year old
lines(survfit(fit, newdata=data.frame(age=70)),
     xscale=365.25, xlab="Years", ylab="Survival") 

You should keep in mind though that for the proportional hazards assumption to still hold for your prediction, the patient for which you predict should be from a group that is qualitatively the same as the one used to derive the Cox proportional hazards model you used for the prediction.
