expectedVariables: List Expected Parameter Names and Expected Variables Names

Description Usage Arguments Details Author(s) Examples

View source: R/expectedVariables.R

Description

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.

Usage

1
2
3
expectedVariables(network, node, returnVector = FALSE)

expectedParameters(network, node, returnVector = FALSE)

Arguments

network

A HydeNetwork object.

node

A node name within network

returnVector

Logical. If FALSE, the sample string for use in setNode is returned. Otherwise, the vector of parent names is returned.

Details

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.

Author(s)

Jarrod Dalton and Benjamin Nutter

Examples

 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)

HydeNet documentation built on July 8, 2020, 5:15 p.m.