I have a question that I am sure you can help me with.
I have data on 100 individuals from an experiment, including a bunch of characteristics for each of these individuals (gender, field of specialty, etc...).
These individuals were during the experiment subjected to two successive and different treatments, in random order. A dependant continuous variable (risk-taking) was measured for each treatment. I therefore have two measures of this dependent variable per participant, one for each treatment. I am interested both in the effect of the treatment and the effect of the individual characteristics (gender, field of specialty, etc..) on risk-taking. See scheme below (with ID the identifying number of the individual).
I was advised on StackExchange to use a "mixed effect model with observations within persons", which makes sense to me. I think the correct operationalization in Stata would be:
Is it correct or am I on the wrong path?
Thank you in advance!
I have data on 100 individuals from an experiment, including a bunch of characteristics for each of these individuals (gender, field of specialty, etc...).
These individuals were during the experiment subjected to two successive and different treatments, in random order. A dependant continuous variable (risk-taking) was measured for each treatment. I therefore have two measures of this dependent variable per participant, one for each treatment. I am interested both in the effect of the treatment and the effect of the individual characteristics (gender, field of specialty, etc..) on risk-taking. See scheme below (with ID the identifying number of the individual).
I was advised on StackExchange to use a "mixed effect model with observations within persons", which makes sense to me. I think the correct operationalization in Stata would be:
Code:
xtmixed Risk Gender Specialty Treatment ... || ID:
Thank you in advance!
Comment