Displaying 20 results from an estimated 6000 matches similar to: "Mixed effect model in R"
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
This question comes up periodically, probably enough to give it a proper
thread and maybe point to this thread for reference (similar to the
'conservative anova' thread not too long ago).
Moving from lme syntax, which is the function found in the nlme package,
to lmer syntax (found in lme4) is not too difficult. It is probably
useful to first explain what the differences are between the
2006 Oct 08
1
Windows/MAC difference (console)
Hello,
a colleague of mine uses R on his Mac and he has quite a nice feature: When
he starts writing a part of the function like "plot(" the programming is
showing him at the bottom the kind of arguments you can input to the
function. He told me that he has not installed any further stuff than the
base R program.
Is this a feature you only have in the MAC version? I really like it. I
2006 Aug 02
2
lme4 and lmeSplines
I'm trying to use the lmeSplines package together with lme4.
Below is (1) an example of lmeSplines together with nlme (2) an
attempt to use lmeSplines with lme4 (3) then a comparison of the
random effects from the two different methods.
(1)
require(lmeSplines)
data(smSplineEx1)
dat <- smSplineEx1
dat.lo <- loess(y~time, data=dat)
plot(dat.lo)
dat$all <- rep(1,nrow(dat))
times20
2012 Nov 07
2
LMER vs PROC MIXED estimates
Hi experts,
I have just about started to use R (after using SAS for more than 5 years)
and still finding my way...I have been trying to replicate PROC MIXED
results in LMER but noticed that the estimates are coming different.
My SAS code is as follows (trying to randomise X2 and Intercept):
PROC MIXED DATA = <DATASET NAME> NAMELEN=100 METHOD=REML MAXITER=1000;
CLASS GEOGRAPHY;
MODEL y
2005 Sep 22
3
anova on binomial LMER objects
Dear R users,
I have been having problems getting believable estimates from anova on a
model fit from lmer. I get the impression that F is being greatly
underestimated, as can be seen by running the example I have given below.
First an explanation of what I'm trying to do. I am trying to fit a glmm
with binomial errors to some data. The experiment involves 10
shadehouses, divided between
2006 Jun 08
2
nested mixed-effect model: variance components
Dear listers,
I am trying to assess variance components for a nested, mixed-effects
model. I think I got an answer that make sense from R, but I have a
warning message and I wanted to check that what I am looking at is
actually what I need:
my data are organized as transects within stations, stations within
habitats, habitats within lagoons.
lagoons: random, habitats: fixed
the question is:
2008 Feb 10
2
[OT] good reference for mixed models and EM algorithm
Dear R People:
Sorry for the off-topic. Could someone recommend a good reference for
using the EM algorithm on mixed models, please?
I've been looking and there are so many of them. Perhaps someone here
can narrow things down a bit.
Thanks in advance,
Sincerely,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
2009 Oct 15
2
plotting/examining residuals of a mixed generalised linear model
Dear R users,
I'm hoping that more experienced users will be able to assist me in
examining the model fit of a mixed generalised linear model. The example
using the data 'bacteria' within the MASS package will hopefully illustrate
what I would like to acheive;
library(MASS)
library(nlme)
attach(bacteria) # y being output and the trt - treatment group being an
explanatory variable.
2006 Feb 27
2
obtaining means/SD after fitting a mixed model
Hello,
I am running (non-balanced) mixed models (using library lme4) such as :
model1<-glmmPQL(Y~grouping variable+ covariate, random=~1|yr/month,
data=dat, family= gaussian or poisson)
and besides the usual output in terms of the statistical significance of
the fitted coefficients, I'd like to obtain the adjusted means and standard
deviations (as one obtains after fitting a lm model).
2005 Oct 30
1
Help with Subtracting an effect from a Mixed Model
Hi Everyone,
I posted a similar question about a week ago, but haven't gotten any
replies -- I'm afraid that's because my previous question was too
vague. Let me try again with a more specific question, and I hope
someone can help. NOTE, I know I should be using the newer lme4
package, I just haven't had a chance to update my version of R yet, so
the question below relates
2009 Aug 26
1
lme: how to nest a random factor in a fixed factor?
Dear all,
I have an experimental setup in which a random variable is nested within a fixed variable; however I have troubles specifying the correct LMM with lme. I have searched the lists but haven't been
able to find an example like my setup, which I unfortunately need to get this stuff right. Pinheiro & Bates is great but I still can't figure out how to do it.
My
2008 Nov 20
1
syntax and package for generalized linear mixed models
Hi All,
I am making the switch to R and uncertain which of the several packages for
mixed models is appropriate for my analysis. I am waiting for Pinheiro and
Bates' book to arrive via inter-library loan, but it will be a week or more
before it arrives.
I am trying to fit a generalized linear mixed model of survival data
(successes/trials) as a function of several categorical fixed and
2011 Jun 13
1
SAS Mixed
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110613/b8516703/attachment.pl>
2007 Jun 04
3
Extracting lists in the dataframe $ format
I'm new to R and am trying to extract the factors of a dataframe using numeric indices (e.g. df[1]) that are input to a function definition instead of the other types of references (e.g. df$out). df[1] is a list(?) whose class is "dataframe". These indexed lists can be printed successfuly but are not agreeable to the plot() and lm() functions shown below as are their df$out
2005 Mar 28
1
mixed model question
I am trying to fit a linear mixed model of the form
y_ij = X_ij \beta + delta_i + e_ij
where e_ij ~N(0,s^2_ij) with s_ij known
and delta_i~N(0,tau^2)
I looked at the ecme routine in package:pan, but this routine
does not allow for different Vi (variance covariance matrix of
the e_i vector) matrices for each cluster.
Is there an easy way to fit this model in R or should I bite the
bullet and
2006 Aug 24
1
lmer(): specifying i.i.d random slopes for multiple covariates
Dear readers,
Is it possible to specify a model
y=X %*% beta + Z %*% b ; b=(b_1,..,b_k) and b_i~N(0,v^2) for i=1,..,k
that is, a model where the random slopes for different covariates are i.i.d., in lmer() and how?
In lme() one needs a constant grouping factor (e.g.: all=rep(1,n)) and would then specify:
lme(fixed= y~X, random= list(all=pdIdent(~Z-1)) ) ,
that?s how it's done in the
2004 Apr 27
3
Mixed Effects Models in S and S-Plus book
Anybody know where I can get the Pinheiro/Bates book?
I can't find a bookstore w/ stock and the publisher
says they don't know when they'll have it again.
Thanks.
-Frank
2006 Nov 10
1
count data with nested mixed effects
Dear R-Pros,
I have count data in which 6-10 points are nested within 17 larger units
(which are nested within 3 larger-still units) plus a number of
covariates. It could be nested ANCOVA but for poisson family. Could
someone kindly advise me 1) if lmer is the correct function for the
analysis? and 2) what synax expresses the error structure? I have
consulted the package HTML documentation but
2009 Sep 29
3
Probability of data values form DENSITY function
Hello,
Could someone help me please and to tell how to get the probability from empirical DENSITY (not parametric) for each data value (R function).
For example, for normal distribution there is such a function like:
“dnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)”
I need the same function only for the empirical DENSITY function (which does not correspond to any typical
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,