What model to use for possibly correlated measurements to estimate evolvement over time? I have measurements of rail roughness at different points in time at at different locations. I have between 1 to 10 observations for each location. Most likely there is a correlation between the observations at one location. My final goal is to build a model that allows me to predict rail roughness after a certain amount of time. Fore each location, I know when roughness is zero (after grinding) and for some ob the locations, I know for example roughness after 7, 15, and 25 days. In addition, I have other features like the machine that was used to grind. I used standard GLM (with Location as a categorical feature) and a mixed model (with a location-specific random intercept) so far. Are those models legitimate? Any comments or ideas are highly appreciated!

Both models are a legitimate way to account for correlations within clusters/groups/locations, unless there is some residual autocorrelation, which you can assess with residual plots, and potentially model jointly. You don't say how many locations you have, but if you have lot then a mixed model is usually a better approach, since it preserves degrees of freedom, has a bit better statistical power and more parsimoneous. But if you are only interested in prediction, and not inference, then this point is fairly mute.  I wouldn't expect much difference between the two.
