cr.bayes.des: Assuming a Bayesian linear model for the response with a...

Description Usage Arguments Value

View source: R/lopt linear.R View source: R/lopt_linear.R

Description

Assuming a Bayesian linear model for the response with a normal inverse gamma prior, allocate treatment sequentially based on an optimality criterion for linear combinations of parameters. Responses are simulated assuming the true parameter values.

Usage

1
2
3
4
cr.bayes.des(covar, true.beta, sigma, threshold, kappa, init, cr.lossfunc, k,
  wt = T, int = T, a = 2, d = 2, M = NULL, prior.scale = 100,
  same.start = NULL, rand.start = NULL, stoc = T, bayes = T,
  prior.default = T, ...)

Arguments

covar

a dataframe for the covariates

true.beta

the true parameter values of the regression coefficients

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

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

a

shape parameter for the inverse gamma distribution for the prior, by default set to 2

d

scale parameter for the inverse gamma distribution for the prior, by default set to NULL for a zero vector

M

mean vector for the normal distribution NULL,

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.

...

further arguments to be passed to <lossfunc>

Value

design matrix D, responses y, all estimates of M, all estimates of V, all estimates of a, all estimates of d, all weights, determinant of V, trace of V, 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.