Displaying 20 results from an estimated 8000 matches similar to: "lme between-group and within-group covariance"
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
2010 Feb 04
1
random slope models with lme --> failured to converge
Dear all,
I am working on a data set in which I have sequentially measured egg
temperatures ("eggtemp") in birds incubating in different ambient
temperatures ("treat", sample data set below), "id" is not replicated within
treatment.
id treat eggtemp
1 79 3 30.90166
2 42 3 34.94044
3 10 3 32.69945
4 206 3 36.64127
5 23 3 31.80055
6
2009 Jul 02
1
Problem with groupedData and lme
Dear R-users,
I'm currently having trouble with the implementation of a groupedData
object in the lme() function.
Executing the following function
> applyScalingSimp <- function(input.population)
> {
> ## GA is a time value
> varInOrder <- c("GA","weight","grouping","sex")
> modelVar <-
2009 Apr 30
1
Overlaying graphs from different datasets with ggplot
Dear R-users,
I recently began using the ggplot2 package and I am still in the process of
getting used to it.
My goal would be to plot on the same grid a number of curves derived from
two distinct datasets. The first dataset (called molten.data) looks like
this :
Column names : Perc, Week, Weight
P10 21 333.3554
P90 21 486.0480
P10 22 452.6347
P90 22 563.8263
P10 23 575.0960
P90
2009 May 01
1
A beginner's question about ggplot
Dear R-users,
I would have another question about the ggplot() function in the ggplot2
package.
All the examples I've read so far in the documentation make use of a single
neatly formatted data.frame. However, sometimes, one may be interested in
plotting on the same grid information or objects derived from two totally
different datasets and customize both displays. I still cannot tell how
2008 Aug 22
1
lme questions re: repeated measures & covariance structure
Hello,
We are attempting to use nlme to fit a linear mixed model to explain bird
abundance as a function of habitat:
lme(abundance~habitat-1,data=data,method="ML",random=~1|sampleunit)
The data consist of repeated counts of birds in sample units across multiple
years, and we have two questions:
1) Is it necessary (and, if so, how) to specify the repeated measure
(years)? As written,
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
Dear all,
Given a LME model (following the notation of Pinheiro and Bates 2000) y_i
= X_i*beta + Z_i*b_i + e_i, is it possible to extract the
variance-covariance matrix for the estimated beta_i hat and b_i hat from the
lme fitted object?
The reason for needing this is because I want to have interval prediction on
the predicted values (at level = 0:1). The "predict.lme" seems to
2004 Sep 01
1
lme: howto specify covariance structure between levels of grouping factors
Dear all,
I am studying the possibility of using the nlme package in R to analyse
field trials of agricultural crops. I have a problem with the syntax for the
modelling of variance covariance structures. I can model the within-group
covariance structure using the correlation argument and the covariance
structure between different random effects of the same grouping level using
2009 Jul 12
0
Specifying a more complex covariance matrix in lme or lmer
Hi all,
I've searched threads and read up on some ways of doing this but I'm having
a hard time to get it to work. Here's my basic problem. I have the
following linear mixed model
y = Xb+Zu+e
where u~N(0,s^2*K) where K is a matrix.
I read a thread that basically suggested to decompose Zu into ZPD^(1/2)
D^(-1/2)P'u so that (D^(-1/2)P'u)~N(0,s'^2I) but I'm not sure
2006 Sep 23
1
variance-covariance structure of random effects in lme
Dear R users,
I have a question about the patterned variance-covariance structure for the random effects in linear mixed effect model.
I am reading section 4.2.2 of "Mixed-Effects Models in S and S-Plus" by Jose Pinheiro and Douglas Bates.
There is an example of defining a compound symmetry variance-covariance structure for the random effects in a
split-plot experiment on varieties of
2013 Jun 07
1
Function nlme::lme in Ubuntu (but not Win or OS X): "Non-positive definite approximate variance-covariance"
Dear all,
I am estimating a mixed-model in Ubuntu Raring (13.04ΒΈ amd64), with the
code:
fm0 <- lme(rt ~ run + group * stim * cond,
random=list(
subj=pdSymm(~ 1 + run),
subj=pdSymm(~ 0 + stim)),
data=mydat1)
When I check the approximate variance-covariance matrix, I get:
> fm0$apVar
[1] "Non-positive definite
2009 Dec 17
2
Sweave Makefile issue
Dear R-specialists,
I am trying to create a Makefile that will first convert all my .Rnw
files into .tex files and then, that will run the LaTeX compiler to
produce a pdf document. This issue has been discussed before. Hence,
I've basically adapted a Makefile I found at
http://n4.nabble.com/R-Sweave-R-and-complex-latex-projects-td810020.html#a810023
to make it compatible with a Windows
2007 Jun 27
1
lme correlation structures
Hi all,
I've been using SAS proc mixed to fit linear mixed models and would
like to be able to fit the same models in R. Two things in particular:
1) I have longitudinal data and wish to allow for different repeated
measures covariance parameter estimates for different groups (men and
women), each covariance matrix having the same structure. In proc
mixed this would be done by specifying
2005 Jun 28
1
How to extract the within group correlation structure matrix in "lme"
Dear R users,
I fitted a repeated measure model without random effects by using lme. I will use the estimates from that model as an initial estimates to do multiple imputation for missing values of the response variable in the model. I am trying to extract the within group correlation matrix or covariance matrix.
here is my code:
f = lme(y ~x0+x1+trt+tim+x1:tim +tim:trt,random=~-1|subj,
2001 May 31
1
nlme and memory
I am trying to follow an example in Pineiro & Bates's book
library(nlme)
data(Soybean)
soy.lis<-nlsList(weight~SSlogis(Time,Asym,xmid,scal),data=Soybean)
soy.nlme<-nlme(soy.lis)
Error: Calloc could not allocate (151974496 of 8) memory
This is not a large problem-- only 412 observations. I am using R-1.2.3
with automatic memory allocation. Does this message mean that I need to
run
2007 Aug 22
4
within-subject factors in lme
I don't think, this has been answered:
> I'm trying to run a 3-way within-subject anova in lme with 3
> fixed factors (Trust, Sex, and Freq), but get stuck with handling
> the random effects. As I want to include all the possible random
> effects in the model, it would be something more or less
> equivalent to using aov
>
> > fit.aov <- aov(Beta ~
>
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers,
I can't find the variance or se of the coefficients in a multilevel model
using lme.
I want to calculate a Chi square test statistics for the variability of the
coefficients across levels. I have a simple 2-level problem, where I want to
check weather a certain covariate varies across level 2 units. Pinheiro
Bates suggest just looking at the intervals or doing a rather
2007 May 11
1
Create an AR(1) covariance matrix
Hi All.
I need to create a first-order autoregressive covariance matrix
(AR(1)) for a longitudinal mixed-model simulation. I can do this
using nested "for" loops but I'm trying to improve my R coding
proficiency and am curious how it might be done in a more elegant
manner.
To be clear, if there are 5 time points then the AR(1) matrix is 5x5
where the diagonal is a constant
2005 May 17
0
Problem in lme longitudinal model
Hi R-masters!
I trying model Heart disease mortality in my country with a lme model like
this:
m1.lme<-lme(log(rdeath)~age*year,random=~age|year,data=dados)
where: rdeath is rate of mortality per 100000 person per age and year
age: age of death (22 27 32 37 42 47 52 57 62 67 72 77 82)
year: year of death (1980:2002)
I don?t have problem to fit the model, but in
2006 Feb 16
1
testing the significance of the variance components using lme
Hi R-users,
I am using lme to fit a linear mixed model with the nlme package,
does anyone know if it is possible to obtain standard error estimates of the variance components estimators and an adequate method to test the significance of the variance component?
Thanks,
Berta.
[[alternative HTML version deleted]]