Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong calculation of accrual intensity for fixed sample survival design #23

Closed
fpahlke opened this issue Feb 23, 2024 · 1 comment
Closed

Comments

@fpahlke
Copy link
Contributor

fpahlke commented Feb 23, 2024

Example where $accrualIntensity is wrong

What I get

I’m trying to find the absolute accrual intensity (number recruited per time unit) when
recruitment is twice as fast in the second period as the first.

sampleSize <- getSampleSizeSurvival(alpha = 0.025, 
    sided = 1, 
    beta = 0.1,
    hazardRatio = 0.7, 
    lambda2 = log(2) / 9,
    accrualTime = c(0, 3, 12),
    accrualIntensity = c(0.1, 0.2),
    accrualIntensityType = "relative",
    followUpTime = 6)
sampleSize$accrualIntensity

[1] 215.90555 53.97639

What I expect

...so doing this manually for now

m <- sampleSize$maxNumberOfSubjects

Accrual per month during first 3 months

m / (3 * 0.1 + 9 * 0.2) * 0.1

[1] 30.84365

Accrual per month during months 4 to 9

m / (3 * 0.1 + 9 * 0.2) * 0.2

[1] 61.6873

@fpahlke
Copy link
Contributor Author

fpahlke commented Feb 23, 2024

We fixed the issue. The accrual intensity now will be calculated correctly and we added a new test case to out unit tests.

@fpahlke fpahlke closed this as completed Feb 23, 2024
fpahlke added a commit that referenced this issue Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant