Skip to contents

Fits a logistic working model, \(\mathrm{logit}\,\Pr(Y_i=1\mid x_i) = x_i^\top\hat\beta\), for an incidence outcome using treatment and, optionally, all recorded covariates, then estimates the marginal (standardized) risk ratio \(\mathrm{RR} = \overline{\mathrm{risk}}_1 / \overline{\mathrm{risk}}_0\) by G-computation: setting every subject's treatment indicator to 1 (respectively 0) while holding their other observed covariates fixed, averaging the model-implied risk over the empirical covariate distribution under each counterfactual, and taking the ratio — see gcomp_logistic_point_estimate_cpp for the exact standardization formula (mean1/mean0). The estimate, its confidence intervals and delta are on the ratio scale (delta = 1, the default, is no effect). InferenceIncidLogRegr with set_estimand("marginal_ratio") computes the same standardized risk ratio from the same logistic model but reports its log (estimate, intervals and delta all on the log scale, delta = 0 no effect), so its estimate is log() of this class's. Bootstrap/jackknife inference on this estimand is generally done on the log risk-ratio scale internally (see $compute_bootstrap_confidence_interval(), $compute_bayesian_bootstrap_confidence_interval(), and the jackknife-Wald methods, whose "basic"/"wald" interval types route through log-scale-specific helpers for this estimand), then back-transformed, since ratio estimators are typically closer to normally distributed on the log scale. Wald inference uses the fitted logistic model's sandwich covariance and the delta method on the log risk-ratio scale. This standard error conditions on the observed covariates used for standardization: it quantifies uncertainty in the fitted coefficients for the sample-conditional standardized risk ratio, and does not add sampling variability from a target population's covariate distribution. Bootstrap, randomization, and jackknife methods remain available. likelihood_tier = "none" means that this class does not provide likelihood-ratio or score tests; it does not preclude its Wald inference.

Uses the shared nonparametric bootstrap distribution contract; see InferenceNonParamBootstrap.

Computes a bootstrap confidence interval for the treatment effect.

Computes a bootstrap two-sided p-value for the treatment effect.

Computes a Bayesian-bootstrap two-sided p-value for the treatment effect.

Computes a Bayesian-bootstrap confidence interval for the treatment effect.

Computes a jackknife-Wald two-sided p-value for the treatment effect.

Computes a jackknife-Wald confidence interval for the treatment effect.

Computes a PRW subsampling two-sided p-value for the treatment effect. For the risk ratio the p-value is symmetric (v1.0.6-TODO-230): the share of usable pivot draws \(\sqrt{b}(\log\widehat{RR}^* - \log\widehat{RR})\) at least as large in absolute value as \(\sqrt{n}(\log\widehat{RR} - \log\delta)\), floored at \(1/B\), because the small-sample law of \(\log\widehat{RR}^*\) is skewed toward the observed effect and the equal-tailed rule doubled that heavy tail. Null size at n = 80, nominal 0.05, equal-tailed to symmetric: subsampling 0.040 to 0.055 (KK 0.015 to 0.045), m-out-of-n 0.030 to 0.035 (KK 0.010 to 0.015). The risk difference keeps the equal-tailed p-value. See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

Computes a PRW subsampling confidence interval for the treatment effect.

Computes an m-out-of-n bootstrap two-sided p-value for the treatment effect. For the risk ratio the p-value is symmetric (v1.0.6-TODO-230): the share of usable pivot draws \(\sqrt{m}(\log\widehat{RR}^* - \log\widehat{RR})\) at least as large in absolute value as \(\sqrt{n}(\log\widehat{RR} - \log\delta)\), floored at \(1/B\), because the small-sample law of \(\log\widehat{RR}^*\) is skewed toward the observed effect and the equal-tailed rule doubled that heavy tail. Null size at n = 80, nominal 0.05, equal-tailed to symmetric: subsampling 0.040 to 0.055 (KK 0.015 to 0.045), m-out-of-n 0.030 to 0.035 (KK 0.010 to 0.015). The risk difference keeps the equal-tailed p-value. See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

Computes an m-out-of-n bootstrap confidence interval for the treatment effect.

Value

A numeric vector of bootstrap estimates.

Details

