Hierarchical Dependent Variable I am building a predictive fraud model for insurance claims. Fraud can be at claim level or service level. "Service level" is more granular. There are multiple services under one claim. See the example below -
+-------+---------+-------+
| Claim | Service | Fraud |
+-------+---------+-------+
|     1 |      12 |     1 |
|     1 |      13 |     0 |
|     1 |      14 |     0 |
|     2 |      13 |     1 |
|     2 |      14 |     0 |
+-------+---------+-------+

In the above example, the target variable - fraud refers to claim involves fraud/non-fraud at service level. The whole claim can also be fraud which means all the services under a claim can also be fraud. Some independent variables are at claim level and some at service level. How can i build classification model using this kind of data? Should I prepare model separately for both claim and service level?
 A: Most classifiers will deal with hierarchical data just fine. The exact way structures like this turn out depends on the classifier, but a random forest classifier for example, will sometimes select the service column, and somethimes the fraud column, and things will work out. So -as far as I am aware- specific tricks for taking advantage of hierarchical structure in your data are not common in typical classifiers such as support vector machines, random forests or gradient boosted trees. It is usually not a good idea to create separate classifiers for different parts of your data, unless the rows have really nothing in common, but that is definitely not the case here. 
If you are talking about creating a generative model for this data, so a generalized linear model or something similar, with a hierarchical structure, then it is on the other hand very common to explicitly model this hierarchy. In which case I recommend learning about those from a tutorial of choice, and I recommend the book or the video series from http://xcelab.net/rm/statistical-rethinking/, allthough it will take a while to reach the hierarchical models through that route. It may help you to know that these models are known under a lot of different names, such as mixed-effect models, varying effects, random effects, hierarchical models, or multilevel models. 
