# How to statistically model this group difference?

I am studying if men and women consumers differ in how attractive they find product advertisements written differently. I am specifically looking at positive and negative sentiments as two characteristics of the product description.

In my dataset, each row has 5 key fields: (1) consumer id, (2) gender of the consumer, (3) id of the product he/she purchased, (4) positive sentiment score of product text description, and (5) negative sentiment score of product text description. I also have additional control variables (e.g., product category).

I would like to know the gender differences in attractiveness of a product description - i.e., whether men and women consumers differ in their propensity to buy a product depending on the product description's positive and negative sentimentality scores.

What is the best way to model and test this? How do I control for the nested nature of the products (products within categories), and nested nature of consumers (each consumer buys multiple products)?

[Please note that each consumer may buy multiple products and each product may attract multiple consumers. What I do have in my dataset is all products purchased by a given consumer. But, I don't have all consumers for a given product (some consumer data is missing)].

• Simple t-test if the variables follow normal distribution, and Wilcoxon rank sum test otherwise. – prashanth Oct 4 '18 at 10:38
• Thanks @prashanth. But how do I take care of nesting in such tests? I have multiple records for each consumer. – Bensun Oct 4 '18 at 13:24