# Non-converging heteroscedastic linear mixed-effects model (R lme)

I'm working on a project where I try to determine the influence of consulting expenditures companies made the year before on several economic figures. My dataset consists of roughly 2'000 different companies together with data for 2-7 years, thereby all continuous variables are log-transformed and vary roughly on the same scale.

To account for the occuring correlations I use a linear mixed-effect model (R lme) with the intercept as the only random effect. Under this setting, strong heteroscedasticity occurs and since I'm unable to determine any variance covariate, I wish to use weights=varIdent(form=~1|Subject) to assign each company its own variance. However, using the weights command in this way leads to a non-converging model.

To get convergence, I tried two things:

1. I tried to estimate the residual variance by the original variance of the dependent variable and added weights=varPower(form=~original_variance). While this leads to nicer looking residuals, the estimation produced obviously wrong results.
2. I estimated the model first without the weights argument and used the resulting residual variance in a second step again as the argument to weights=varPower(form=~residual_variance). This leads to better-looking residuals and at the same time the result seem to make a lot more sense.

Now my question: is approach 2 valid or do I bias the model in any way or produce wrong within-group variance-estimations and therefore wrong confidence intervals?

• This doesn't answer your question, so I'll not put it in the answers. I have had similar problems before, and found that it was due to the scaling of the data. Also, have you tried using the package plm? Since your panel is unbalanced, I'm pretty sure lme will give you inconsistent results. – Jim Jan 22 '14 at 3:16
• Thanks for the suggestions! I'm quite sure that lme is able to handle unbalanced data, but I'll try plm out to see how the results look there. I'm also pretty sure that scaling isn't the problem, as all continuous variables are log-transformed and hence vary more or less on the same scale (sorry for forgetting to state this in the original question!). – user1449306 Jan 22 '14 at 10:24