NodeExpectedUtils {RNetica}R Documentation

Calculates expected utility for each value of a decision node

Description

Calculates the expected utility for a decision node. That is for each state of the decision node it calculates the expected utility if that state is chosen.

Usage

NodeExpectedUtils(node)

Arguments

node

An active NeticaNode object that references the node. This should be a decision node, that is NodeKind(node) should equal "Decision".

Details

This solves a decision problem. In an influence diagram (decision net), one decision node is considered a predecessor if its value is known at the time when a decision is made. The compilation process for a decision net will fill in predecessor relationships when they are implied by paths through nature nodes. Decision networks are typically “solved” by working backwards in time from the last decision to the first.

The expression NodeExpectedUtils(node) will only return a meaningful result if either, node represents the first sequential decision, or all prior decisions have been made (and their values are known).

Value

This should return a named numeric vector of length NodeNumStates(node) with each element corresponding to one of the states of node.

Warning

This function is currently returning an internal Netica error. Do not use until I get clarification from Norsys.

Author(s)

Russell Almond

References

http://norsys.com/onLineAPIManual/index.html: GetNodeExpectedUtils_bn()

For more about decision nets: http://www.norsys.com/WebHelp/NETICA/X_Decision_Problems.htm

See Also

NodeKind(), NodeValue(), NodeExpectedValue()

Examples

sess <- NeticaSession()
startSession(sess)

## Read the RTI network from the library.
rti <- ReadNetworks(file.path(library(help="RNetica")$path,
                           "sampleNets","CostOfTesting.dne"), session=sess)
## The two decision nodes
Test <- NetworkFindNode(rti,"Test")
Instruction <- NetworkFindNode(rti,"Instruction")

## Network must be compiled before analysis:
CompileNetwork(rti)


NodeExpectedUtils(Test)
## Not run: 
## This produces an error because Test is not set.
NodeExpectedUtils(Instruction)

## End(Not run)
NodeFinding(Test) <- "Yes"
NodeExpectedUtils(Instruction)


DeleteNetwork(rti)
stopSession(sess)


[Package RNetica version 0.7-3 Index]