Type: | Package |
Title: | Flexible and Efficient Evaluation of Principal Surrogates/Treatment Effect Modifiers |
Version: | 1.0.3 |
BugReports: | https://github.com/mjuraska/pssmooth/issues |
Description: | Implements estimation and testing procedures for evaluating an intermediate biomarker response as a principal surrogate of a clinical response to treatment (i.e., principal stratification effect modification analysis), as described in Juraska M, Huang Y, and Gilbert PB (2020), Inference on treatment effect modification by biomarker response in a three-phase sampling design, Biostatistics, 21(3): 545-560 <doi:10.1093/biostatistics/kxy074>. The methods avoid the restrictive 'placebo structural risk' modeling assumption common to past methods and further improve robustness by the use of nonparametric kernel smoothing for biomarker density estimation. A randomized controlled two-group clinical efficacy trial is assumed with an ordered categorical or continuous univariate biomarker response measured at a fixed timepoint post-randomization and with a univariate baseline surrogate measure allowed to be observed in only a subset of trial participants with an observed biomarker response (see the flexible three-phase sampling design in the paper for details). Bootstrap-based procedures are available for pointwise and simultaneous confidence intervals and testing of four relevant hypotheses. Summary and plotting functions are provided for estimation results. |
License: | GPL-2 |
URL: | https://github.com/mjuraska/pssmooth |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | graphics, stats, osDesign, np, chngpt, MASS |
Suggests: | knitr, rmarkdown |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2020-11-18 01:01:21 UTC; mjuraska |
Author: | Michal Juraska [aut, cre] |
Maintainer: | Michal Juraska <mjuraska@fredhutch.org> |
Repository: | CRAN |
Date/Publication: | 2020-11-18 13:20:03 UTC |
Bootstrap Estimation of Conditional Clinical Endpoint Risk under Placebo and Treatment Given Biomarker Response to Treatment in a Baseline Surrogate Measure Three-Phase Sampling Design
Description
Estimates P\{Y(z)=1|S(1)=s_1\}
, z=0,1
, on a grid of s_1
values in bootstrap resamples (see riskCurve
for notation introduction). Cases
(Y=1
) and controls (Y=0
) are sampled separately yielding a fixed number of cases and controls in each bootstrap sample. Consequentially, the number of controls
with available phase 2 data varies across bootstrap samples.
Usage
bootRiskCurve(
formula,
bsm,
tx,
data,
pstype = c("continuous", "ordered"),
bsmtype = c("continuous", "ordered"),
bwtype = c("fixed", "generalized_nn", "adaptive_nn"),
hinge = FALSE,
weights = NULL,
psGrid = NULL,
iter,
seed = NULL,
saveFile = NULL,
saveDir = NULL
)
Arguments
formula |
a formula object with the binary clinical endpoint on the left of the |
bsm |
a character string specifying the variable name in |
tx |
a character string specifying the variable name in |
data |
a data frame with one row per randomized participant endpoint-free at |
pstype |
a character string specifying whether the biomarker response shall be treated as a |
bsmtype |
a character string specifying whether the baseline surrogate measure shall be treated as a |
bwtype |
a character string specifying the bandwidth type for continuous variables in the kernel density estimation. The options are |
hinge |
a logical value ( |
weights |
either a numeric vector of weights or a character string specifying the variable name in |
psGrid |
a numeric vector of |
iter |
the number of bootstrap iterations |
seed |
a seed of the random number generator supplied to |
saveFile |
a character string specifying the name of an |
saveDir |
a character string specifying a path for the output directory. If |
Value
If saveFile
and saveDir
are both specified, the output list (named bList
) is saved as an .RData
file; otherwise it is returned only.
The output object is a list with the following components:
-
psGrid
: a numeric vector ofS(1)
values at which the conditional clinical endpoint risk is estimated in the componentsplaRiskCurveBoot
andtxRiskCurveBoot
-
plaRiskCurveBoot
: alength(psGrid)
-by-iter
matrix of estimates ofP\{Y(0)=1|S(1)=s_1\}
fors_1
inpsGrid
, with columns representing bootstrap samples -
txRiskCurveBoot
: alength(psGrid)
-by-iter
matrix of estimates ofP\{Y(1)=1|S(1)=s_1\}
fors_1
inpsGrid
, with columns representing bootstrap samples -
cpointPboot
: ifhinge=TRUE
, a numeric vector of estimates of the hinge point in the placebo group in each bootstrap sample -
cpointTboot
: ifhinge=TRUE
, a numeric vector of estimates of the hinge point in the treatment group in each bootstrap sample
References
Fong, Y., Huang, Y., Gilbert, P. B., and Permar, S. R. (2017), chngpt: threshold regression model estimation and inference, BMC Bioinformatics, 18.
See Also
riskCurve
, summary.riskCurve
and plotMCEPcurve
Examples
n <- 500
Z <- rep(0:1, each=n/2)
S <- MASS::mvrnorm(n, mu=c(2,2,3), Sigma=matrix(c(1,0.9,0.7,0.9,1,0.7,0.7,0.7,1), nrow=3))
p <- pnorm(drop(cbind(1,Z,(1-Z)*S[,2],Z*S[,3]) %*% c(-1.2,0.2,-0.02,-0.2)))
Y <- sapply(p, function(risk){ rbinom(1,1,risk) })
X <- rbinom(n,1,0.5)
# delete S(1) in placebo recipients
S[Z==0,3] <- NA
# delete S(0) in treatment recipients
S[Z==1,2] <- NA
# generate the indicator of being sampled into the phase 2 subset
phase2 <- rbinom(n,1,0.4)
# delete Sb, S(0) and S(1) in controls not included in the phase 2 subset
S[Y==0 & phase2==0,] <- c(NA,NA,NA)
# delete Sb in cases not included in the phase 2 subset
S[Y==1 & phase2==0,1] <- NA
data <- data.frame(X,Z,S[,1],ifelse(Z==0,S[,2],S[,3]),Y)
colnames(data) <- c("X","Z","Sb","S","Y")
qS <- quantile(data$S, probs=c(0.05,0.95), na.rm=TRUE)
grid <- seq(qS[1], qS[2], length.out=3)
out <- bootRiskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data,
psGrid=grid, iter=1, seed=10)
# alternatively, to save the .RData output file (no '<-' needed):
bootRiskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data,
psGrid=grid, iter=1, seed=10, saveFile="out.RData", saveDir="./")
Plotting of the Estimated Marginal Causal Effect Predictiveness Curve
Description
Plots point estimates and, if available, pointwise and simultaneous Wald-type bootstrap confidence intervals for the specified marginal causal effect predictiveness (mCEP) curve.
Usage
plotMCEPcurve(
object,
confLevel = 0.95,
hingePoint = NULL,
title = NULL,
xLab = NULL,
yLab = NULL,
yLim = NULL,
pType = c("l", "p")
)
Arguments
object |
an object returned by |
confLevel |
the confidence level (0.95 by default) of pointwise and simultaneous confidence intervals |
hingePoint |
the hinge point estimate ( |
title |
a character string specifying the plot title |
xLab |
a character string specifying the x-axis label ( |
yLab |
a character string specifying the y-axis label ( |
yLim |
a numeric vector of length 2 specifying the y-axis range ( |
pType |
a character string specifying the type of plot. Possible options are |
Value
None. The function is called solely for plot generation.
See Also
riskCurve
, bootRiskCurve
and summary.riskCurve
Examples
n <- 500
Z <- rep(0:1, each=n/2)
S <- MASS::mvrnorm(n, mu=c(2,2,3), Sigma=matrix(c(1,0.9,0.7,0.9,1,0.7,0.7,0.7,1), nrow=3))
p <- pnorm(drop(cbind(1,Z,(1-Z)*S[,2],Z*S[,3]) %*% c(-1.2,0.2,-0.02,-0.2)))
Y <- sapply(p, function(risk){ rbinom(1,1,risk) })
X <- rbinom(n,1,0.5)
# delete S(1) in placebo recipients
S[Z==0,3] <- NA
# delete S(0) in treatment recipients
S[Z==1,2] <- NA
# generate the indicator of being sampled into the phase 2 subset
phase2 <- rbinom(n,1,0.3)
# delete Sb, S(0) and S(1) in controls not included in the phase 2 subset
S[Y==0 & phase2==0,] <- c(NA,NA,NA)
# delete Sb in cases not included in the phase 2 subset
S[Y==1 & phase2==0,1] <- NA
data <- data.frame(X,Z,S[,1],ifelse(Z==0,S[,2],S[,3]),Y)
colnames(data) <- c("X","Z","Sb","S","Y")
qS <- quantile(data$S, probs=c(0.05,0.95), na.rm=TRUE)
grid <- seq(qS[1], qS[2], length.out=3)
out <- riskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data, psGrid=grid)
boot <- bootRiskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data,
psGrid=grid, iter=2, seed=10)
sout <- summary(out, boot, contrast="te")
plotMCEPcurve(sout)
Estimation of Conditional Clinical Endpoint Risk under Placebo and Treatment Given Biomarker Response to Treatment in a Baseline Surrogate Measure Three-Phase Sampling Design
Description
Estimates P\{Y(z)=1|S(1)=s_1\}
, z=0,1
, on a grid of s_1
values following the estimation method of Juraska, Huang, and Gilbert (2018), where Z
is the
treatment group indicator (Z=1
, treatment; Z=0
, placebo), S(z)
is a continuous or ordered categorical univariate biomarker under assignment to Z=z
measured at fixed time t_0
after randomization, and Y
is a binary clinical endpoint (Y=1
, disease; Y=0
, no disease) measured after t_0
. The
estimator employs the generalized product kernel density/probability estimation method of Hall, Racine, and Li (2004) implemented in the np
package. The risks
P\{Y(z)=1|S(z)=s_1,X=x\}
, z=0,1
, where X
is a vector of discrete baseline covariates, are estimated by fitting inverse probability-weighted logistic regression
models using the osDesign
package.
Usage
riskCurve(
formula,
bsm,
tx,
data,
pstype = c("continuous", "ordered"),
bsmtype = c("continuous", "ordered"),
bwtype = c("fixed", "generalized_nn", "adaptive_nn"),
hinge = FALSE,
weights = NULL,
psGrid = NULL,
saveFile = NULL,
saveDir = NULL
)
Arguments
formula |
a formula object with the binary clinical endpoint on the left of the |
bsm |
a character string specifying the variable name in |
tx |
a character string specifying the variable name in |
data |
a data frame with one row per randomized participant endpoint-free at |
pstype |
a character string specifying whether the biomarker response shall be treated as a |
bsmtype |
a character string specifying whether the baseline surrogate measure shall be treated as a |
bwtype |
a character string specifying the bandwidth type for continuous variables in the kernel density estimation. The options are |
hinge |
a logical value ( |
weights |
either a numeric vector of weights or a character string specifying the variable name in |
psGrid |
a numeric vector of |
saveFile |
a character string specifying the name of an |
saveDir |
a character string specifying a path for the output directory. If |
Value
If saveFile
and saveDir
are both specified, the output list (named oList
) is saved as an .RData
file; otherwise it is returned only.
The output object (of class riskCurve
) is a list with the following components:
-
psGrid
: a numeric vector ofS(1)
values at which the conditional clinical endpoint risk is estimated in the componentsplaRiskCurve
andtxRiskCurve
-
plaRiskCurve
: a numeric vector of estimates ofP\{Y(0)=1|S(1)=s_1\}
fors_1
inpsGrid
-
txRiskCurve
: a numeric vector of estimates ofP\{Y(1)=1|S(1)=s_1\}
fors_1
inpsGrid
-
fOptBandwidths
: aconbandwidth
object returned by the call of the functionnpcdensbw
containing the optimal bandwidths, selected by likelihood cross-validation, in the kernel estimation of the conditional density ofS(1)
given the baseline surrogate measure and any other specified baseline covariates -
gOptBandwidths
: aconbandwidth
object returned by the call of the functionnpcdensbw
ornpudensbw
containing the optimal bandwidths, selected by likelihood cross-validation, in the kernel estimation of the conditional density ofS(0)
given any specified baseline covariates or the marginal density ofS(0)
if no baseline covariates are specified informula
-
cpointP
: ifhinge=TRUE
, the estimate of the hinge point in the placebo group -
cpointT
: ifhinge=TRUE
, the estimate of the hinge point in the treatment group
References
Fong, Y., Huang, Y., Gilbert, P. B., and Permar, S. R. (2017), chngpt: threshold regression model estimation and inference, BMC Bioinformatics, 18.
Hall, P., Racine, J., and Li, Q. (2004), Cross-validation and the estimation of conditional probability densities, JASA 99(468), 1015-1026.
Juraska, M., Huang, Y., and Gilbert, P. B. (2020), Inference on treatment effect modification by biomarker response in a three-phase sampling design, Biostatistics, 21(3): 545-560, https://doi.org/10.1093/biostatistics/kxy074.
See Also
bootRiskCurve
, summary.riskCurve
and plotMCEPcurve
Examples
n <- 500
Z <- rep(0:1, each=n/2)
S <- MASS::mvrnorm(n, mu=c(2,2,3), Sigma=matrix(c(1,0.9,0.7,0.9,1,0.7,0.7,0.7,1), nrow=3))
p <- pnorm(drop(cbind(1,Z,(1-Z)*S[,2],Z*S[,3]) %*% c(-1.2,0.2,-0.02,-0.2)))
Y <- sapply(p, function(risk){ rbinom(1,1,risk) })
X <- rbinom(n,1,0.5)
# delete S(1) in placebo recipients
S[Z==0,3] <- NA
# delete S(0) in treatment recipients
S[Z==1,2] <- NA
# generate the indicator of being sampled into the phase 2 subset
phase2 <- rbinom(n,1,0.4)
# delete Sb, S(0) and S(1) in controls not included in the phase 2 subset
S[Y==0 & phase2==0,] <- c(NA,NA,NA)
# delete Sb in cases not included in the phase 2 subset
S[Y==1 & phase2==0,1] <- NA
data <- data.frame(X,Z,S[,1],ifelse(Z==0,S[,2],S[,3]),Y)
colnames(data) <- c("X","Z","Sb","S","Y")
qS <- quantile(data$S, probs=c(0.05,0.95), na.rm=TRUE)
grid <- seq(qS[1], qS[2], length.out=3)
out <- riskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data, psGrid=grid)
# alternatively, to save the .RData output file (no '<-' needed):
riskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data, saveFile="out.RData",
saveDir="./")
Summary of Point and Interval Estimation of a Marginal Causal Effect Predictiveness Curve
Description
Summarizes point estimates and pointwise and simultaneous Wald-type bootstrap confidence intervals for a specified marginal causal effect predictiveness (mCEP) curve (see, e.g., Juraska, Huang, and Gilbert (2018) for the definition).
Usage
## S3 method for class 'riskCurve'
summary(
object,
boot = NULL,
contrast = c("te", "rr", "logrr", "rd"),
confLevel = 0.95,
...
)
Arguments
object |
an object of class |
boot |
an object returned by |
contrast |
a character string specifying the mCEP curve. It must be one of |
confLevel |
the confidence level of pointwise and simultaneous confidence intervals |
... |
for other methods |
Value
A data frame containing point and possibly interval estimates of the specified mCEP curve.
References
Juraska, M., Huang, Y., and Gilbert, P. B. (2020), Inference on treatment effect modification by biomarker response in a three-phase sampling design, Biostatistics, 21(3): 545-560, https://doi.org/10.1093/biostatistics/kxy074.
See Also
Examples
n <- 500
Z <- rep(0:1, each=n/2)
S <- MASS::mvrnorm(n, mu=c(2,2,3), Sigma=matrix(c(1,0.9,0.7,0.9,1,0.7,0.7,0.7,1), nrow=3))
p <- pnorm(drop(cbind(1,Z,(1-Z)*S[,2],Z*S[,3]) %*% c(-1.2,0.2,-0.02,-0.2)))
Y <- sapply(p, function(risk){ rbinom(1,1,risk) })
# delete S(1) in placebo recipients
S[Z==0,3] <- NA
# delete S(0) in treatment recipients
S[Z==1,2] <- NA
# generate the indicator of being sampled into the phase 2 subset
phase2 <- rbinom(n,1,0.4)
# delete Sb, S(0) and S(1) in controls not included in the phase 2 subset
S[Y==0 & phase2==0,] <- c(NA,NA,NA)
# delete Sb in cases not included in the phase 2 subset
S[Y==1 & phase2==0,1] <- NA
data <- data.frame(Z,S[,1],ifelse(Z==0,S[,2],S[,3]),Y)
colnames(data) <- c("Z","Sb","S","Y")
qS <- quantile(data$S, probs=c(0.05,0.95), na.rm=TRUE)
grid <- seq(qS[1], qS[2], length.out=2)
out <- riskCurve(formula=Y ~ S, bsm="Sb", tx="Z", data=data, psGrid=grid)
boot <- bootRiskCurve(formula=Y ~ S, bsm="Sb", tx="Z", data=data,
psGrid=grid, iter=2, seed=10)
summary(out, boot, contrast="te")
Testing of the Null Hypotheses of a Flat and a Constant Marginal Causal Effect Predictiveness Curve
Description
Computes a two-sided p-value either from the test of {H_0^1: mCEP(s_1)=CE
for all s_1
}, where CE
is the overall causal treatment effect on the clinical
endpoint, or from the test of {H_0^2: mCEP(s_1)=c
for all s_1
in the interval limS1
and a specified constant c
}, each against a general alternative
hypothesis. The testing procedures are described in Juraska, Huang, and Gilbert (2018) and are based on the simultaneous estimation method of Roy and Bose (1953).
Usage
testConstancy(
object,
boot,
contrast = c("te", "rr", "logrr", "rd"),
null = c("H01", "H02"),
overallPlaRisk = NULL,
overallTxRisk = NULL,
MCEPconstantH02 = NULL,
limS1 = NULL
)
Arguments
object |
an object returned by |
boot |
an object returned by |
contrast |
a character string specifying the mCEP curve. It must be one of |
null |
a character string specifying the null hypothesis to be tested; one of |
overallPlaRisk |
a numeric value of the estimated overall clinical endpoint risk in the placebo group. It is required when |
overallTxRisk |
a numeric value of the estimated overall clinical endpoint risk in the treatment group. It is required when |
MCEPconstantH02 |
the constant |
limS1 |
a numeric vector of length 2 specifying an interval that is a subset of the support of |
Value
A numeric value representing the two-sided p-value from the test of either H_0^1
or H_0^2
.
References
Juraska, M., Huang, Y., and Gilbert, P. B. (2020), Inference on treatment effect modification by biomarker response in a three-phase sampling design, Biostatistics, 21(3): 545-560, https://doi.org/10.1093/biostatistics/kxy074.
Roy, S. N. and Bose, R. C. (1953), Simultaneous condence interval estimation, The Annals of Mathematical Statistics, 24, 513-536.
See Also
riskCurve
, bootRiskCurve
and testEquality
Examples
n <- 500
Z <- rep(0:1, each=n/2)
S <- MASS::mvrnorm(n, mu=c(2,2,3), Sigma=matrix(c(1,0.9,0.7,0.9,1,0.7,0.7,0.7,1), nrow=3))
p <- pnorm(drop(cbind(1,Z,(1-Z)*S[,2],Z*S[,3]) %*% c(-1.2,0.2,-0.02,-0.2)))
Y <- sapply(p, function(risk){ rbinom(1,1,risk) })
X <- rbinom(n,1,0.5)
# delete S(1) in placebo recipients
S[Z==0,3] <- NA
# delete S(0) in treatment recipients
S[Z==1,2] <- NA
# generate the indicator of being sampled into the phase 2 subset
phase2 <- rbinom(n,1,0.4)
# delete Sb, S(0) and S(1) in controls not included in the phase 2 subset
S[Y==0 & phase2==0,] <- c(NA,NA,NA)
# delete Sb in cases not included in the phase 2 subset
S[Y==1 & phase2==0,1] <- NA
data <- data.frame(X,Z,S[,1],ifelse(Z==0,S[,2],S[,3]),Y)
colnames(data) <- c("X","Z","Sb","S","Y")
qS <- quantile(data$S, probs=c(0.05,0.95), na.rm=TRUE)
grid <- seq(qS[1], qS[2], length.out=3)
out <- riskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data, psGrid=grid)
boot <- bootRiskCurve(formula=Y ~ S + factor(X), bsm="Sb", tx="Z", data=data,
psGrid=grid, iter=2, seed=10)
fit <- glm(Y ~ Z, data=data, family=binomial)
prob <- predict(fit, newdata=data.frame(Z=0:1), type="response")
testConstancy(out, boot, contrast="te", null="H01", overallPlaRisk=prob[1],
overallTxRisk=prob[2])
testConstancy(out, boot, contrast="te", null="H02", MCEPconstantH02=0, limS1=c(qS[1],1.5))
Testing of the Null Hypothesis of Equal Marginal Causal Effect Predictiveness Curves for Two Biomarkers, Endpoints, or Baseline Covariate Subgroups
Description
Computes a two-sided p-value either from the test of {H_0^3: mCEP_1(s_1)=mCEP_2(s_1)
for all s_1
in limS1
}, where mCEP_1
and mCEP_2
are
each associated with either a different biomarker (measured in the same units) or a different endpoint or both, or from the test of {H_0^4: mCEP(s_1|X=0)=
mCEP(s_1|X=1)
for all s_1
in limS1
}, where X
is a baseline dichotomous phase 1 covariate of interest, each against a general alternative
hypothesis. The testing procedures are described in Juraska, Huang, and Gilbert (2018) and are based on the simultaneous estimation method of Roy and Bose (1953).
Usage
testEquality(
object1,
object2,
boot1,
boot2,
contrast = c("te", "rr", "logrr", "rd"),
null = c("H03", "H04"),
limS1 = NULL
)
Arguments
object1 |
an object returned by |
object2 |
an object returned by |
boot1 |
an object returned by |
boot2 |
an object returned by |
contrast |
a character string specifying the mCEP curve. It must be one of |
null |
a character string specifying the null hypothesis to be tested; one of |
limS1 |
a numeric vector of length 2 specifying an interval that is a subset of the support of |
Value
A numeric value representing the two-sided p-value from the test of either H_0^3
or H_0^4
.
References
Juraska, M., Huang, Y., and Gilbert, P. B. (2020), Inference on treatment effect modification by biomarker response in a three-phase sampling design, Biostatistics, 21(3): 545-560, https://doi.org/10.1093/biostatistics/kxy074.
Roy, S. N. and Bose, R. C. (1953), Simultaneous condence interval estimation, The Annals of Mathematical Statistics, 24, 513-536.
See Also
riskCurve
, bootRiskCurve
and testConstancy
Examples
n <- 500
Z <- rep(0:1, each=n/2)
S <- MASS::mvrnorm(n, mu=c(2,2,3), Sigma=matrix(c(1,0.9,0.7,0.9,1,0.7,0.7,0.7,1), nrow=3))
p <- pnorm(drop(cbind(1,Z,(1-Z)*S[,2],Z*S[,3]) %*% c(-1.2,0.2,-0.02,-0.2)))
Y <- sapply(p, function(risk){ rbinom(1,1,risk) })
X <- rbinom(n,1,0.5)
# delete S(1) in placebo recipients
S[Z==0,3] <- NA
# delete S(0) in treatment recipients
S[Z==1,2] <- NA
# generate the indicator of being sampled into the phase 2 subset
phase2 <- rbinom(n,1,0.4)
# delete Sb, S(0) and S(1) in controls not included in the phase 2 subset
S[Y==0 & phase2==0,] <- c(NA,NA,NA)
# delete Sb in cases not included in the phase 2 subset
S[Y==1 & phase2==0,1] <- NA
data <- data.frame(X,Z,S[,1],ifelse(Z==0,S[,2],S[,3]),Y)
colnames(data) <- c("X","Z","Sb","S","Y")
qS <- quantile(data$S, probs=c(0.05,0.95), na.rm=TRUE)
grid <- seq(qS[1], qS[2], length.out=3)
out0 <- riskCurve(formula=Y ~ S, bsm="Sb", tx="Z", data=data[data$X==0,], psGrid=grid)
out1 <- riskCurve(formula=Y ~ S, bsm="Sb", tx="Z", data=data[data$X==1,], psGrid=grid)
boot0 <- bootRiskCurve(formula=Y ~ S, bsm="Sb", tx="Z", data=data[data$X==0,],
psGrid=grid, iter=2, seed=10)
boot1 <- bootRiskCurve(formula=Y ~ S, bsm="Sb", tx="Z", data=data[data$X==1,],
psGrid=grid, iter=2, seed=15)
testEquality(out0, out1, boot0, boot1, contrast="te", null="H04")