# repeated measures poisson? R

have searched and found similar qs to mine but still confused on how to approach this..

i have data (dat) of the following form

favorite veg group1 group2 Avg IQ Avg # of Siblings Year
potato 100 123 115 4 2001
carrot 198 156 120 6 2001
potato 196 150 130 2 2002
carrot 127 111 112 3 2002
potato 201 100 118 3 2003
carrot 178 98 121 4 2003

Lets say (barring everything that may or may not make sense about the data) I am trying to perform a repeated measures Poisson regression w/ the number of people endorsing a veg in group 1 as my outcome, and avg IQ & # of siblings as a predictors.

is the code below an appropriate way to achieve this? thank you all!!

regress <- glm(group1 ~ favorite veg*Year + Avg IQ +
Avg # of Siblings, data = dat,
family = "poisson")

• what is the repeated sampling unit? – Ben Bolker Jun 7 at 2:43
• @BenBolker sorry but not sure what this means 😭 – tataṣe Jun 7 at 3:08
• a repeated measures analysis means that there is some level of grouping for which you have measured the same individuals/units/blocks/whatever more than once (not necessarily the same level of replication for each group). If you're only using group1, this doesn't necessarily sound like a repeated measures analysis ... – Ben Bolker Jun 7 at 3:32
• would it become one if i'm using group 2 as well? in the real dataset i'm using i'm doing this, but thought i would have to consider group 2 as the outcome variable in a second regression. what would be the appropriate way to do this w/ repeated measures? – tataṣe Jun 7 at 11:57
• From @Kirsten: I am a little curious about what you actually want to answer? Based on the comment above it seems like you are looking for a way to make the analysis a repeated measures analysis, maybe because of an exercise? If you are not sure about the model approach or the question you want to ask, try to elaborate relevant information in more details. – Ben Bolker Jun 17 at 18:59