# Help with lmer in the lme4 package

I am new to using linear mixed models and would greatly appreciate any help I can get.

I have an equation of the form $y = X\beta + Zu + \epsilon$ where $u$ is a random effect whose covariance matrix I want to be a multiple of the identity matrix.

My matrix $Z$ has about 1000 columns. Trouble is I have only one group, i.e. not multiple observations per person, and I think lmer does not like this.

For example in the simple case, if I put in something like lmer

$({\rm height} \sim 1 + (0+Z_1|ID) + (0+Z_2|ID))$

where $Z_1$ and $Z_2$ are 2 columns of $Z$ and $ID$ is the unique ID for each person lmer throws up an error saying I need the number of groups to be less than the number of observations (a similar problem occurs if I set everyone belonging to the same group).

I had partial success with lme (in the name package) where I could provide the covariance structure of $u$ as in pdDiag, and the package allows one group. Trouble there was that I ran into memory issues, and the time was too long.

Since lmer uses a lot of sparse matrix methods, I am guessing my flexibility in the covariance structure will be a lot lesser. That being said, my restriction seems like (probably?) one of the more obvious ones which would have been implemented in these models as is.

• Mixed effects models are used in the analysis of clustered data. You do not seem to have such structure, so it is unclear why you are trying to run such model. – Michael M Jul 3 '14 at 11:54
• I think it would be a lot easier for the community to help you if you could describe your data and the model you want to fit. If you have only one observation per person and no grouping structure, how do you want to separate the between person variance from the residual variance without assuming a priori a covariance structure for the individuals (for instance, a relationship matrix)? – NoBackingDown Jul 4 '14 at 7:59