PnodeDefaultAlphas | R Documentation |
Combination rules can be sorted into multiple-a rules (e.g.,
Compensatory
) and multiple-b rules (e.g.,
OffsetConjunctive
). The function
isOffsetRule
distinguishes between the two
types. These functions adjust the log alpha or beta matrix to the
correct length depending on the rule and parents of the node
argument.
PnodeDefaultAlphas(node, rule=PnodeRules(node), link=PnodeLink(node) )
PnodeDefaultBetas(node, rule=PnodeRules(node), link=PnodeLink(node))
node |
A |
rule |
A rule (e.g., |
link |
A link function (e.g., |
A vector of zeros of a suitable length to be used as a default value
for PnodeLnAlphas(node)
or
PnodeBetas(node)
.
These are used in the PNetica implementation of the
Pnode
constructor.
Russell Almond
Pnode
, PnodeLnAlphas
,
PnodeBetas
, isOffsetRule
## Not run:
library(PNetica) # Requires PNetica
sess <- NeticaSession()
startSession(sess)
EM1 <- ReadNetworks(system.file("testnets", "PPcompEM.dne",
package="PNetica"),
session=sess)
EM2 <- ReadNetworks(system.file("testnets", "PPconjEM.dne",
package="PNetica"),
session=sess)
comp <- PnetFindNode(EM1,"CompensatoryObs")
conj <- PnetFindNode(EM2,"ConjunctiveObs")
stopifnot(
PnodeDefaultAlphas(comp,"Compensatory") == c(0,0),
PnodeDefaultBetas(comp,"Compensatory") == 0,
PnodeDefaultAlphas(conj,"OffsetConjuctive") == 0,
PnodeDefaultBetas(conj,"OffsetConjunctive") == c(0,0)
)
DeleteNetwork(list(EM1,EM2))
stopSession(sess)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.