EnterIntervalFinding {RNetica}R Documentation

Enter finding of value within an interval

Description

Sets the finding associate with node to an interval.

Usage

EnterIntervalFinding(node, low, high, retractFirst = TRUE)

Arguments

node

An active NeticaNode object that references the node.

low

Lower bound of interval.

high

Upper bound of interval.

retractFirst

A logical value. If true, any previous findings will be retracted first.

Details

The node must a continuous node that has been discretized using NodeLevels(node). The probabilities for each state are calculated based on a uniform distribution with the given low and high endpoints.

Value

Return the node argument invisibly.

Note

The internal Netica function EnterIntervalFinding_bn is not behaving at all like what I expected. In particular, I expect that it would behave like a uniform likelihood, but instead it seems to be behaving as if I typed the expression NodeValue(node)<-low. I've queried Norsys about this.

Meanwhile, I've worked around by calling NodeLikelihood instead of the internal Netica function.

Author(s)

Russell Almond

References

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

See Also

EnterNegativeFinding(), EnterFindings(), RetractNodeFinding(), NodeLikelihood(), NodeFinding(), EnterGaussianFinding(), NodeValue()

Examples

sess <- NeticaSession()
startSession(sess)

cirt5 <- CreateNetwork("ContinuousIRT5", session=sess)

theta <- NewContinuousNode(cirt5,"Theta")
NodeLevels(theta) <- c(-5,-2.5,-1.5,-0.5,0.5,1.5,2.5,5)
NodeProbs(theta) <- rep(1/NodeNumStates(theta),NodeNumStates(theta))

CompileNetwork(cirt5) ## Ready to enter findings

EnterIntervalFinding(theta,-1,1)
NodeBeliefs(theta)

stopifnot(all(abs(NodeBeliefs(theta)*4-c(0,0,1,2,1,0,0))<.0001))


DeleteNetwork(cirt5)
stopSession(sess)


[Package RNetica version 0.7-3 Index]