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

Can the value of S be a negative number? #145

Closed
LittleBeannie opened this issue Jul 5, 2024 · 1 comment
Closed

Can the value of S be a negative number? #145

LittleBeannie opened this issue Jul 5, 2024 · 1 comment
Labels

Comments

@LittleBeannie
Copy link
Collaborator

The following 2 calls of gsSurv give different outputs. Their differences lies in the values of S. I am wondering if we can input negative values to S.

According to the help file, we have S: a scalar or vector of durations of piecewise constant event rates specified in rows of lambda, eta and etaE; this is NULL if there is a single event rate per stratum (exponential failure) or length of the number of rows in lambda minus 1, otherwise.

library(gsDesign)

gsSurv(
  k = 4, sfl = sfPower, sflpar = .5, lambdaC = log(2) / c(6, 9), hr = .5,
  eta = log(2) / c(40, 50), S = 5, gamma = 1, T = 36, minfup = 12
) |> gsBoundSummary()

gsSurv(
  k = 4, sfl = sfPower, sflpar = .5, lambdaC = log(2) / c(6, 9), hr = .5,
  eta = log(2) / c(40, 50), S = -5, gamma = 1, T = 36, minfup = 12
) |> gsBoundSummary()
@LittleBeannie
Copy link
Collaborator Author

I talked with Keaven and learned that S should be a positive number, since they are intervals. We may have some input checking in Q3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant