if (FALSE) {
#################
#
# Leighton et al. (2004, p.210)
#
##################
# linear structure A1->A2->A3->A4->A5->A6
K <- 6
linear=list(c(1,2),c(2,3),c(3,4),c(4,5),c(5,6))
att.structure(linear,K)
# convergent structure A1->A2->A3->A5->A6;A1->A2->A4->A5->A6
K <- 6
converg <- list(c(1,2),c(2,3),c(2,4),
c(3,4,5), #this is how to show that either A3 or A4 is a prerequisite to A5
c(5,6))
att.structure(converg,K)
# convergent structure [the difference between this one and the previous one is that
# A3 and A4 are both needed in order to master A5]
K <- 6
converg2 <- list(c(1,2),c(2,3),c(2,4),
c(3,5), #this is how to specify that both A3 and A4 are needed for A5
c(4,5), #this is how to specify that both A3 and A4 are needed for A5
c(5,6))
att.structure(converg2,K)
# divergent structure A1->A2->A3;A1->A4->A5;A1->A4->A6
diverg <- list(c(1,2),
c(2,3),
c(1,4),
c(4,5),
c(4,6))
att.structure(diverg,K)
# unstructured A1->A2;A1->A3;A1->A4;A1->A5;A1->A6
unstru <- list(c(1,2),c(1,3),c(1,4),c(1,5),c(1,6))
att.structure(unstru,K)
## See Example 4 and 5 in GDINA function
}
Run the code above in your browser using DataLab