Bayesian-bootstrap intervals. The type = "studentized" ("bootstrap-t") interval of $compute_bayesian_bootstrap_confidence_interval() is studentized on the raw risk-ratio scale and undercovers in small samples: in a simulation with a logistic outcome model, two covariates and a true risk ratio of about 1.4, a nominal 95% interval covered about 89% of the time at \(n = 60\) and about 93% at \(n = 200\). Large replicate estimates come with large replicate standard errors, which compresses the upper tail of the pivot, so the interval misses mostly on one side (the true ratio falls below the lower bound). For small samples prefer type = "symmetric-percentile-t", a symmetric studentized interval built on the log risk-ratio scale and back-transformed (about 92% in the same simulation, against 90% for "studentized"), or the log-scale type = "wald" or type = "basic" intervals or type = "percentile". "symmetric-percentile-t" is available only for the risk-ratio classes.

Separation. When the logistic working model's fitted probabilities are numerically 0 or 1 (the data look (quasi-)completely separated) the working-model MLE does not exist and the fitted risks sit where the fitter stopped. The class then raises one warning of class edi_logistic_separation_warning per object (silent inside resampling); the returned values are unchanged. A randomization test or an exact incidence method is safer there.

Subsampling and m-out-of-n. The subsampling and m-out-of-n bootstrap p-values and intervals use the log-scale pivot \(\sqrt{b}(\log\widehat{RR}^* - \log\widehat{RR})\). At the default size \(b = m = \lfloor n^{0.7} \rfloor\) (21 at \(n = 80\)) a draw has only a few events per arm, so with non-negligible probability it is degenerate: (i) an arm of the draw has no events or only events, (ii) the logistic fit reports that it did not converge, or (iii) the fit is (quasi-)separated, i.e. some fitted probability is numerically 0 or 1 (\(|x_i^\top\hat\beta| \ge \mathrm{logit}(1 - 10^{-8})\), the criterion of the separation warning). A degenerate draw's log risk ratio is about \(\pm 20\), where the fitter stopped. Subsampling estimates the sampling law of the estimator at size \(b\) and relies on it being close to the law at size \(n\) (Politis, Romano and Wolf 1999, Theorem 2.2.1; 2001); at small \(b\) that law puts a few percent of its mass on these atoms, which land in the tail the test uses and put a floor of about twice their fraction under the p-value. Kept, they made the tests almost never reject (null size 0.005 for subsampling and 0.000 for m-out-of-n at \(n = 80\), nominal 0.05). Degenerate draws are therefore unusable: the approximate_subsampling_distribution_beta_hat_T() and approximate_m_out_of_n_bootstrap_distribution_beta_hat_T() replicates are NaN for them. If fewer than min_fraction_usable_samples (default 0.8) of the B draws are usable (not degenerate and not failed), the p-value or interval is NA, the reason ("subsampling_too_few_usable_draws_fraction" or "m_out_of_n_too_few_usable_draws_fraction") is recorded and one warning of class edi_procedure_na_warning is raised (silent inside resampling); otherwise the usable draws are used. In a null simulation at \(n = 80\) (200 data sets, event rate about 0.41, B = 199) dropping the degenerate draws alone gave null sizes of 0.040 (subsampling) and 0.030 (m-out-of-n). The default cap is 0.8 rather than the 0.95 of the ordinary bootstrap's na.rm = TRUE rule because degenerate draws pile up in the data sets where \(\log\widehat{RR}\) is extreme, which are the ones a test should reject: in the same simulation a cap of 0.95 returned NA for 9% (subsampling) and 29% (m-out-of-n) of the null data sets, including 7 and 9 of the 11 where the Wald test rejects, and the size among the rest fell to 0.016 and 0.000 (0.90: NA for 2% and 5%, size 0.031 and 0.011); at 0.8 no data set was NA and the sizes stayed 0.040 and 0.030. Set min_fraction_usable_samples higher to return NA sooner, or lower (down to 0) to use whatever usable draws there are. The p-value is symmetric (since v1.0.6-TODO-230): with the pivot draws \(T^*_j = \sqrt{b}(\log\widehat{RR}^*_j - \log\widehat{RR})\) (\(\sqrt{m}\) for m-out-of-n) and \(t = \sqrt{n}(\log\widehat{RR} - \log\delta)\), it is the share of usable draws with \(|T^*_j| \ge |t|\) (at least \(1/B\)), not the equal-tailed \(2\min\{P(T^* \le t), P(T^* \ge t)\}\). At small \(b\) the law of \(\log\widehat{RR}^*\) is skewed toward the observed effect: in a data set with an extreme estimate one arm has few events, so the draws have a heavy tail on the side of \(t\) and almost none on the other side, and the equal-tailed rule doubles that heavy tail. Null size at \(n = 80\) (200 data sets, B = 199, nominal 0.05, Wald 0.055 / 0.050): InferenceIncidGCompRiskRatio subsampling 0.040 to 0.055 and m-out-of-n 0.030 to 0.035; InferenceIncidKKGCompRiskRatio 0.015 to 0.045 and 0.010 to 0.015 (its m-out-of-n pivot is about 15% wider than the Wald scale, so it stays conservative). The confidence intervals are unchanged (basic, equal-tailed quantiles of the same pivot), so a p-value and an interval can disagree at the boundary. For the risk ratio the ordinary bootstrap (compute_bootstrap_two_sided_pval(), compute_bootstrap_confidence_interval()) is the recommended resampling method: the estimator is smooth, the \(n\)-out-of-\(n\) bootstrap is consistent, and resampling fewer than \(n\) units only adds these small-sample failures. Firth-penalized fits inside the draws are planned as an option.

