cr.rand: Assuming a logistic model for the response, allocate...

Description Usage Arguments Value

View source: R/lopt logistic.R View source: R/lopt_logistic.R

Description

Assuming a logistic model for the response, allocate treatment at random. Responses are simulated assuming the true parameter values.

Usage

1
2
3
cr.rand(covar, true.beta, threshold, kappa, init, cr.lossfunc, k, wt, int = T,
  prior.scale = 100, same.start = NULL, rand.start = NULL, bayes = T,
  u = NULL, prior.default = T, true.bvcov = NULL, ...)

Arguments

covar

a dataframe for the covariates

true.beta

the true parameter values of the regression coefficients

threshold

the cut-off value for hypothesis tests

kappa

the value of probability at which weights are set at zero

init

the number of units in the initial design

cr.lossfunc

loss function appropriate for linear combinations of parameters

k

the number of "outer loops" in the coordinate exchange algorithm

wt

set to T if the above lossfunction is weighted, NULL otherwise

int

set to T if you allow for treatment-covariate interactions in the model, NULL otherwise

prior.scale

the prior scale parameter

same.start

the design matrix to be used for the initial design. If set to NULL, function generates initial design.

rand.start

If set to T, function generates an initial design randomly. Else, coordinate exchange is used.

bayes

set to T if bayesglm is used instead of glm. Default prior assumed.

u

vector of uniform random numbers for generating responses. If set to NULL, responses generated from the binomial distribution.

prior.default

set to T if default priors for bayesglm is used. If set to False and bayes=T, normal priors used.

true.bvcov

if set to T, use the true parameter values to compute obejctive function. If set to NULL, use estimated parameter values.

...

further arguments to be passed to <lossfunc>

Value

design matrix D, responses y, all estimates of betas, final estimate of beta, all weights, all estimates of standard deviation, beta, probabilities for treatment assignment, all values of the objective functions (weighted L, DA, weighted DA), proportion of treatment=1, proportion of covariate in each group Type 1 error, true value of power, empirical value of power.


mst1g15/biasedcoin documentation built on Nov. 26, 2019, 4:01 a.m.