比如数据是这样的:
Title1 Name A|Name B 2
Title2 Name A 1
Title3 Name A 1
Title4 Name A 1
Title5 Name B 1
Title6 Name B 1
Title7 Name B 1
作者A和B都各自写过四本书,但他们合作的书只有title1, 所以at_least_2_authors_repeat的值只能是0.
只有出现了类似”Title 8 Name A|Name X|Name B...“这样的记录,at_least_2_authors_repeat才是1.
而在下面的例子中,任何一行的at_least_2_authors_repeat都是0,因为没有哪两个作者共同参与过两本或两本以上的书。
Title1 Name A|Name B 2
Title2 Name B|Name C 2
Title3 Name C|Name D 2
Title4 Name D|Name E 2
Title5 Name E|Name F 2
Title6 Name F|Name G|Name H|Name I|Name J|Name K 6
按照楼主的描述,我理解是这样的。
如果A,B同时出现在title 1,title 2, title 3中,那这三条记录的at_least_2_authors_repeat都是1。
”
变量举例描述: 比如at_least_2_authors_repeat:title3有name A, name C, name E, name Z 四个author 如果其中至少两个名字在别的observation里也出现过,那么at_least_2_authors_repeat = 1, 如果任意两个名字在其他observation里都没有出现过,那么at_least_2_authors_repeat = 0.
从目前数据看来,A 和 C 在title 2 中出现过,所以title 2 和title3 的at_least_2_authors_repeat取值为1.
“
变量举例描述: 比如at_least_2_authors_repeat:title3有name A, name C, name E, name Z 四个author 如果其中至少两个名字同时在别的observation里也出现过,那么at_least_2_authors_repeat = 1, 如果任意两个名字在其他observation里都没有同时出现过,那么at_least_2_authors_repeat = 0.