library(CPTtools)
library(RNetica)
library(Peanut)
library(PNetica)

Generate the session

sess <- NeticaSession()
startSession(sess)

Build the Net

Create an empty net and add the nodes.

testNet <- CreateNetwork("testNet",sess)
skills <- NewDiscreteNode(testNet,paste("Skill",1:2,sep=""),
                          c("H","M","L"))
rules <- list(
  comp=Compensatory,
  conj=OffsetConjunctive,
  dis=OffsetDisjunctive,
  mixed=list(OffsetConjunctive,Compensatory,Compensatory,OffsetDisjunctive)
  )

correct <- NewDiscreteNode(testNet,paste(names(rules),"correct",sep="_"),
                           c("Correct","Incorrect"))
names(correct) <- names(rules)
graded <- NewDiscreteNode(testNet,paste(names(rules),"graded",sep="_"),
                          c("A","B","C","D","F"))
names(graded) <- names(rules)

Now add the links.

```{r parents] NodeParents(skills[[2]]) <- skills[1] for (r in names(rules)) { NodeParents(correct[[r]]) <- skills NodeParents(graded[[r]]) <- skills }

## Add distributions

### Normal Link

```r


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