similar to: lmer() : crossed-random-effects specification

Displaying 20 results from an estimated 1000 matches similar to: "lmer() : crossed-random-effects specification"

2007 Aug 07
0
lmer() - crossed random effects specification
Dear all, I want to estimate a crossed-random-effects model (i.e., measurements, students, schools) where students migrate between schools over time. I'm interested in the fixed effects of "SES", "age" and their interaction on "read" (reading achievement) while accounting for the sample design. Based on a previous post, I'm specifying my model as: fm1 <-
2011 Aug 16
2
Assignment working differently inside ifelse()
Hello all, I need to extract rows and columns from a data frame and put them in a matrix. In some cases, there are no rows in the data frame meeting the selection criteria. For those rows I want to put a row of 0's in the matrix. Here's my clumsy code: tab1.m1 <- matrix(0, nrow=2, ncol=4) tab1.m1[1,] <- ifelse(length(as.matrix(tab1[tab1$comp==the.comp & tab1$schlid==the.schl
2007 Feb 20
1
Simplification of Generalised Linear mixed effects models using glmmPQL
Dear R users I have built several glmm models using glmmPQL in the following structure: m1<-glmmPQL(dev~env*har*treat+dens, random = ~1|pop/rep, family = Gamma) (full script below, data attached) I have tried all the methods I can find to obtain some sort of model fit score or to compare between models using following the deletion of terms (i.e. AIC, logLik, anova.lme(m1,m2)), but I
2007 Jan 25
1
New version of lme4 and new mailing list R-SIG-mixed-models
Version 0.9975-11 of the lme4 package has been uploaded to CRAN. The source package should be available on the mirrors in a day or two and binary packages should follow soon after. There are several changes in this release of the package. The most important is the availability of a development version of lmer called, for the time being, lmer2. At present lmer2 only fits linear mixed models.
2007 Jan 25
1
New version of lme4 and new mailing list R-SIG-mixed-models
Version 0.9975-11 of the lme4 package has been uploaded to CRAN. The source package should be available on the mirrors in a day or two and binary packages should follow soon after. There are several changes in this release of the package. The most important is the availability of a development version of lmer called, for the time being, lmer2. At present lmer2 only fits linear mixed models.
2007 Sep 19
3
Robust or Sandwich estimates in lmer2
Dear R-Users: I am trying to find the robust (or sandwich) estimates of the standard error of fixed effects parameter estimates using the package "lmer2". In model-1, I used "robust=TRUE" on the other, in model-2, I used "robust=FALSE". Both models giving me the same estimates. So my question is, does the robust option works in lmer2 to get the robust estimates of
2007 Jan 29
1
lmer2 error under Mac OS X on PowerPC G5 but not on Dual-Core Intel Xeon
> (fm1 <- lmer2(Reaction ~ Days + (Days|Subject), sleepstudy)) Error in as.double(start) : Calloc could not allocate (888475968 of 4) memory ************************* > sessionInfo() R version 2.4.1 (2006-12-18) powerpc-apple-darwin8.8.0 locale: C attached base packages: [1] "grid" "datasets" "stats" "graphics" "grDevices"
2010 Dec 29
2
as.object: function doesn't exist but I wish it did
I seem to come to this problem alot, and I can find my way out of it with a loop, but I wish, and wonder if there is a better way. Here's an example (lmer1-5 are a series of lmer objects): bs=data.frame(bic=BIC(lmer1,lmer2,lmer3,lmer4,lmer5)$BIC) rownames(bs)=c('lmer1','lmer2','lmer3','lmer4','lmer5') best=rownames(bs)[bs==min(bs)] > best [1]
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
2007 Oct 08
2
estfun & df
Hello EVERYONE, I need an URGENT help from you please! How can I see the "estfun" (empirical estimating function) and "df" (degree of freedom) from the following mixed-model please? (fm1 <- lmer2(Reaction ~ Days + (Days|Subject), sleepstudy)) Many thanks in advance for your kind help. Sattar
2007 Mar 07
1
Failure to run mcsamp() in package arm
Dear r-helpers, I can run the examples on the mcsamp help page. For example: **************************************** > M1 <- lmer (y1 ~ x + (1|group)) > (M1.sim <- mcsamp (M1)) fit using lmer, 3 chains, each with 1000 iterations (first 500 discarded) n.sims = 1500 iterations saved mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff beta.(Intercept)
2008 Feb 11
1
Logistic regression with repeated measures
Hello R list, I am hoping to conduct a logistic regression with repeated measures, and would love an actual "code run through" for such an analysis. I found only one related post on this list, but a full answer was never provided. I understand that the routine lmer (or lmer2) in the lme4 package is often recommended in such a case, but actually implementing it is where I've hit a
2007 Jan 26
0
R crash with modified lmer code
Hi all, I've now got a problem with some modified lmer code (function lmer1 pasted at end) - I've made only three changes to the lmer code (marked), and I'm not really looking for comments on this function, but would like to know why execution of the following commands that use it almost invariably (but not quite predictably) leads to the R session terminating. Here's the command
2008 Mar 13
1
lmer and correlation
Hello list, I've been reading through the archives and it seems as though, as of right now, there is no way to specify the correlation structure in lmer. I was wondering if anyone knows if this is going to be implemented? I'm using mixed-effects models within a tree structure, so I make a lot of calls to lme to get the resulting deviance, and lmer2 is almost 5 times faster than lme
2012 Aug 07
1
Save & reload list objects
Hi, I think this is probably (& hopefully) very easy but I the ideas I have tried don't work. Simply, I have 2 very large lists in my workspace which take an awfully long time to make, each containing the information from 12500+ lmer models. I would like to now save these lists as files (txt, csv... whatever suits best) on to my computer/usb. Then I would like to be able to reload them in
2006 Feb 12
1
Mathematical typesetting of column heads using the latex (Hmisc) function
Dear r-helpers, I would very much appreciate help with the following problem: The following command (in a .Rnw file) latex(anova(e7.lmer3, e7.lmer4), file = 'e7lmer34.tex', rowname = c ('nonlinear', 'linear'), longtable = FALSE, dcolumn = T, booktabs = T, table.env = F) produces the following output after running Sweave: % latex.default(anova(e7.lmer1, e7.lmer2),
2007 Oct 05
0
Extracting df (degree of freedom) & estfun (estimating function) from model built in lmer or lmer2
Hello R-users: Could you please tell me how can I extract the "df (degree of freedom)" and "estfun (estimating functions)" for the following lmer (or lmer2) model? wtd.mixed<-lmer(ddimer~race+steroid+psi+sofa+apache + (1|subject), method="ML", data=final, cluster="id", weights=w) I tried the following codes: - for the degree of freedom (erorr
2007 Jun 13
1
lme() doesn't converge on IGF example
Running the Chapter 4 examples in Pinheiro & Bates' "Mixed-Effects Models in S and S-PLUS" (2000), I get a message that the default optimizer doesn't converge, but using "optim" for the optimizer results in convergence: > > library(nlme) > > fm1IGF.lis <- lmList(IGF) > > fm1IGF.lme <- lme(fm1IGF.lis) > Error in lme.formula(fixed =
2008 Mar 08
1
analysing mixed effects/poisson/correlated data
I am attempting to model data with the following variables: timepoint - n=48, monthly over 4 years hospital - n=3 opsn1 - no of outcomes total.patients skillmixpc - skill mix percentage nurse.hours.per.day Aims To determine if skillmix affects rate (i.e. no.of.outcomes/total.patients). To determine if nurse.hours.per.day affects rate. To determine if rates vary between
2012 May 08
2
mgcv: inclusion of random intercept in model - based on p-value of smooth or anova?
Dear useRs, I am using mgcv version 1.7-16. When I create a model with a few non-linear terms and a random intercept for (in my case) country using s(Country,bs="re"), the representative line in my model (i.e. approximate significance of smooth terms) for the random intercept reads: edf Ref.df F p-value s(Country) 36.127 58.551 0.644