EnterGaussianFinding {RNetica} | R Documentation |
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.
EnterGaussianFinding(node, mean, sem, retractFirst = TRUE)
node |
An active |
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. |
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).
Return the node
argument invisibly.
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.
Russell Almond
http://norsys.com/onLineAPIManual/index.html: EnterGaussianFinding_bn(),
EnterNegativeFinding()
, EnterFindings()
,
RetractNodeFinding()
, NodeLikelihood()
,
NodeFinding()
, EnterIntervalFinding()
,
NodeValue()
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)