lisy: Linear Syllogism Generator

Description Usage Arguments Details Author(s) References See Also Examples


This function generates linear syllogistic reasoning items. This is for research purposes.


lisy(seed = 1, nclues = 4, nspread = 5, clone = NULL,
  incidental = "names", linear = FALSE, antonym = "both", ninfer = 1,
  direct = "ob", Ndist = 4, dist = "mixed", distprob = 0.5,
  itemSet = "random", items = NULL, scales = NULL)



Generates the same question again from local computer.


Generates the number of sentences to make up the item.


Calculates the spread of possible incidentals in total.


Null means that every generated item may or may not have a different position in the inference. If given a numeric value, then the items will have the same inference position.


Tells the function whether the item features are 'names' or 'objects'.


Linear is the line of thought. If linear is TRUE, then the comparions are going in either forward or backward direction. The direction is based on the direct argument. When linear is FALSE, some extra incidentals (e.g. random names) that are not useful are also generated in the statement. The hypothesis is that people may have to create two or more mental models, completing with each other to find the correct answer amongst the response options.


Determine whether to use both antonyms ('both') or only one type ("first" or "second").


Generate answers that requires a X amount of inference from the items. Up to 3 is the maximum.


Deciding on whether the statements are organised in an ordered ("of" = ordered forward / "ob" = ordered backward), randomly selected ordered ('alt' = alternative) fashion or unordered('mixed') fashion. Note. 'alt' can only be used when ninfer is equal to 3.


Returns the number of distractors per question.


Select the type of distractors. You have three options ('mixed', 'invalid','false'). If dist='false', then the number of false distractors must be less than the number of clues by 1.


Calculates the number of comparison variation for the distractors.


This is the choice of itemset you want. If itemSet='random' then the generator will randomly select one ('People', 'Fruits', 'Superheroes'). Change itemset='own' if you are using your own item set.


Input own incidental features, with at least 10 of them. Default incidental features (either names, objects or superheros ) are used when items = NULL.


Input own antonyms. At least 2 antonyms (i.e."bigger","smaller"). Default antonyms are used when scales = NULL.


There are several things to note. To use own item set, please have at least 10 incident features (e.g. 10 different names). In order for antonyms comparison to work, please ensure that you have at least 2 antonyms The function will stop if the criteria is not met. The genearation of items are slower if you have a huge item set (e.g. In the millions!).

When nspread and nclue is = 3. This means that there are 3 sentences, and only 3 names. This makes it impossible to generate an invalid distractor. As such, only the false distractors will be created. Since there are only three clues, then at most 2 false distractors can be created.

When nspread and nclues are the same, all the names of the distractors will be taken from the names that are used in the clues. As nspread value increases, the likelihood of having names not taken from the clues increases. Making the distractors fairly easy as there is a higher likelihood that the names taken from the matrix might not appear in the clues. Hence, keeping the value of nspread and nclue as close as possible is recommended.

This function only generates items that requires up to 3 inferences. As the required inferences increases, then number of clues needed also increases. Inference is the implied comparison between sentences which allows the test taker to make an inform decision. When ninfer = 1 and the antonym is declared as either 'first' or 'second', then the correct answer will always be the opposite of the antonym used in the sentence. When ninfer = 2, the correct answer will be in the right direction.

Direct is the direction of the clue provided. In the function, the argument direct = "ob" means that solving the items requires the test taker to work 'ordered backward'. If it is 'of', it means 'ordered forward'. Finally, if it is 'alt', then it means the clues are not in order. direct = 'alt' can only be used when ninfer = 3. The clues provided in the question are useful for the first three arguments. However, when direct = "mixed", this means that the sentences are randomly placed. Making it difficult for the participant to form a linear array of the item. In this case, the clues are not useful, so NA is given in the output instead.

When linear = TRUE, the sentence structure will be in a linear order. i.e. when antonym = "first" or antonym = "second" and direct = "of", the names will follow in a linear sequence (A > B, B > C, C > D). However, when antonym = "first" or antonym = "second" and direct = "ob", then the sentence structure changes to becomes (C > D, B > C, A > B). When antonym = "both", the names will still follow a linear sequence either forward or backward, but the antonyms will interchange between sentence (i.e. A > B, C < B, C > D). Nevertheless, 'A' will always be bigger than the 'D'. The argument direct = 'alt' cannot be used when linear = TRUE.

