I am looking for a way to perform linear regression in R. So far I have done a lot of regression analyses, but never with repeated measures.
My dataset has the following variables:
- DV - the dependent variable - a continuous variable
- IV1 - first independent variable (gender) - dichotomous variable
- IV2 - second independent variable - continuous variable
- MEAS_POINT - dichotomous variable indicating the measurement point at which the data was collected (1 or 2)
- S.ID - subject ID
DV and IV2 were collected at two timepoints as indicated by MEAS_POINT but IV1 (gender) was obviously measured only once.
The data is in long format.
I have no idea on how to set up a model and I don't even know if the data needs to be in long or wide format.
Also, I have no clue on how to set up an interaction term. Any help would be hugely appreciated.