I am really new to Stata, so my apologies if it's a simple question or if I misunderstood something.
So, I have made a linear mixed model using the following code:
Code:
mixed resid_diur i.ACEorARB i.mtpnt || ID:
I want to adjust my model for baseline variables, but because the variables are only measured at mtpnt = 0, I only have 1 data point per ID, so e.g. Person 1 has 1952, Person 2 has 1950
However, when I use the variable 'year_of_birth', which just has the same data but copied, so e.g. Person 1 has 1952, 1952, 1952, 1952 for all time points available, the model works.
I thought I could just add them to the model, but I get the following error: ''could not calculate numerical derivatives -- discontinuous region with missing values encountered''
Could anyone please tell me how to deal with this, I would appreciate it a lot.
0 Response to Adding baseline variables to a linear mixed model
Post a Comment