data.anoint | R Documentation |
Returns a simulated equal-allocation, parallel-group clinical trial with possibly multiple interactions among prognostic factors.
data.anoint(alpha, beta, gamma, mean, vcov, n=100, event=.8,
type = c("binomial","survival"))
alpha |
vector specifying control and treatment group intercept |
beta |
vector specifying prognostic factor main effects |
gamma |
vector specifying modification of prognostic effects in the presence of treatment |
mean |
vector of covariate mean to be supplied to |
vcov |
matrix of variance-covariance matrix of prognostic covariates to be supplied to |
n |
number of subjects in each treatment arm |
event |
proportion of observed events when |
type |
string indicating type of response variable |
When type
is "survival", the parameters specify the log-rate for an exponentially distributed random variable. Censored times are non-informatively right-censored. When type
is "binomial", the parameters specify a log-odds model.
Data frame with y
, trt
, and V1
,...,VK
prognostic factors. The data frame also has event
with a time-to-event reponse, which is an indicator for an observed event.
S. Kovalchik s.a.kovalchik@gmail.com
null.interaction <- data.anoint(
alpha = c(log(.2/.8),log(.2*.75/(1-.2*.75))),
beta = c(1.5,2),
gamma = rep(1,2),
mean = c(0,0),
vcov = diag(2),
type="binomial"
)
fit <- glm(y~(.)*trt,data=null.interaction,family="binomial")
summary(fit)
null.interaction <- data.anoint(
alpha = c(log(.5),log(.5*.75)),
beta = c(1.5,2),
gamma = rep(1,2),
mean = c(0,0),
vcov = diag(2),
type="survival",
event = .7
)
fit <- coxph(Surv(y, event)~(.)*trt,data=null.interaction)
summary(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.