View source: R/EW_design_initial_self.R
EW_design_initial_self | R Documentation |
function to generate random initial design with design points and the approximate allocation (For EW)
EW_design_initial_self(
k.continuous,
factor.level,
lvec,
uvec,
bvec_matrix,
h.func,
link = "continuation",
EW_Fi.func = EW_Fi_MLM_func,
delta = 1e-06,
epsilon = 1e-12,
maxit = 1000
)
k.continuous |
number of continuous variables |
factor.level |
lower, upper limit of continuous variables, and discrete levels of categorical variables, continuous factors come first |
lvec |
lower limit of continuous variables |
uvec |
upper limit of continuous variables |
bvec_matrix |
the matrix of the bootstrap parameter values of beta |
h.func |
function, is used to transfer the design point to model matrix (e.g. add interaction term, add intercept) |
link |
link function, default "continuation", other options "baseline", "adjacent" and "cumulative" |
EW_Fi.func |
function, is used to calculate the Expectation of Fisher information for a design point - default to be EW_Fi_MLM_func() in the package |
delta |
tuning parameter, the distance threshold, || x_i(0) - x_j(0) || >= delta |
epsilon |
determining f.det > 0 numerically, f.det <= epsilon will be considered as f.det <= 0 |
maxit |
maximum number of iterations |
X matrix of initial design point
p0 initial random approximate allocation
f.det the determinant of Fisher information matrix for the random initial design
k.continuous.temp=1
link.temp = "continuation"
n.factor.temp = c(0)
factor.level.temp = list(c(80,200))
hfunc.temp = function(y){
matrix(data=c(1,y,y*y,0,0,0,0,0,1,y,0,0,0,0,0), nrow=3, ncol=5, byrow=TRUE)
}
lvec.temp = 80
uvec.temp = 200
bvec_bootstrap<-matrix(c(-0.2401, -1.9292, -2.7851, -1.614,-1.162,
-0.0535, -0.0274, -0.0096,-0.0291, -0.04,
0.0004, 0.0003, 0.0002, 0.0003, 0.1,
-9.2154, -9.7576, -9.6818, -8.5139, -8.56),nrow=4,byrow=TRUE)
EW_design_initial_self(k.continuous=k.continuous.temp, factor.level=n.factor.temp, lvec=lvec.temp,
uvec=uvec.temp, bvec_matrix=bvec_bootstrap, h.func=hfunc.temp, link=link.temp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.