Description Usage Arguments Details Author(s) Examples
View source: R/expectedVariables.R
To assist in formula that defines the relationship to a node,
expectedVariables
returns to the console
a sample string that can be pasted into setNode
and populated with the desired coefficients.
1 2 3 | expectedVariables(network, node, returnVector = FALSE)
expectedParameters(network, node, returnVector = FALSE)
|
network |
A |
node |
A node name within |
returnVector |
Logical. If FALSE, the sample string for use in
|
Each node is calculated as a model of its parents. If no training data are provided to the network, the user is expected to provide appropriate estimates of the regression coefficients for the model.
returnVector
will generally be set to FALSE
for most uses,
but can be set to TRUE
for use in error checking. For example,
in setNode
, if not all of the parents have been given a coefficient
(or if too few coefficients have been given), the vector of names is supplied.
Jarrod Dalton and Benjamin Nutter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(PE, package="HydeNet")
Net <- HydeNetwork(~ wells +
pe | wells +
d.dimer | pregnant*pe +
angio | pe +
treat | d.dimer*angio +
death | pe*treat)
expectedVariables(Net, wells)
expectedVariables(Net, treat)
expectedVariables(Net, treat, returnVector=TRUE)
expectedParameters(Net, wells)
expectedParameters(Net, wells, returnVector=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.