EnterGaussianFinding {RNetica}R Documentation

Enter a numeric finding with uncertainty

Description

This function a likelihood for a node that follows a Gaussian distribution with a given mean and standard deviation. This is entered as virtual evidence.

Usage

EnterGaussianFinding(node, mean, sem, retractFirst = TRUE)

Arguments

node

An active NeticaNode object that references the node. Node should be continuous, or have numeric value ranges assigned to it using NodeLevels(node).

mean

A numeric scalar giving the observed value (mean of the normal).

sem

A nonnegative numeric scalar giving the standard error of measurement for the observed finding (standard deviation of the normal).

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 Gaussian distribution with the given mean and sem (SD).

Value

Return the node argument invisibly.

Warning

The Netica function EnterGaussianFinding_bn is not behaving at all like what I expected. In particular, I expect that it would behave like a normal likelihood, but instead it seems to be behaving as if I typed the expression NodeValue(node)<-mean. 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: EnterGaussianFinding_bn(),

See Also

EnterNegativeFinding(), EnterFindings(), RetractNodeFinding(), NodeLikelihood(), NodeFinding(), EnterIntervalFinding(), 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

EnterGaussianFinding(theta,0,1)
NodeBeliefs(theta)

stopifnot(all(abs(NodeBeliefs(theta) -
              diff(pnorm(NodeLevels(theta),0,1))) < .0001))

DeleteNetwork(cirt5)
stopSession(sess)


[Package RNetica version 0.7-2 Index]