View source: R/parse_gm_formula.R
parse_gm_formula | R Documentation |
Parse graphical model formula to internal representation
parse_gm_formula(
formula,
varnames = NULL,
marginal = NULL,
interactions = NULL,
maximal_only = FALSE
)
formula |
A right hand sided formula or a list. |
varnames |
Specification of the variables. |
marginal |
Possible specification of marginal (a set of variables); useful in connection with model specification shortcuts. |
interactions |
The maximum order of interactions allowed; useful in connection with model specification shortcuts. |
maximal_only |
Should only maximal generators be retained. |
vn <- c("me", "ve", "al", "an", "st")
form1 <- ~me:ve:al + ve:al + an
form2 <- ~me:ve:al + ve:al + s
form3 <- ~me:ve:al + ve:al + anaba
parse_gm_formula(form1, varnames=vn)
parse_gm_formula(form2, varnames=vn)
## parse_gm_formula(form3, varnames=vn)
parse_gm_formula(form1)
parse_gm_formula(form2)
parse_gm_formula(form3)
## parse_gm_formula(~.^1)
## parse_gm_formula(~.^.)
parse_gm_formula(~.^1, varnames=vn)
parse_gm_formula(~.^., varnames=vn)
parse_gm_formula(~.^., varnames=vn, interactions=3)
vn2 <- vn[1:3]
## parse_gm_formula(form1, varnames=vn, marginal=vn2)
## parse_gm_formula(form2, varnames=vn, marginal=vn2)
## parse_gm_formula(form3, varnames=vn, marginal=vn2)
parse_gm_formula(~.^1, varnames=vn, marginal=vn2)
parse_gm_formula(~.^., varnames=vn, marginal=vn2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.