Formula.translate(Formula, levID, D = "Normal", indata)
Value
for details.Formula
is a character string, we have the following syntax~
()
|
|
) from the fixed/random part information (placed to the left of |
) when placed within ()
;[]
[]
represents the reference category; if empty, no reference category is used; See note.:
:
, and separated by it, are interacted with each other;0
|
within ()
indicates that the variables to the right of |
within the same ()
are to be added to the fixed part of the model;1
|
within ()
indicates that the coefficients of the variables placed to the right of |
within the same ()
are to be allowed to randomly vary at level 1;2
|
within ()
indicates that the coefficients of the variables to the right of |
within the same ()
are to be allowed to randomly vary at level 2 (and so on for 3
for level 3, etc.);0s/0c
|
within ()
indicates that separate (hence s
) / common (hence c
) coefficients for the variables to the right of |
within the same ()
are to be added to the fixed part (hence 0
) of multivariate normal, multinomial and mixed responses models;2s/2c
|
within ()
indicates that separate (hence s
) / common (hence c
) coefficients for the variables to the right of |
within the same ()
are to be added to the random part of the model, and allowed to vary at level 2; applies to multivariate normal, multinomial and mixed responses models only;{}
.
Formula
is a formula object, 0s/0c
, 2s/2c
, .... and {}
have to be replaced by `0s`/`0c`
, `2s`/`2c`
, .... and ()
respectively. Other syntax remains the same.
see examples in runMLwiN
for details.
Outputs an R list object, which is then used as the input for MacroScript1
and/or MacroScript2
.runMLwiN
,MacroScript1
,MacroScript2