Creates a design matrix using the design dataframe, a formula and any intervals defined for time, cohort and age.
create.dm(x, formula, time.bins=NULL, cohort.bins=NULL, age.bins=NULL,
chunk_size=1e7, remove.intercept=NULL,remove.unused.columns=TRUE)
create.dml(ddl,model.parameters,design.parameters,restrict=FALSE,
chunk_size=1e7,use.admb=FALSE,remove.unused.columns=TRUE,simplify=FALSE)
create.dm returns a fixed effect design matrix constructed with the design dataframe and the formula for a single parametre. It excludes any columns that are all 0. create.dml returns a list with an element for for each parameter with a sub-list for the fixed effect (fe) and random effects. The re structure depends on switch use.admb. When TRUE, it contains a single design matrix (re.dm) and indices for random effects (re.indices). When FALSE, it returns re.list which is a list with an element for each random component containing re.dm and indices for that random effect (eg (1|id) + (1|time) would produce elements for id and time.
design dataframe created by create.dmdf
formula for model in R format
any bins of time to collapse values
any bins of cohort to collapse values
any bins of cohort to collapse values
specifies amount of memory to use in creating design matrices; amount used is 8*chunk_size/1e6 MB (default 80MB)
if TRUE, forces removal of intercept in design matrix
if TRUE, unused columns are removed; otherwise they are left
Design data list which contains a list element for each parameter type; if NULL it is created
Specification of any grouping variables for design data for each parameter
List of model parameter specifications
if TRUE, only use design data with Time >= Cohort
if TRUE uses mixed.model.admb for random effects; otherwise mixed.model
if TRUE simplies real parameter structure for some models; at this time it is not more efficient so ignore
Jeff Laake