# [R] Discrepency between R and MlwiN

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Sep 13 12:18:18 CEST 2004

```Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> On Sun, 12 Sep 2004, Damian Betebenner wrote:
>
> > When playing around fitting unconditional growth models using R and MlwiN today, I produced two different sets of estimates that I can't reconcile and wondered if anyone here has an idea:
> >
> > The data is two-level repeated measures data with measures nested within child. There are two measures per child. I've fit an unconditional growth model as in Singer and Willet (2003) that allows for variable intercepts
> > and slopes.
....
> Are there always two points per student?  If so, your model is not
> identifiable (in so far as I understand what you are doing) and there is
> an infinite set of parameters which give the same restricted likelihood.
> Please check if the latter is the case for the two sets of results.
>
> For each student you have a random intercept, a random slope and
> measurement error at each point.  That's 4 random variables to explain 2
> observations.

Actually, I don't think that's necessarily a problem (more r.v.'s than
observations), is it?. However, assuming that the two points are the
same for each student, you have an empirical covariance matrix (3
values) and explain it using the variance of A, and B, and the
covariance between them, *and* the residual error, i.e. four
parameters, and that surely is a problem.

> In short, you appear to have chosen a model that overfits.

Yup. And the current lme() algorithm is not very good at detecting
such singularities, although it should be apparent from the covariance
matrix of the random-effects parameters.

--
O__  ---- Peter Dalgaard             Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
(*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907

```