[R] Random intercept-slope correlation (nlme)

2006-10-30 Thread Antonio Revilla
Dear list members,

I am working with a multilevel growth curve, that in its simplest form goes 
like follows:

Yit = Ai + Bi t + eit   (the error term is assumed to follow an AR(1) 
autorregressive process)

One major topic in my research is the convergence in the values of Y over 
time. Thus, I am interested in the relationship between the random effects 
for the intercept and the slope, and I have a couple of questions about 
this:

First, I have fitted the model using the nlme library in R, and the 
estimates for the random effects yield a correlation of -0.27. However, if I 
take values for random intercepts and slopes from the lme model, and run a 
correlation (or a regression) between them, I get a slightly positive 
relationship (R~ 0.02). How can this difference be explained?

Second, I am also interested in the size of the relationship between 
intercept and slope. In other terms, in the rate of convergence. In order to 
analyze this, does it make any sense if use the values from my 
random-effects model and run an OLS regression using subject-specific 
intercepts as a covariate to explain subject-specific slopes? The results I 
mention above meake me suspicious about this, but I still do not know if it 
would be correct from a statistical standpoint.

Thanks a lot,

Antonio

_
Moda para esta temporada. Ponte al día de todas las tendencias.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Modelling heteroskedasticity in a multilevel model

2006-04-24 Thread Antonio Revilla
Dear list members,

I am facing a 3-level model, for which my research hypotheses suggest that 
the variance of both level-1 and level-2 residuals may be a function of a 
level-3 variable.

To be a bit more clear: I am fitting a longitudinal model for a panel of 
companies grouped in industries. I suggest that some industry variables may 
create 'unexpected' shocks at especific points in time; such shocks are not 
accounted for by the explanatory variables in the model, so that they will 
presumably increase variance of level-1 residuals. On the other hand, 
industry-level attributes may also affect the relative relative size of 
firm-level permanent effects (represented by level-2 residuals)

Do you know how could I model such a residual structure in R? I have been 
looking at the varfunc command in the nlme package, but I am not sure if 
such a function can perform the kind of analysis I actually need.

Thank you very much in advance,

Antonio

_
¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en 
MSN Motor. http://motor.msn.es/researchcentre/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html