Displaying 20 results from an estimated 11000 matches similar to: "setting value arg of pdSymm() in nlme"
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
2004 Aug 03
2
lme fitted correlation of random effects: where is it?
The print method for lme *prints out* the fitted correlation matrix for
the random effects. Is there any way to get these values as an object in
R? I have examined the components of the lme object (called "junk" in the
example below) and the components of summary(junk) without finding these
numbers.
(How I did this: I dumped the entire lme object to a text file and then
used egrep to
2012 Mar 09
0
pdMat class in LME to mimic SAS proc mixed group option? Group-specific random slopes
I would like to be able to use lme to fit random effect models In which some but not all of the random effects are constrained to be independent. It seems as thought the pdMat options in lme are a promising avenue. However, none of the existing pdMat classes seem to allow what I want.
As a specific example, I would like to fit a random intercept/slope mixed model to longitudinal observations in
2001 Nov 24
1
lme or nlme
I'm trying to run a linear mixed effects model using
nlme. It appears that lme is not available for R, but
looks like I should be able to run linear models using
nlme. What I tryed looks something like this:
fit <- nlme (Y ~ A + B + C + D,
fixed=list(A,B,C,D),random=Z). This didn't work. I
got this error: Error in reStruct(random, REML =
REML, data = NULL) :
Object must be
2002 Sep 13
2
Multiple random effects inlme?
Moi!
I was helping to teach a course on mixed models this week, and we came
across a problem with coding more than one random effect in lme when
they aren't nested.
As an example, suppose we have an experiment where we sample moths from
several populations, and place the moths on different trees, and measure
a trait (in this case survival of offspring, but that's less
important). We
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
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 Oct 09
1
PROC MIXED user trying to use (n)lme...
Dear R-users
Coming from a proc mixed (SAS) background I am trying to get into
the use of (n)lme.
In this connection, I have some (presumably stupid) questions
which I am sure someone out there can answer:
1) With proc mixed it is easy to get a hold on the estimated
variance parameters as they can be put out into a SAS data set.
How do I do the same with lme-objects? For example, I can see the
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
2011 Jan 21
1
TRADUCING lmer() syntax into lme()
---------- Forwarded message ----------
From: Freddy Gamma <freddy.gamma@gmail.com>
Date: 2011/1/21
Subject: TRADUCING lmer() syntax into lme()
To: r-sig-mixed-models@r-project.org
Dear Rsociety,
I'd like to kingly ask to anyone is willing to answer me how to implement a
NON NESTED random effects structure in lme()
In particular I've tried the following translation from lmer to
2008 Dec 05
1
Question about lrandom effects specification in lme4
Folks:
Suppose I have 3 random effects, A,B, and C. Using the older lme() function
(in nlme) it was possible (using the pdMat classes) to specify that they are
uncorrelated with identical variances. Is it possible to do this with lmer?
My understanding is that if I specify them as
lmer( y ~ ... + (A|Grp) + (B|Grp) + (C|Grp))
then they are uncorrelated but have different variances.
Motivation:
2005 Feb 25
1
anova grouping of factors in lme4 / lmer
Hi. I'm using lmer() from the lme4 package (version 0.8-3) and I can't get
anova() to group variables properly. I'm fitting the mixed model
Response ~ Weight + Experimenter + (1|SUBJECT.NAME) + (1|Date.StudyDay)
where Weight is numeric and Experimenter is a factor, ie,
> str(data.df)
`data.frame': 4266 obs. of 5 variables:
$ SUBJECT.NAME : Factor w/ 2133 levels
2002 Dec 17
1
lme invocation
Hi Folks,
I'm trying to understand the model specification formalities
for 'lme', and the documentation is leaving me a bit confused.
Specifically, using the example dataset 'Orthodont' in the
'nlme' package, first I use the invocation given in the example
shown by "?lme":
> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
Despite the
2006 Jun 30
1
lme and SAS Proc mixed
I am trying to use lme to fit a mixed effects model to get the same
results as when using the following SAS code:
proc mixed;
class refseqid probeid probeno end;
model expression=end logpgc / ddfm=satterth;
random probeno probeid / subject=refseqid type=cs;
lsmeans end / diff cl; run;
There are 3 genes (refseqid) which is the large grouping factor, with
2 probeids nested within each refseqid,
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
2003 Jul 22
2
animal models and lme
Hi,
You should look at Pinheiro and Bates (2000) Mixed-effects models in S and S-Plus. It describes how to format the correlation matrix to pass to functions lme and gls. Basically, the correlation matrix has to be one of the corStruct classes, probably corSymm for your example. So in the call to lme (or gls if you really have no random effects), use something like:
2010 Nov 07
1
can't load nlme on windoze 7
Hi,
I've got a problem that sounds a lot like this,
http://r.789695.n4.nabble.com/Re-R-R-2-12-0-hangs-while-loading-RGtk2-on-FreeBSD-td3005929.html
under windoze 7.
but it seems to hang with this stack trace,
#0? 0x77830190 in ntdll!LdrFindResource_U ()
?? from /cygdrive/c/Windows/system32/ntdll.dll
building goes as follows,
$ ./R CMD INSTALL --no-test-load nlme_3.1-97.tar.gz
*
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
2008 May 08
3
lme nesting/interaction advice
Hi everyone,
I am confused on how to specify some nesting and interaction terma with lme().
I have a dataset where some flies where selected for accessory gland size, made
to mate in presence/absence of another male and the level of some protein
measured. Now the complex stuff.
The selection has been replicated twice, so that the selection term has got two
levels (large and small) with
2007 Jul 30
1
Extract random part of summary nlme
Dear helpers,
I'm estimating multilevel regression models, using the lme-function
from the nlme-package. Let's say that I estimated a model and stored
it inside the object named 'model'. The summary of that model is
shown below:
Using summary(model)$tTable , I receive the following output:
> summary(model)$tTable
Value Std.Error DF t-value