Small-sample behaviour

How fast the size (and coverage) error of each procedure is expected to vanish as the effective sample size \(n_{eff}\) grows, from EDI's convergence-rate registry (inference_convergence_expectation()). Exact procedures are valid at every n by construction; the others are asymptotic, so a small-sample excess is expected, and its constant is not given by an order. The table is the expectation for a balanced complete-randomization design; it is not a measured size. Reference keys are explained under References.

ProcedureRegimeError orderEffective nRegularityBasisReferences
randfinite sampleexacteventsregulartheory[Fisher1935], [LehmannRomano2005]
waldasymptotic\(O(n_{eff}^{-1})\)eventsregularassumed default[Hall1992]
jackknifeasymptotic\(O(n_{eff}^{-1})\)eventsregularassumed default[ShaoTu1995]
bootstrapasymptotic\(O(n_{eff}^{-1})\)eventsregularassumed default[Hall1992]
bayes_bootasymptotic\(O(n_{eff}^{-1})\)eventsregularassumed default[Rubin1981], [Lo1987]
rand_bootstrapasymptotic\(O(n_{eff}^{-1})\)eventsregularassumed default[Hall1992], [Kallus2018]

The point estimate's bias is of order \(O(n_{eff}^{-1})\) (assumed default: [CoxSnell1968]).

Rows with basis assumed default: the order shown is the procedure's rate in a regular parametric model, and the cited works establish it for that case only. EDI has not derived it for this class.

Blocking designs

On a blocking design (DesignFixedBlocking and relatives) the regression-type inference classes do not add block fixed effects (or block-by-treatment interactions) automatically: the model uses only the covariate matrix. Whether the blocks enter the regression therefore depends on how they were supplied: not at all with m=; as dummies when the blocking column is a factor/character (or few-level integer) covariate; as a single linear term when it is numeric. Randomization, bootstrap and jackknife inference are block-aware regardless; only the model-based (asymptotic, likelihood) path ignores the blocks.

