PnetHub: Returns the name of the hub net if this is a spoke net.

PnetHubR Documentation

Returns the name of the hub net if this is a spoke net.

Description

The hub-and-spoke model divides a complete model up into a central hub model (call a proficiency or competency model in educational applications) and spoke models (or evidence models) which reference variables in the hub network. If a network is a spoke, then the field PnetHub should be set to the name of the corresponding hub network.

Usage

PnetHub(net)
PnetHub(net) <- value

Arguments

net

A Pnet object whose hub name is to be accessed.

value

A character scalar giving the name of the new hub network.

Value

The getter method returns either a character vector of length 1 giving the name of the hub, or NA or the empty string if no hub is set.

The setter method returns the net argument.

Author(s)

Russell Almond

References

Almond, R. G. & Mislevy, R. J. (1999) Graphical models and computerized adaptive testing. Applied Psychological Measurement, 23, 223–238.

Almond, R., Herskovits, E., Mislevy, R. J., & Steinberg, L. S. (1999). Transfer of information between system and evidence models. In Artificial Intelligence and Statistics 99, Proceedings (pp. 181–186). Morgan-Kaufman

Almond, R. G. (presented 2017, August). Tabular views of Bayesian networks. In John-Mark Agosta and Tomas Singlair (Chair), Bayeisan Modeling Application Workshop 2017. Symposium conducted at the meeting of Association for Uncertainty in Artificial Intelligence, Sydney, Australia. (International) Retrieved from http://bmaw2017.azurewebsites.net/

See Also

Pnet, PnetAdjoin (for merging hub and spoke), Qmat2Pnet, Pnet2Qmat

Examples

## Not run: 
library(PNetica) # Requires PNetica
sess <- NeticaSession()
startSession(sess)
curd <- setwd(system.file("testnets",package="PNetica"))

PM <- ReadNetworks("miniPP-CM.dne", session=sess)
stopifnot(PnetHub(PM)=="")


EM1 <- ReadNetworks("PPcompEM.dne", session=sess)
stopifnot(PnetHub(EM1)=="miniPP_CM")

foo <- CreateNetwork("foo",sess)
stopifnot(is.na(PnetHub(foo)))
PnetHub(foo) <- PnetName(PM)
stopifnot(PnetHub(foo)=="miniPP_CM")

DeleteNetwork(list(PM,EM1,foo))
stopSession(sess)
setwd(curd)


## End(Not run)

ralmond/Peanut documentation built on Sept. 19, 2023, 8:27 a.m.