Statistic.NeticaNode | R Documentation |
"NeticaBN"
class.These are the implementation for the basic statistic calculation methods.
All methods have signature signature(net = "NeticaBN", node =
"NeticaNode")
and signature(net = "NeticaBN", node =
"character")
. The later form is more often used, and takes the name
of the node and finds the appropriate node in the network.
Calculates the marginal distribution of the node. Statistic returns a named vector of values.
Calculates the expected value of the
node; assumes numeric values have been set with
PnodeStateValues
.
Calculates the standard deviation of
the node; assumes numeric values have been set with
PnodeStateValues
.
Calculates the median state (state whose cumulative probability covers .5) of the node. Statistic returns the name of the state.
Calculates the modal (most likely) state of the node. Statistic returns the name of the state.
Russell Almond
Almond, R.G., Mislevy, R.J. Steinberg, L.S., Yan, D. and Willamson, D. M. (2015). Bayesian Networks in Educational Assessment. Springer. Chapter 13.
Statistics Class:
Statistic
Constructor function:
Statistic
calcStat
These statistics will likely produce errors unless
PnetCompile
has been run first.
sess <- NeticaSession()
startSession(sess)
irt10.base <- ReadNetworks(system.file("testnets","IRT10.2PL.base.dne",
package="PNetica"),session=sess)
irt10.base <- as.Pnet(irt10.base) ## Flag as Pnet, fields already set.
irt10.theta <- PnetFindNode(irt10.base,"theta")
irt10.items <- PnetPnodes(irt10.base)
## Flag items as Pnodes
for (i in 1:length(irt10.items)) {
irt10.items[[i]] <- as.Pnode(irt10.items[[i]])
}
## Make some statistics
marginTheta <- Statistic("PnodeMargin","theta","Pr(theta)")
meanTheta <- Statistic("PnodeEAP","theta","EAP(theta)")
sdTheta <- Statistic("PnodeSD","theta","SD(theta)")
medianTheta <- Statistic("PnodeMedian","theta","Median(theta)")
modeTheta <- Statistic("PnodeMedian","theta","Mode(theta)")
BuildAllTables(irt10.base)
PnetCompile(irt10.base) ## Netica requirement
calcStat(marginTheta,irt10.base)
calcStat(meanTheta,irt10.base)
calcStat(sdTheta,irt10.base)
calcStat(medianTheta,irt10.base)
calcStat(modeTheta,irt10.base)
DeleteNetwork(irt10.base)
stopSession(sess)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.