EW_design_initial_MLM: function to generate a initial EW Design for multinomial...

View source: R/EW_design_initial_MLM.R

EW_design_initial_MLMR Documentation

function to generate a initial EW Design for multinomial logistic models

Description

function to generate a initial EW Design for multinomial logistic models

Usage

EW_design_initial_MLM(
  k.continuous,
  factor.level,
  xlist_fix = NULL,
  lvec,
  uvec,
  bvec_matrix,
  h.func,
  link = "continuation",
  EW_Fi.func = EW_Fi_MLM_func,
  delta = 1e-06,
  epsilon = 1e-12,
  maxit = 1000
)

Arguments

k.continuous

number of continuous variables

factor.level

lower, upper limit of continuous variables, and discrete levels of categorical variables, continuous factors come first

xlist_fix

the restricted discrete settings to be chosen, default to NULL, if NULL, will generate a discrete uniform random variables

lvec

lower limit of continuous variables

uvec

upper limit of continuous variables

bvec_matrix

the matrix of the sampled 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

Value

X matrix of initial design point

p0 initial random approximate allocation

f.det the determinant of the expected Fisher information matrix for the initial design.

Examples

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_MLM(k.continuous=k.continuous.temp, factor.level=n.factor.temp,xlist_fix=NULL,
lvec=lvec.temp,uvec=uvec.temp, bvec_matrix=bvec_bootstrap, h.func=hfunc.temp, link=link.temp)

ForLion documentation built on June 10, 2025, 5:13 p.m.