Thanks a lot for your very comprehensive answer. I am continuing digesting
your writings and I will consult with you  and your expertise with more
questions. My first question is:


In a random intercept model (all group sharing the same beta), will the
following situation arise?

All data points in a group reside on one side of the regression line of
that group?

Here is my thinking: even though for a certain group, the overall beta is a
very crappy one for that group.

By adjusting the intercept for that group, I at least still can get the
regression line passing the cloud, am I right?

------------------

In a random intercept model, for each group, which point does the
regression line pass thru? In the general OLS, we knew that it's the
point (xbar, ybar) that is passed thru by the regression line.

But for each group in a random intercept model, which point is that
"central" point?

------------------

Moreover, in R, what's a convenient way to visualize what's happening
within a certain group in a mixed model?

Thanks a lot for your help!

On Sat, Jun 23, 2012 at 1:56 AM, Emmanuel Curis <
curis@pharmacie.univ-paris5.fr> wrote:

> Hello,
>
> Your model will be a random intercept model if you assume that the
> group is a random effect factor; typically, that you have observed
> only a few levels of the "infinite" possible levels of the groups (for
> instance, if group is a town, a school...). It will be a fixed effect
> model if you assume that the group is a fixed effects factor;
> typically, that you have observed all possible levels of the groups
> (for instance, if group is sex, treatment...)
>
> If I correctly understood both linear mixed models and your problem,
> the equation for a single observation (groupe f, individual i) would
> be something like
>
> y(f, i) = mu0 + beta_1 F1(f,i) + sum_{k=1 to m} alpha_k 1(F2==m_k)
>        + Sum_{k = 1 to f} u_k 1(F0==k)   ] random part
>        + epsilon( f, i )                 ]
>
> with 1(f) the indicator variable, that is 1(a) equals 1 if a is true,
> 0 otherwise; u_f a realisation of a random variable ; mu0 the average
> intercept in the whole population ; beta_1 the commun slope ; F1(f,i)
> the value of F1 for individual i of group f. This is assuming that F2
> as k levels, m_1 to m_k.
>
> Be writing such lines for each observation, you can get the X and Z
> matrices.
>
> b is the vector of the u_k above and Z is a matrix of indicators of
> the groups, which allows to use the correct b for a given individual,
> according to the group he belongs to.
>
> The exact form of X will depend on the way you decide to code the
> different levels of F2 ("contrasts"); by default in R, would be
> alpha_1=0 and all others alpha_k free, leading to a column of 0 in the
> X matrix which is in fact removed together with the alpha_1
> coefficient.
>
> For more precise answer, if think you should give more informations,
> like the number of levels for F2, the nature of "groups"...
>
> On Fri, Jun 22, 2012 at 06:47:42PM -0500, Michael wrote:
> Ť 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]]
> Ť
> Ť _______________________________________________
> Ť R-sig-mixed-models@r-project.org mailing list
> Ť https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
> --
>                                Emmanuel CURIS
>                                emmanuel.curis@univ-paris5.fr
>
> Page WWW: http://emmanuel.curis.online.fr/index.html
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]

