I am wanting to estimate marginal survival probabilities for the effect of an exposure (I've attached some dummy data and code).
When I stset the data as time on-study as the time scale, rather then age as the time scale, I can obtain marginal estimates using standsurv nicely.
But I don't understand what is happening when I try to do the same thing with the data stset using age as the time scale. I end up with estimates of zero. What is happening under the hood with standsurv when it is trying to predict when age is time that causes this? And is there any way to obtain similar marginal survival probabilities as for that with time on-study as the scale? (I'd like a plot with age on the x axis showing the change in marginal survival probabilities over time for the exposure)
Thanks
When I stset the data as time on-study as the time scale, rather then age as the time scale, I can obtain marginal estimates using standsurv nicely.
But I don't understand what is happening when I try to do the same thing with the data stset using age as the time scale. I end up with estimates of zero. What is happening under the hood with standsurv when it is trying to predict when age is time that causes this? And is there any way to obtain similar marginal survival probabilities as for that with time on-study as the scale? (I'd like a plot with age on the x axis showing the change in marginal survival probabilities over time for the exposure)
Thanks