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

This function 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. Use with caution until I get a clarification.

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)
theta[] <- rep(1/NodeNumStates(theta),NodeNumStates(theta))

CompileNetwork(cirt5) ## Ready to enter findings

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

## I expect this to look like:
diff(pnorm(c(-5,-2.5,-1.5,-0.5,0.5,1.5,2.5,5)))
## But it doesn't!

DeleteNetwork(cirt5)
stopSession(sess)


[Package RNetica version 0.5-4 Index]