Displaying 20 results from an estimated 3000 matches similar to: "converting lme commands from S-PLUS to R"
2011 Oct 09
2
pdIdent in smoothing regression model
Hi there,
I am reading the 2004 paper "Smoothing with mixed model software" in
Journal of Statistical Software, by Ngo and Wand. I tried to run
their first example in Section 2.1 using R but I had some problems.
Here is the code:
library(nlme)
fossil <- read.table("fossil.dat",header=T)
x <- fossil$age
y <- 100000*fossil$strontium.ratio
knots <-
2010 Oct 18
1
Crossed random effects in lme
Dear all,
I am trying to fit a model with crossed random effects using lme. In this
experiment, I have been measuring oxygen consumption (mlmin) in bird
nestlings, originating from three different treatments (treat), in a
respirometer with 7 different channels (ch). I have also measured body mass
(mass) for these birds.
id nest treat year mlmin mass ch hack
1EP51711 17
2010 Jun 15
1
lme, spline
Dear All,
I have a problem running this program on R. Z is a matrix of spline which is random
> fit<-lme(anc~X,random=pdIdent(~Z))
Error in getGroups.data.frame(dataMix, groups) :
Invalid formula for groups
What I have done wrong?
2005 Jan 05
0
lme, glmmPQL, multiple random effects
Hi all -
R2.0.1, OS X
Perhaps while there is some discussion of lme going on.....
I am trying to execute a glmm using glmmPQL from the MASS libray, using
the example data set from McCullagh and Nelder's (1989, p442) table
14.4 (it happens to be the glmm example for GENSTAT as well). The data
are binary, representing mating success (1,0) for crosses between males
and females from two
2012 Jan 23
2
model non-nested random effects in nlme library
Hello all,
In lme4 if you want to model two non-nested random effects you code it like
this:
mod1 <- lmer(y~x + (1|randomvar1) + (1|randomvar2))
How would you go about to model something similar in nlme?
In my database I have two variables for which I have repeated measures, lets
call them "individual" and "year".
But none of the "individuals" were measured in
2003 Sep 03
2
lme in R and Splus
Good Day,
Included below is some code to generate data and to fit a mixed effects
model to this fake data. The code works as expected when I call the
function "lme" in Splus but not in R.
The error message from calling lme in R is:
"Error in getGroups.data.frame(dataMix, groups) :
Invalid formula for groups"
I installed the nlme package for R around 20 August
2006 Jul 25
1
how to fit with "lme" function
Hi everone,
I have a question on using lme on a mixed effects model.
The linear mixed model is in the form of:
y = bX +Zu + e
where "X" and "Z" are the matrices, "b" is the coefficient vector of fixed
effects, "u" is the coefficient vector of random effects, and e is an error
vector.
I would like to use "lme" function to fit the model and
2003 May 12
1
update.lme trouble (PR#2985)
Try this
data(Assay)
as1 <- lme(logDens~sample*dilut, data=Assay,
random=pdBlocked(list(
pdIdent(~1),
pdIdent(~sample-1),
pdIdent(~dilut-1))))
update(as1,random=pdCompSymm(~sample-1))
update(as1,random=pdCompSymm(~sample-1))
update(as1,random=pdCompSymm(~sample-1))
update(as1,random=pdCompSymm(~sample-1))
I'm
2008 Aug 25
1
aov, lme, multcomp
I am doing an analysis and would like to use lme() and the multcomp
package to do multiple comparisons. My design is a within subjects
design with three crossed fixed factors (every participant sees every
combination of three fixed factors A,B,C). Of course, I can use aov() to
analyze this with an error term (leaving out the obvious bits):
y ~ A*B*C+Error(Subject/(A*B*C))
I'd also like
2005 Nov 03
1
Specify Z matrix with lmer function
Is there a way to specify a Z matrix using the lmer function, where the
model is written as y = X*Beta + Z*u + e?
I am trying to reproduce smoothing methods illustrated in the paper
"Smoothing with Mixed Model Software" my Long Ngo and M.P. Wand.
published in the /Journal of Statistical Software/ in 2004 using the
lme4 and Matrix packages. The code and data sets used can be found at
2010 Jun 15
0
lme, spline (revised question)
Dear All,
I revise my question about the problem I have.
Take a look at the article
http://www.jstatsoft.org/v09/i01
and download the attached code.
try to run one of the codes for example section 2.1 in R
here is the code
fossil <- read.table("fossil.dat",header=T)
x <- fossil$age
y <- 100000*fossil$strontium.ratio
knots <- seq(94,121,length=25)
n <- length(x)
X <-
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
2006 Jul 28
3
random effects with lmer() and lme(), three random factors
Hi, all,
I have a question about random effects model. I am dealing with a
three-factor experiment dataset. The response variable y is modeled
against three factors: Samples, Operators, and Runs. The experimental
design is as follow:
4 samples were randomly chosen from a large pool of test samples. Each
of the 4 samples was analyzed by 4 operators, randomly selected from a
group of
2005 Dec 09
1
lmer for 3-way random anova
I have been using lme from nlme to do a 3-way anova with all the effects treated as random. I was wondering if someone could direct me to an example of how to do this using lmer from lme4.
I have 3 main effects, tim, trt, ctr, and all the interaction effects tim*trt*ctr. The response variable is ge.
Here is my lme code:
dat <-
2008 Apr 30
1
error with lme within a loop
Dear R users,
I want to conduct a small simulation study and I have to use the lme
function in a loop to save the restricted log likelihood.
However, for one simulated data set the lme function gives this error
Error en lme.formula(yboot ~ X[, -1], data = data.fr, random = Z.block) :
nlminb problem, convergence error code = 1
message = singular convergence (7)
and then, the
2005 Jan 05
2
lme: error message with random=~1
Hello,
I have an unbalanced mixed model design with two fixed effects
"site" (2 levels) and "timeOfDay" (4 levels) and two random effects
"day" (3 consecutive days) and "trap" (6 unique traps, 3 per site).
The dependent variable is the body length ("BL") of insect larvae from 7
to 29 individuals per trap (104 individuals in total).
To account
2000 Mar 14
1
Error in lme? (PR#488)
Full_Name: Simon Frost
Version: 1.0.0
OS: Windows
Submission from: (NULL) (129.215.60.79)
Hi everyone,
I've just installed R for Windows - I've previously been using it on Linux -
and I've run into a problem when using lme.
The lme routine throws up an error in the getGroups.data.frame command,
complaining about an error in the formula:
Error in getGroups.data.frame(dataMix,
2003 Oct 31
1
cross-classified random factors in lme without blocking
On page 165 of Mixed-Effects Models in S and S-Plus by Pinheiro and Bates
there is an example of using lme() in the nlme package to fit a model with
crossed random factors. The example assumes though that the data is
grouped. Is it possible to use lme() to fit crossed random factors when the
data is not grouped?
E.g., y <- rnorm(12); a=gl(4,1,12); b=gl(3,4,12). Can I fit an additive
model
2005 Jul 14
1
Error running lme.
I am trying to fit lme using R 2.1.1 under Windows 2k.
I am getting the following message noted below.
Any suggestions that would help me correct my error would be greatly
appreciated.
Thanks,
John
> fit1lme<-lme(Velocity~time,data=gate)
Error in getGroups.data.frame(dataMix, groups) :
Invalid formula for groups
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
2003 Jul 01
1
crossed random effects
Hi,
I have a data set on germination and plant growth with
the following variables:
dataset=fm
mass (response)
sub (fixed effect)
moist (fixed effect)
pop (fixed effect)
mum (random effect nested within population)
iheight (covariate)
plot (random effect- whole plot factor for split-plot
design).
I want to see if moist or sub interacts with mum for
any of the pops, but I am getting an error