Hi all,

Could anybody please shed some light on me?

N individuals, divided into K groups. N>K.

Some groups have 1 individuals only, some other groups have more
individuals.

Each individual has 4 features (4 variables): F0, F1, F2, and F3, where F0
is simply the group indicator.

Therefore the data matrix is of size N x 4.

There is also a weight vector w, which is of length N, which gives the
weights for each of the N individuals in the regression.

May I ask if the following model is a random-intercept model?

1. There is a common beta for all N individuals.
2. Each group has a different within group regression line (same slope but
different intercepts).
3. The regression line within each group crosses the "cloud" consisting of
the group members. And the individual residuals scatter around the
regression line, within each group.

This sounds like a "random-intercept" model to me.

However, how do I explicitly write out the equation?

y = X * beta + Z * b + eps

More specifically, with the three feature variables F1, F2 and F3 and the
group indicator variable F0,

I am having difficulty writing out X and Z explicitly.

Moreover, my F2 is a factor variable.

Could anybody please show me how the X and Z matrices look like explicitly?
And what do the "b"'s represent here?

And how do I set up the weights in LME in R? If I would like to have
"group"-weights and "individual"-weights, how shall I do it?

Thank you!

	[[alternative HTML version deleted]]

