# OLS, Fixed effects or Random effects Model?

I am a little bit confused about type of model to apply because my type of data.

I am interesting in get regression parameters for time (dependent variable) with independent variables= sex + age+ var3+var4 (maybe patient) my data have multiple measures by patient.

My first idea was apply ols, but now I am reading about models with fixed effect and random effects (xtreg in stata) and maybe I thought that I should use a fixed effect model, one example of my data is below, data is unbalanced:

Time, Var3 and Var4 are continous.

Any suggestion I would appreciate

• In your data above, the same patient different values for sex. How is that possible. Also, are they at different ages at different time points? – dbwilson Jul 12 '18 at 20:23
• Do you plan on using age as a categorical variable or a continuous (or at least linear) variable? – dbwilson Jul 12 '18 at 20:24
• Sorry for my mistake, I fix the error. – Rodrigo B Jul 12 '18 at 20:27
• Age as categorical. – Rodrigo B Jul 12 '18 at 20:28
• I'd recommend a linear mixed effects model. In Stata something like this: mixed time i.sex i.age || patient: – COOLSerdash Jul 12 '18 at 20:30