When linear = TRUE and infer = 3, the last sentence will not be one of the clues for the inference. If you want to study distance effect, then what is recommended is to generate the items with ninfer = 3, and remove the last clue in the sentence structure.

When linear = FALSE, there might be a possible of having just a single mental model, or having completing mental models. This is random and will depend on the seed selected. The statements are randomly placed but in the general order of the direct argument provided. The clues remain in the order given based on the direct argument.

When distprob = 0.5, the distribution of the antonym for the distractors will be mixed. When distprob is either 1 or 0, then only one of the two antonym will be used. This is only used if one wishes to study distractor analysis.


Aiden Loe and Francis Smart


Leth-Steensen, C., & Marley, A. A. J. (2000). A model of response time effect in symbolic comparison. Psychological Review, 107, 62-100.

Sternberg, R. J. (1980). Representation and process in linear syllogistic reasoning. Journal of Experimental Psychology: General, 109(2), 119.

Sedek, G., & Von Hecker, U. (2004). Effects of subclinical depression and aging on generative reasoning about linear orders: Same or different processing limitations?. Journal of Experimental Psychology: General, 133(2), 237.

See Also

arith, spatial2d, spatial3d


#Generate an item with default item set
lisy(seed=10,nclues=4,nspread=6,clone = NULL,incidental='names',linear=FALSE,
    antonym="first",ninfer = 3, direct='ob', Ndist=3,
    items= NULL,scales = NULL)

#Item set
superheroes <- c('Spider man','Super man','Batman','Wolverine',
'Catwoman','Thor','The Shadow','Silver Surfer', 'Flash','Wonder woman',
'Mr. Fantastic', 'Aqua man', "Hawkeye", 'Starfire', 'Venom', "General Zod")

compare <- c("taller","shorter", "older", "younger",
 "smaller", "bigger","stronger", "weaker")

#Generate item with own dataset
lisy(seed=1,nclues=4,nspread=6,clone = NULL,incidental='names',linear=FALSE,
    antonym="first",ninfer = 3, direct='ob',
    Ndist=3, dist="mixed",distprob=0.5,
    itemSet='own',items= superheroes, scales = compare)

#loop through 30 items
run <- NULL
for(i in 1:30){
 run[[i]]<-AIG::lisy(seed=i,nclues=4,nspread=5,clone = 1,incidental='names',linear=TRUE,
                     antonym="both",ninfer = 3, direct='of', Ndist=3,
                    items= NULL,scales = NULL)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
`.env` is deprecated and no longer has any effect
Linear Syllogism Item 
Item 10

Sentence: The pear is more fresh than the peach, the apple is more fresh than the pear, the avocado is more fresh than the orange, the tomato is more fresh than the apple. Which of the following is implied?

Number of inferences to solve the question: 3
Clues: 4 2 1

Answer: The tomato is more fresh than the peach.
Distractor 1:The pear is less fresh than the peach.(false)
Distractor 2:The pear is more fresh than the apple.(false)
Distractor 3:The tomato is less fresh than the orange.(invalid)
Distractor 4: NA(NA)`.env` is deprecated and no longer has any effect
Linear Syllogism Item 
Item 1

Sentence:  Hawkeye is stronger than  Aqua man,  Flash is stronger than  Hawkeye,  Flash is stronger than  Batman,  Thor is stronger than  Flash. Which of the following is implied?

Number of inferences to solve the question: 3
Clues: 4 2 1

Answer:  Thor is stronger than  Aqua man.
Distractor 1: Thor is weaker than  Hawkeye.(false)
Distractor 2: Batman is stronger than  Thor.(false)
Distractor 3: Batman is stronger than  Aqua man.(invalid)
Distractor 4: NA(NA)

AIG documentation built on May 1, 2019, 11:29 p.m.

Related to lisy in AIG...