In r, when predicting with newdata=data.frame(1) what does it mean? My here and now question relates to a weibul model with survreg, but my question is more general about r's predict().
Example:
library(tidyverse)
library(survreg)

# weibul model with survreg and veteran data
weibul_model <- survreg(Surv(time = time, event = status) ~ 1, data = veteran, dist = 'weibull')

# expected value? Or what?
predict(weibul_model, newdata = data.frame(1))
predict(weibul_model, newdata = data.frame(10))
predict(weibul_model, newdata = data.frame(100))
predict(weibul_model, newdata = data.frame(1000))

All 4 calls to predict return the exact same number, 120.6804.
What is this number, how do I interpret it?
 A: First, your model does not include any covariates, so the predictions do not change when you change the value of any covariates in newdata.  You are creating newdata and not specifiying what the 1, 10 or 100, 1000 are, which is fine because R is not looking for any covariate when it makes predictions in this case. If the model included a covariate such as age, then the newdata should include a variable called age.
Back to what the 120.6804 means. I don't know if anybody understands exactly what that is, it is not the predicted mean survival time.
see here for an explanation by Terry M Therneau, the author of survreg
The fitted model parameters in your case are:
Coefficients:
(Intercept)
4.793146
Scale= 1.173592
You can look up in the documentation of survreg.distributions:
survreg scale parameter maps to 1/shape, linear predictor to log(scale)
You can find quantiles (such as the median predicted survival time) using either predict with type ="quantile" or directly using qweibull plugging in the appropriate estimated parameters for the distribution:
qweibull(c(0.1,0.5,0.9),shape = 1/1.173592,scale = exp(4.793146))
predict(weibul_model, newdata = data.frame(10),type="quantile",p=c(0.1,0.5,0.9))
Both of those lines will give you the same predicted quantiles:
8.603183  78.492961 321.166461
That means, the model predicts there is a 10% chance of suriviving less than 8.6 units of time, the median time is 78.49, and there is a 10% chance of suriving more than 321.17 units of time.  If you want to find the predicted mean survival time, you can look up the formula for the mean of the Weibull distribution and make sure you plug in the correct parameters.  That will be close to 131, which you can find by simulating 100,000 random variables from the distribution this way:
mean(rweibull(100000,shape = 1/1.173592,scale = exp(4.793146)))
