(How) can I conduct a chi-square test but with random effects? I gave my participants the same survey daily for a week. For one of the questions, they indicated whether they used option A or option B. I want to know whether people use one of the options sig. more than the other, so I thought I’d use a chi-square test for independence – but then realised I probably have to include random effects of PID and/or day.
Now I’ve looked it up a bit and a strategy that makes most sense to me is to have count as DV and then have option A and B as two IVs (and then the random effects as above, in lmer) but I don’t really understand how this works (specifically how my columns would look like in the data set-up).
Is this the most sensible option? If no, what’s better? If yes, please help me understand what to do.
Any pointers would be really appreciated!

So the question has two answers, "A" or "B"? And each participant answers it seven times? This gives you a binomial distribution. If the participant has no preference, than the odds of all the answers being "A" is 1/128. I suggest first making a plot with the number of "A" answers as the x axis, and the count of participants as the y axis. If this matches the binomial distribution, then there is no evidence that some participants have preferences. If it is a different shape, e.g. bimodal, then perhaps you have different populations of participants with different preferences.
Do you want also to test for hypotheses like "A is more popular on Mondays"? Then do a similar plot, with day of the week on the x axis.
These two single factor plots would not reveal more complicated patterns, e.g. "men prefer A at the start of the week, and women prefer A at the end fo the week".
