I have a data frame with family IDs, and each line shows the course they consumed at a time, I want to know how to measure how many and which courses

So, I have a data frame, with the courses listed, IT, private classes, arts, sports and tutoring. Each line has the family id and the course it consumes and other variables about the family. If this family consumes 2 courses, 2 lines will appear with their ID code and the specific course. So, how do I measure this, and how do I build this data frame with the results? Remembering that my ultimate objective of my research is to measure the probability of people who consume a course, also consuming other courses.

An example of the response I want to generate in my work, from this data frame, is:

75 por cent of the families that consumed arts, consumed other courses. Being 50 percent sports

data frame <- (ID_FAMILY, COURSES, WEIGHT)

I tried different ways, as it is a sample survey and to include weight. I didn't know how

Upvotes: 0

Views: 12

Answers (0)

Related Questions