What is censoring distribution and how to get it from accruing period, follow-up period and stopping time of trial? I am reading Dirk Moore's Applied Survival Analysis 11.8 Example 11.1 on page 173. The book is trying to simulate power of logrank test. I cannot see the book's conclusion on censoring distribution. The book first find Weibull distribution fit for year 4 and year 8 survival data of prostateSurvival in asaur package. Then it generates control and intervention survival distribution by fixed hazard ratio with proportional hazard assumption.
"...Here, let us accrue patients over three years, and
follow them for an additional seven years. For now we shall assume that the accrual
will follow a uniform distribution. This leads to the censoring distribution being
uniform, with a minimum of five years (for a patient entering at the end of the
accrual period) and a maximum of eight years (for a patient entering at the start of
the trial)..."
The first sentence says accrual period=3 years and follow-up=7 years. Assuming patient entering the trial in uniform time over first 3 years and this entering time should be uniform between 0 and 3.

*

*Where is 5 year (for a patient entering at the end of the accrual period) coming from? It should be 3 years from my understanding. 8 years is due to stopping trial at year 8.


*If I set $T$ as time of a patient entering the trial during accrual period, it should be uniform between 0 and 3. Let $T_S$ be the of survival time of this patient which follows some distribution. Then $T+T_S$ is not necessarily uniformly distributed. What is the censoring distribution definition here? Why we can assume censoring is "uniformly distributed" between 5 and 8 here? Is it the joint distribution $(T+T_S,T+T_S<T_{cutoff})$ where $T_{cutoff}$ is the end of the trial?

The simplest explanation for your first question is that the "seven"  in "an additional seven years" is a misprint and should have been "five." Such things happen. What follows assumes that was a misprint.
For the second question, the issue is the distribution of censoring times. The assumption seems to be no loss to follow-up during the study, with all cases censored at the end if there has been no event. Those with events ($T+T_S \le T_{\text{cutoff}}$ in your terminology) do not contribute to the distribution of censoring times. All those censored thus have censoring times between 5 and 8 years.
You do have one related point. If you have uniform accrual of all cases and randomly remove the cases with events, what's left for censored cases won't be a uniform accrual in any one instance. Averaged over many hypothetical study instances as for this power estimate (1000 instances in the book's example), and with random "accrual" of individuals who do and don't experience events, however, the effect should be a uniform distribution of censoring times between the limits of 5 and 8 years. I can't say that it will be exactly uniform (perhaps someone else can show that), but it will be close enough for a useful power analysis--particularly given all the other assumptions that necessarily must be made.
