Description Usage Arguments Details See Also Examples
View source: R/create_design.R
Create design variables to fully describe a design. If variables are supplied then these variables are checked for consistency and, if possible, changed to sizes that make sense if there are inconsistencies. Returns a list of matricies compatible with PopED.
1 2 3 4 5 6 7 8 9 |
xt |
Matrix defining the sampling schedule. Each row is a group. |
groupsize |
Vector defining the size of the different groups (number of individuals in each group). |
m |
A number defining the number of groups. Computed from xt if not defined. |
x |
A matrix defining the discrete design variables for the model Each row is a group. |
a |
Matrix defining the continuous design variables. Each row is a group. |
ni |
Vector defining the number of samples for each group, computed as all elements of xt for each group by default. |
model_switch |
Matrix defining which response a certain sampling time belongs to. Defaults to one for all elements of xt. |
If a value (or a vector/list of values) is supplied that corresponds to only one group and the design has multiple groups then all groups will have the same value(s). If a matrix is expected then a list of lists can be supplied instead, each list corresponding to a group.
Other poped_input:
convert_variables()
,
create.poped.database()
,
create_design_space()
,
downsizing_general_design()
,
poped.choose()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | library(PopED)
xt1 <- list(c(1,2,3),c(1,2,3,4))
xt4 <- list(c(1,2,3,4,5),c(1,2,3,4))
xt2 <- rbind(c(1,2,3,4),c(1,2,3,4))
xt3 <- c(1,2,3,4)
design_1 <- create_design(xt=xt1,groupsize=20)
design_2 <- create_design(xt=xt4,groupsize=20)
design_3 <- create_design(xt=xt2,groupsize=20)
design_4 <- create_design(xt=xt3,groupsize=20)
design_5 <- create_design(xt=xt3,groupsize=20,m=3)
design_6 <- create_design(xt=xt1,groupsize=20,model_switch=ones(2,4))
design_7 <-create_design(xt=xt1,groupsize=20,a=c(2,3,4))
design_8 <-create_design(xt=xt1,groupsize=20,a=rbind(c(2,3,4),c(4,5,6)))
design_9 <-create_design(xt=xt1,groupsize=20,a=list(c(2,3,4,6),c(4,5,6)))
design_10 <-create_design(xt=xt1,groupsize=20,a=list(c(2,3,4),c(4,5,6)))
design_11 <-create_design(xt=c(0,1,2,4,6,8,24),
groupsize=50,
a=c(WT=70,DOSE=1000))
design_12 <-create_design(xt=c(0,1,2,4,6,8,24),
groupsize=50,
a=c(WT=70,DOSE=1000),m=2)
design_13 <-create_design(xt=c(0,1,2,4,6,8,24),
groupsize=50,
a=list(c(WT=70,DOSE=1000),c(DOSE=90,WT=200,AGE=45)),m=2)
design_14 <-create_design(xt=c(0,1,2,4,6,8,24),
groupsize=50,
a=list(list(WT=70,DOSE=1000),list(DOSE=90,WT=200,AGE=45)),m=2)
design_15 <-create_design(xt=xt4,
groupsize=c(50,20),
a=rbind(c("DOSE"=2,"WT"=3,"AGE"=4),
c(4,5,6)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.