cmod | R Documentation |

Specification of graphical Gaussian model. The 'c' in
the name `cmod`

refers to that it is a (graphical) model
for 'c'ontinuous variables

```
cmod(
formula,
data,
marginal = NULL,
fit = TRUE,
maximal_only = FALSE,
details = 0
)
```

`formula` |
Model specification in one of the following forms: 1) a right-hand sided formula, 2) as a list of generators. Notice that there are certain model specification shortcuts, see Section 'details' below. |

`data` |
Data in one of the following forms: 1) A dataframe or
2) a list with elements |

`marginal` |
Should only a subset of the variables be used in connection with the model specification shortcuts. |

`fit` |
Should the model be fitted. |

`maximal_only` |
Should only maximal generators be retained. |

`details` |
Control the amount of output; for debugging purposes. |

The independence model can be specified as `~.^1`

and
the saturated model as `~.^.`

. The `marginal`

argument can be used for specifying the independence or
saturated models for only a subset of the variables.

An object of class `cModel`

(a list)

Søren Højsgaard, sorenh@math.aau.dk

`dmod`

, `mmod`

,
`ggmfit`

```
## Graphical Gaussian model
data(carcass)
cm1 <- cmod(~ .^., data=carcass)
## Stepwise selection based on BIC
cm2 <- backward(cm1, k=log(nrow(carcass)))
## Stepwise selection with fixed edges
cm3 <- backward(cm1, k=log(nrow(carcass)),
fixin=matrix(c("LeanMeat", "Meat11", "Meat12", "Meat13",
"LeanMeat", "Fat11", "Fat12", "Fat13"),
ncol=2))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.