# COX model with Lasso using one dataset and predicting in a different dataset

I am very new to R. I am performing Cox model with LASSO variable selection in one group. I am using the coefficients of the selected variables and apply to another dataset. My goal is to produce and compare predicted probabilities between cases and controls. My codes below are working but I want to make sure what I am getting are correct. It looks like 'predict' function gives xBeta (linear predictor) and not expected survival probability. Can someone let me know if it's possible to produce expected survival probability based on the model estimates? thanks!

cv.fit <- cv.glmnet(x, y, family="cox", standardize=T, alpha=1)

# predicted values for controls (original train model)
pred_controls <- predict(cv.fit, s=cv.fit$lambda.1se, newx=x, type="link") # predicted values for cases (test model) pred_cases <- predict(cv.fit, s=cv.fit$lambda.1se, newx=newX, type="link")


If you change type into response, basically it's the exponential of linear predictor, the result is a relative risk of survival outcome.
However, the Cox model itself cannot give you the S0, you need another method to estimate the S0, for example, fitting you covariate with beta into a coxph model with initial covariates and then estimate baseline with basehaz. From this post: How to estimate baseline hazard function in Cox Model with R