Uses the function RRsimu
to estimate the power of the
multivariate RR methods (correlation RRcor
, logistic regression
RRlog
, and/or linear regression RRlin
.
powerplot(
numRep,
n = c(100, 500, 1000),
pi,
cor = c(0, 0.1, 0.3),
b.log = NULL,
model,
p,
method = c("RRcor", "RRlog", "RRlin"),
complyRates = c(1, 1),
sysBias = c(0, 0),
groupRatio = 0.5,
alpha = 0.05,
nCPU = 1,
show.messages = TRUE
)
a list of the class powerplot
containing an array res
with the power estimates and details of the simulation (e.g., model, p, pi, etc.)
number of boostrap replications
vector of samples sizes
true prevalence
vector of true correlations
vector of true logistic regression coefficients
randomized response model
randomization probability
multivariate RR method
probability of compliance within carriers/noncarriers of sensitive attribute
probability of responding 'yes' in case of noncompliance
ratio of subgroups in two-group RR designs
type-I error used to estimate power
either the number of CPU cores or a cluster initialized via
makeCluster
.
toggle printing of progress messages
RRsimu
for Monte-Carlo simulation / parametric bootstrap
# Not run
# pplot <- powerplot(100, n=c(150,250), cor=c(0,.3,.5),
# method="RRlog", pi=.6, model="Warner", p=.3)
# plot(pplot)
Run the code above in your browser using DataLab