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")