Running ANCOVA with categorical covariates - how to set up dataset? I am analyzing a dataset in which 80 participants rated 4 products (product A, product B, product C, product D) from -3 to 3 depending on how much they liked the product.  Each participant provided categorical demographic information such as gender, ethnicity, age group, and employment status.
I would like to run an ANCOVA with the product type as the IV, the rating number as the DV, and all of the demographic variables as categorical covariates.
Should my dataset have 320 rows with the following columns: Product, Rating, Gender, Ethnicity, AgeGroup, EmploymentStatus?  Each participant would have 4 rows such that there is a row for their product A, B, C, and D rating. I would repeat their demographic data for each row.  Or should I set up my data differently?
Additionally, I plan to use SPSS and dummy code each of the categorical covariates with C-1 groups and input these categorical covariates in the "Covariate" box and not the "Fixed Factors" box in the Analyze - Univariate - GLM tool. Would this be the right way to go about this?
Thank you kindly for any advice!
 A: The proposed model is not an ANCOVA. ANCOVA is a model with a continuous outcome, a categorical independent variable of primary interest (main exposure), and one of more continous variables that are potential confounders or competing exposures.
The distinction isn't really important because it's just another (multivariable) regression model. So the model would look like:
rating ~ product + covariates

and you would be interested in the estimates for the different levels of product, while controlling for the covariates. However I see two problems with this model. First, is it reasonable to treat rating as continuous when it appears to be ordinal with 7 levels? I would suggest proceding with it as continuous but also compare it with an ordinal model. But the main issue I see is that you have repeated measures within participants, so the ratings for one participant are more likely to be similar to each other than to those of other partipants. That is, the observations are not independent. One way to handle that is to fit a mixed effects model with random intercepts for participant.
As for the question about how to set up the data, yes, 320 with each row corresponding to one rating would be the way to go, with most software that I am aware of.