When the proportion treated is the same in every block, the pooled treatment estimate of a linear model is unbiased and its model-based SE is conservative (it is inflated by the block variation it fails to remove), at a cost in power. If the proportion treated differs across blocks (for example equal_block_sizes = FALSE with very small blocks and an extreme prob_T, where per-block rounding changes the allocation, or a user-supplied m), the pooled treated-vs-control comparison is confounded by block (Simpson's paradox) and can be biased; then include the blocking covariate(s) explicitly as factor covariates. For non-linear models (GLM, ordinal, survival) omitting blocks changes the estimand to a block-marginal effect. See DesignFixedBlocking.

References

[Fisher1935] Fisher, R. A. (1935). The Design of Experiments. Oliver and Boyd.

[LehmannRomano2005] Lehmann, E. L., and Romano, J. P. (2005). Testing Statistical Hypotheses (3rd ed.). Springer.

[Hall1992] Hall, P. (1992). The Bootstrap and Edgeworth Expansion. Springer.

[ShaoTu1995] Shao, J., and Tu, D. (1995). The Jackknife and Bootstrap. Springer.

[Rubin1981] Rubin, D. B. (1981). "The Bayesian Bootstrap." The Annals of Statistics, 9(1), 130-134.

[Lo1987] Lo, A. Y. (1987). "A Large Sample Study of the Bayesian Bootstrap." The Annals of Statistics, 15(1), 360-375.

[Kallus2018] Kallus, N. (2018). "Optimal a priori balance in the design of controlled experiments." Journal of the Royal Statistical Society: Series B, 80(1), 85-112. Section 5 ("Algorithms for inference"), Algorithm 4.

[CoxSnell1968] Cox, D. R., and Snell, E. J. (1968). "A General Definition of Residuals." Journal of the Royal Statistical Society: Series B, 30(2), 248-265 (discussion 265-275).

See also

InferenceIncidGCompRiskDiff for the risk-difference version of this same standardized logistic working model.

Super class

Inference -> InferenceIncidGCompRiskRatio

Methods

+ inherited public methods from Inference


InferenceIncidGCompRiskRatio$approximate_bootstrap_distribution_beta_hat_T()

Usage

InferenceIncidGCompRiskRatio$approximate_bootstrap_distribution_beta_hat_T(
  B = 501,
  show_progress = TRUE,
  debug = FALSE,
  bootstrap_type = NULL
)

Arguments

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

debug

Whether to return diagnostics.

bootstrap_type

Optional resampling scheme.

bootstrap_type

Optional empirical-resampling scheme.

bootstrap_type

Optional empirical-resampling scheme.


InferenceIncidGCompRiskRatio$compute_bootstrap_confidence_interval()

Usage

InferenceIncidGCompRiskRatio$compute_bootstrap_confidence_interval(
  alpha = 0.05,
  B = 501,
  type = NULL,
  na.rm = TRUE,
  show_progress = TRUE,
  min_number_usable_samples = 5L
)

Arguments

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.


InferenceIncidGCompRiskRatio$compute_bootstrap_two_sided_pval()

Usage

InferenceIncidGCompRiskRatio$compute_bootstrap_two_sided_pval(
  delta = NULL,
  B = 501,
  type = "symmetric",
  na.rm = FALSE,
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  min_fraction_usable_samples = 0.95
)

Arguments

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.


InferenceIncidGCompRiskRatio$compute_bayesian_bootstrap_two_sided_pval()

Usage

InferenceIncidGCompRiskRatio$compute_bayesian_bootstrap_two_sided_pval(
  delta = NULL,
  B = 501,
  type = NULL,
  na.rm = FALSE,
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  weighting_unit_type = NULL,
  min_fraction_usable_samples = 0.95
)

Arguments

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

weighting_unit_type

Optional resampling unit override.

weighting_unit_type

Optional resampling unit override.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.


InferenceIncidGCompRiskRatio$compute_bayesian_bootstrap_confidence_interval()

Usage

InferenceIncidGCompRiskRatio$compute_bayesian_bootstrap_confidence_interval(
  alpha = 0.05,
  B = 501,
  type = NULL,
  na.rm = TRUE,
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  weighting_unit_type = NULL
)

Arguments

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

na.rm

Whether to remove non-finite bootstrap replicates.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

weighting_unit_type

Optional resampling unit override.

weighting_unit_type

Optional resampling unit override.


InferenceIncidGCompRiskRatio$compute_jackknife_wald_two_sided_pval()

Usage

InferenceIncidGCompRiskRatio$compute_jackknife_wald_two_sided_pval(
  delta = NULL,
  unit = "auto"
)

Arguments

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

unit

Deletion unit. Default "auto".

unit

Deletion unit. Default "auto".


InferenceIncidGCompRiskRatio$compute_jackknife_wald_confidence_interval()

Usage

InferenceIncidGCompRiskRatio$compute_jackknife_wald_confidence_interval(
  alpha = 0.05,
  unit = "auto"
)

Arguments

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

unit

Deletion unit. Default "auto".

unit

Deletion unit. Default "auto".


InferenceIncidGCompRiskRatio$compute_subsampling_two_sided_pval()

Usage

InferenceIncidGCompRiskRatio$compute_subsampling_two_sided_pval(
  delta = NULL,
  B = 501,
  b = NULL,
  type = "centered",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  subsampling_type = NULL,
  min_fraction_usable_samples = 0.8
)

Arguments

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

b

Subsample size. See InferenceNonParamBootstrap$compute_subsampling_two_sided_pval.

b

Subsample size. See InferenceNonParamBootstrap$compute_subsampling_confidence_interval.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

subsampling_type

Optional empirical-resampling scheme.

subsampling_type

Optional empirical-resampling scheme.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.


InferenceIncidGCompRiskRatio$compute_subsampling_confidence_interval()

Usage

InferenceIncidGCompRiskRatio$compute_subsampling_confidence_interval(
  alpha = 0.05,
  B = 501,
  b = NULL,
  type = "basic",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  subsampling_type = NULL,
  min_fraction_usable_samples = 0.8
)

Arguments

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

b

Subsample size. See InferenceNonParamBootstrap$compute_subsampling_two_sided_pval.

b

Subsample size. See InferenceNonParamBootstrap$compute_subsampling_confidence_interval.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

subsampling_type

Optional empirical-resampling scheme.

subsampling_type

Optional empirical-resampling scheme.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.


InferenceIncidGCompRiskRatio$compute_m_out_of_n_bootstrap_two_sided_pval()

Usage

InferenceIncidGCompRiskRatio$compute_m_out_of_n_bootstrap_two_sided_pval(
  delta = NULL,
  B = 501,
  m = NULL,
  type = "centered",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  bootstrap_type = NULL,
  min_fraction_usable_samples = 0.8
)

Arguments

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

The null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

delta

Null treatment effect. Defaults to 0 for RD and 1 for RR.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

m

Resample size. See InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_two_sided_pval.

m

Resample size. See InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_confidence_interval.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

bootstrap_type

Optional resampling scheme.

bootstrap_type

Optional empirical-resampling scheme.

bootstrap_type

Optional empirical-resampling scheme.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.


InferenceIncidGCompRiskRatio$compute_m_out_of_n_bootstrap_confidence_interval()

Usage

InferenceIncidGCompRiskRatio$compute_m_out_of_n_bootstrap_confidence_interval(
  alpha = 0.05,
  B = 501,
  m = NULL,
  type = "basic",
  show_progress = TRUE,
  min_number_usable_samples = 5L,
  bootstrap_type = NULL,
  min_fraction_usable_samples = 0.8
)

Arguments

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

alpha

Significance level. Default 0.05.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of Bayesian-bootstrap samples.

B

Number of subsamples.

B

Number of subsamples.

B

Number of resamples.

B

Number of resamples.

m

Resample size. See InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_two_sided_pval.

m

Resample size. See InferenceNonParamBootstrap$compute_m_out_of_n_bootstrap_confidence_interval.

type

Bootstrap CI type. See InferenceNonParamBootstrap$compute_bootstrap_confidence_interval.

type

Bootstrap p-value type. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

type

Bayesian-bootstrap p-value type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

type

Bayesian-bootstrap CI type. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_confidence_interval.

type

P-value type.

type

Confidence-interval type.

type

P-value type.

type

Confidence-interval type.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

show_progress

Whether to show a progress bar.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite bootstrap samples required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite subsampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

min_number_usable_samples

Minimum number of finite resampled estimates required.

bootstrap_type

Optional resampling scheme.

bootstrap_type

Optional empirical-resampling scheme.

bootstrap_type

Optional empirical-resampling scheme.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceNonParamBootstrap$compute_bootstrap_two_sided_pval.

min_fraction_usable_samples

Minimum fraction of the B replicates that must be finite when na.rm = TRUE. Default 0.95. See InferenceBayesianBootstrap$compute_bayesian_bootstrap_two_sided_pval.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B subsamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.

min_fraction_usable_samples

Risk ratio only (ignored for the risk difference): minimum fraction of the B resamples that must be usable. A draw is unusable when it is degenerate (an arm with no events or only events, or a non-converged or separated logistic fit) or its fit fails. Below this fraction the method returns NA with a recorded reason and one edi_procedure_na_warning; otherwise it uses the usable draws only. Default 0.8, lower than the bootstrap's 0.95 because degenerate draws concentrate in the data sets with an extreme estimate (at 0.95 up to 29% of small null data sets were NA). See Subsampling and m-out-of-n in InferenceIncidGCompRiskRatio.


InferenceIncidGCompRiskRatio$clone()

The objects of this class are cloneable with this method.

Usage

InferenceIncidGCompRiskRatio$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

seq_des = DesignSeqOneByOneBernoulli$new(n = 40, response_type = 'incidence')
# \donttest{
for (i in 1:40) {
  seq_des$add_one_subject_to_experiment_and_assign(data.frame(x1 = rnorm(1)))
}
seq_des$add_all_subject_responses(rbinom(40, 1, 0.5))
inf = InferenceIncidGCompRiskRatio$new(seq_des)
inf$compute_estimate()
#> [1] 0.9942621
# }