Displaying 20 results from an estimated 5000 matches similar to: "Question about lrandom effects specification in lme4"
2008 Feb 13
2
Newbie HLM with lme4 questions
Dear R listers,
I know I'm breaking the rules by asking a "homework" related question--
I hope you'll forgive me. I am a social psychology graduate student,
and the only one in my department who uses R. I successfully completed
my multiple regression and structural equation modeling courses using
R (John Fox's car and sem packages were a big help, as was his book).
2010 Apr 14
3
pdMat
Alguien tiene experiencia en escribir una pdMat. Para aquellos que no lo
recuerden son las matrices de covarianzas de los efectos aleatorios que
ajusta la función lme de la librería nlme
Estas matrices tiene especial importancia en aplicaciones de genética de
poblaciones y en particular en mapeo de asociación. Pinheiro y Bates dicen
que el usuario puede crear sus propias pdMat y sugiere como
2005 May 17
1
setting value arg of pdSymm() in nlme
Dear All,
I wish to model random effects that have known between-group covariance
structure using the lme() function from library nlme. However, I have yet
to get even a simple example to work. No doubt this is because I am
confusing my syntax, but I would appreciate any guidance as to how. I have
studied Pinheiro & Bates carefully (though it's always possible I've
missed
2006 Jul 17
1
sem: negative parameter variances
Dear Spencer and Prof. Fox,
Thank you for your replies. I'll very appreciate, if you have any ideas concerning the problem described below.
First, I'd like to describe the model in brief.
In general I consider a model with three equations.
First one is for annual GRP growth - in general it looks like:
1) GRP growth per capita = G(investment, migration, initial GRP per
2008 Jan 06
2
how to get residuals in factanal
In R factanal output, I can't find a function to give me residuals e.
I mannually got it by using x -lamda1*f1 -lamda2*f2 - ... -lamdan*fn, but the e
I got are not uncorrelated with all the f's.
What did I do wrong? Please help.
Yijun
____________________________________________________________________________________
Be a better friend, newshound, and
2024 Jan 08
1
how to specify uncorrelated random effects in nlme::lme()
Dear professor,
I'm using package nlme, but I can't find a way to specify two uncorrelated random effects. For example, a random intercept and a random slope. In package lme4, we can specify x + (x ll g) to realize, but how in nlme?
Thanks!
????????????????????????
Zhen Wang
Graduate student, Department of Medical Statistics, School of Public Health, Sun Yat-sen
2004 Jul 12
2
lme unequal random-effects variances varIdent pdMat Pinheiro Bates nlme
How does one implement a likelihood-ratio test, to test whether the
variances of the random effects differ between two groups of subjects?
Suppose your data consist of repeated measures on subjects belonging to
two groups, say boys and girls, and you are fitting a linear mixed-effects
model for the response as a function of time. The within-subject errors
(residuals) have the same variance in
2001 Dec 03
3
beginner's questions about lme, fixed and random effects
I'm trying to understand better the differences between fixed and
random effects by running very simple examples in the nlme
package. My first attempt was to try doing a t-test in lme.
This is very similar to the Rail example that comes with nlme,
but it has two groups instead of five.
So I try
a1 <- 1:10
a2 <- 7:16
t.test(a2,a1)
getting t(18)=4.43, p=.0003224. Then I try to do it
2005 Feb 17
0
lme4--->GLMM
Hello,
I'm very sorry for my repeated question, which i asked 2 weeks ago, namely:
i'm interested in possibly simple random-part specification in the call
of GLMM(...) (from lme4-package)
i have a random blocked structure (i.e. ~var.a1+var.a2+var.a3,
~var.b1+var.b2,~var.c1+var.c2+var.c3+var.c4),
and each one part of it i would like to model as Identity-structure
matrix. So i had,
2004 Jan 13
3
How can I test if a not independently and not identically distributed time series residuals' are uncorrelated ?
I'm analizing the Argentina stock market (merv)
I download the data from yahoo
library(tseries)
Argentina <- get.hist.quote(instrument="^MERV","1996-10-08","2003-11-03", quote="Close")
merv <- na.remove(log(Argentina))
I made the Augmented Dickey-Fuller test to analyse
if merv have unit root:
adf.test(merv,k=13)
Dickey-Fuller = -1.4645,
2008 Sep 17
1
GLMMs
Hi everyone,
I'm trying to fit a generalized linear mixed effects model (logistic) in
R and am having some trouble specifying the covariance structure for the
random effects. I'm using glmer, which by default assumes an
unstructured relationship between the random effects, but I want the
structure to be a multiple of an identity. Here is my code:
glmer(y ~ 1 + (x1 + x2 + x3 + x4
2009 Jul 07
6
Uncorrelated random vectors
Hello,
is it possible to create two uncorrelated random vectors for a given distribution.
In fact, I would like to have something like the function "rnorm" or "rlogis" with the extra property that they are uncorrelated.
Thanks for your help,
Luba
[[alternative HTML version deleted]]
2005 Sep 19
1
How to mimic pdMat of lme under lmer?
Dear members,
I would like to switch from nlme to lme4 and try to translate some of my
models that worked fine with lme.
I have problems with the pdMat classes.
Below a toy dataset with a fixed effect F and a random effect R. I gave
also 2 similar lme models.
The one containing pdLogChol (lme1) is easy to translate (as it is an
explicit notation of the default model)
The more parsimonious
2009 Jun 17
2
Re gression by groups questions
I have a large dataset grouped by a factor and I want to perform a regression
on each data subset based on this factor. There are many ways to do this,
posted here and elsewhere. I have tried several. However I found one method
posted on the R wiki which works exactly as I want, and I like the elegance
and simplicity of the solution, but I don't understand how it works. Its
all in the formula
2006 Jun 01
1
setting the random-effects covariance matrix in lme
Dear R-users,
I have longitudinal data and would like to fit a model where both the variance-covariance matrix of the random effects and the residual variance are conditional on a (binary) grouping variable.
I guess the model would have the following form (in hierarchical notation)
Yi|bi,k ~ N(XiB+Zibi, sigmak*Ident)
bi|k ~ N(0, Dk)
K~Bernoulli(p)
I can obtain different sigmas (sigma0 and
2009 Jun 23
1
How to exclude insignificant intercepts using "step" function
I posted this question way down at teh end of another thread realted to an
error in step, but that was stupid since it really is another matter
altogether. I should have posted it separately, as I have now done.
The code below creates a data.frame comprising three marginally noisy
surfaces. The code below (including a fix courtesy of David Winsemius that
avoids a step function error through use
2007 Dec 30
2
auth-master permission error
On F7, I get to where I have Postfix and Dovecot installed and configured, postfix check runs fine, but when I try to start Dovecot I'm getting a permission error. Here is the log entry:
Dec 29 21:54:06 grp-01-50-90 dovecot: Dovecot v1.0.7 starting up
Dec 29 21:54:06 grp-01-50-90 dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Dec 29 21:54:06
2003 May 19
1
plotting a simple graph
I am having great difficulty plotting what should be a simple graph.
I have measured 1 'y' and 5 'x' variables in each of two groups.
Linear regression shows significant differences in the slopes of the
regression for each 'x' variable between the two groups.
All that I want to do is to plot one graph that shows the scatterplot
for the three groups (each group represented
2006 Oct 04
1
extracting nested variances from lme4 model
I have a model:
mod1<-lmer( x ~ (1|rtr)+ trth/(1|cs) , data=dtf) #
Here, cs and rtr are crossed random effects.
cs 1-5 are of type TRUE, cs 6-10 are of type FALSE,
so cs is nested in trth, which is fixed.
So for cs I should get a fit for 1-5 and 6-10.
This appears to be the case from the random effects:
> mean( ranef(mod1)$cs[[1]][1:5] )
[1] -2.498002e-16
> var(
2006 Sep 26
2
treatment effect at specific time point within mixed effects model
All,
The code below is for a pseudo dataset of repeated measures on patients
where there is also a treatment factor called "drug". Time is treated
as categorical.
What code is necessary to test for a treatment effect at a single time
point,
e.g., time = 3? Does the answer matter if the design is a crossover
design,
i.e, each patient received drug and placebo?
Finally, what would