Merck / Merck/gsDesign2

Typo in documentation for gs_cp_npe1.R

Open Beginner friendly
#665 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
34
Forks
11
Avg merge
2d 14h
Merged PRs (30d)
7

Description

The current documentation reads:

> #' Returned value is
> #' \deqn{P(Z_j > z_j \mid Z_i = z_i) = 1 - \Phi\left(\frac{z_j - \sqrt{t}z_i - \sqrt{I_j}(\theta_j - \theta_i\sqrt{t})}{\sqrt{1 - t}}\right)}
> #'
> #' @param theta A numeric vector of length two, which specifies the natural parameter for treatment effect.
> #' The first element of `theta` is the treatment effect of an interim analysis i.
> #' The second element of `theta` is the treatment effect of a future analysis j.
> #' @param info A vector of length two, which specifies the statistical information under the treatment effect `theta`.
> #' @param zi Numeric scalar z-value observed at analysis \eqn{i}.
> #' @param zj Numeric scalar at the future analysis \eqn{j}.
> #' @return A scalar with the conditional power \eqn{P(Z_j > z_i \mid Z_i = z_i)}.

I believe that the last line needs to be updated to
> #' @return A scalar with the conditional power \eqn{P(Z_j > **z_j** \mid Z_i = z_i)}.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open gs_cp_npe1.R and locate the roxygen documentation for the conditional power return value. Verify the final expression against the preceding formula, then correct the referenced z-value in the documentation. Done means the generated documentation reflects the corrected expression.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
92/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.