cr.des.pseudo: Allocate treatments according to a (weighted) L-optimal...

Description Usage Arguments Value

View source: R/lopt linear pseudononmy.R View source: R/lopt_linear_pseudononmy.R

Description

Allocate treatments according to a (weighted) L-optimal criterion allowing for a pseudo-nonmyopic approach. We assume a linear model for the response.

Usage

1
2
3
4
cr.des.pseudo(covar, true.beta, true.sigma, threshold, kappa, init, cr.lossfunc,
  sim, z.probs, k, wt = T, prior.scale = 100, same.start = NULL,
  rand.start = NULL, stoc = T, bayes = T, prior.default = T,
  coordex = NULL, u = NULL, ...)

Arguments

covar

a dataframe for the covariates

true.beta

the true parameter values of the regression coefficients

true.sigma

the true parameter value for the standard deviation

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

sim

number of trajectories to simulate

z.probs

vector of probabilities for each level of covariate z

k

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

wt

set to T if the above lossfunction is weighted, 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.

stoc

set to T if treatments are allocated using a stochastic method where the probability is determined by the optimality crtierion. Set to F if treatments are allocated deterministically.

bayes

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

prior.default

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

coordex

set to T if the coordinate exchange algorithm is used to assign treatments in the trajectory. Sequential approach used otherwsise.

u

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

...

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 optimalities (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.