Displaying 20 results from an estimated 400 matches similar to: "yet another lmer question"
2006 Feb 10
1
mcmcsamp shortening variable names; how can i turn this feature off?
I have written a function called mcsamp() that is a wrapper that runs
mcmcsamp() and automatically monitors convergence and structures the
inferences into vectors and arrays as appropriate.
But I have run into a very little problem, which is that mcmcsamp()
shortens the variable names. For example:
> set.seed (1)
> group <- rep (1:5,10)
> a <- rnorm (5,-3,3)
> y <-
2007 Apr 27
1
Example of mcmcsamp() failing with lmer() output
Hi,
I would appreciate help with the following model
<<1>>=
gunload <- read.table(hh('datasets/gunload.dat'), header = T)
gunload$method <- factor(gunload$method, labels = c('new', 'old'))
gunload$physique <- factor(gunload$group, labels = c('slight',
'average', 'heavy'))
gunload$team9 <- factor(rep(1:9, each = 2))
@
This
2006 Jan 10
2
lmer(): nested and non-nested factors in logistic regression
Thanks to some help by Doug Bates (and the updated version of the Matrix
package), I've refined my question about fitting nested and non-nested
factors in lmer(). I can get it to work in linear regression but it
crashes in logistic regression. Here's my example:
# set up the predictors
n.age <- 4
n.edu <- 4
n.rep <- 100
n.state <- 50
n <- n.age*n.edu*n.rep
age.id
2009 Feb 11
2
generalized mixed model + mcmcsamp
Hi,
I have fitted a generalized linear mixed effects model using lmer
(library lme4), and the family = quasibinomial. I have tried to obtain a
MCMC sample, but on calling mcmcsamp(model1, 1000) I get the following
error which I don't understand at all:
Error in .local(object, n, verbose, ...) : Update not yet written
traceback() delivers:
4: .Call(mer_MCMCsamp, ans, object)
3:
2006 Dec 11
2
How to write a two-way interaction as a random effect in a lmer model?
Dear All,
I am working with linear mixed-effects models using the lme4 package in
R. I created a model with the lmer function including some main effects,
a two-way interaction and a random effect. Now I am searching how I
could incorporate an interaction between the random effect and one of
the fixed effects.
I tried to express the interaction in:
2011 Feb 19
0
lmer, MCMCsamp and ranef samples?
I really hope sombody could help me with the following,
I'm having problems accessing the random effect samples following the
example on MCMCsamp:
(fm1 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))
set.seed(101); samp0 <- mcmcsamp(fm1, n = 1000, saveb=TRUE)
str(samp0)
Formal class 'merMCMC' [package "lme4"] with 9 slots
..@ Gp :
2008 Apr 13
2
prediction intervals from a mixed-effects models?
How can I get prediction intervals from a mixed-effects model?
Consider the following example:
library(nlme)
fm3 <- lme(distance ~ age*Sex, data = Orthodont, random = ~ 1)
df3.1 <- with(Orthodont, data.frame(age=seq(5, 20, 5),
Subject=rep(Subject[1], 4),
Sex=rep(Sex[1], 4)))
predict(fm3, df3.1, interval='prediction')
# M01 M01
1998 Jun 17
3
bug in functions of form "mcpar<-"
This fairly harmless looking piece of code, which worked in
0.61 (and in S-PLUS) fails in 0.62.1.
R> "mcpar<-" <- function(x,mcpar) {attr(x,"mcpar") <- mcpar; x}
R> mcpar(x) <- c(1,100,1)
Error in mcpar<-(*tmp*, value = c(1, 100, 1)) : unused argument to function
The error message gives a hint about how to work around the problem -
just replace the
2006 May 20
5
Can lmer() fit a multilevel model embedded in a regression?
I would like to fit a hierarchical regression model from Witte et al.
(1994; see reference below). It's a logistic regression of a health
outcome on quntities of food intake; the linear predictor has the form,
X*beta + W*gamma,
where X is a matrix of consumption of 82 foods (i.e., the rows of X
represent people in the study, the columns represent different foods,
and X_ij is the amount of
2007 Aug 07
1
bayesm - question about 'rscaleUsage function'
Hi all,
I have managed to get the r-scale usage algorithm to work, but I need to obtain the final results from this. As I understand it, this code is designed to generate a matrix after processing and store it somewhere?????
Here is the code.....
I get this part of the code, it all makes sense.
##
if(nchar(Sys.getenv("LONG_TEST")) != 0) {R=1000} else {R=5}
{
data(customerSat)
2006 Apr 19
4
Ring a grop of extension, then playback a file, then transfer to external number
Ok,
Here is what I got working:
A call comes in from a Zap line. 5 SIP extension ring if nobody picks
up, the call is transfered to a cell phone number. That works.
I not want to add a playback of a file ("Please waite while you are
being transfered") before transfering the call to the cell phone.
How can I do this?
Andre
2003 Aug 15
2
Samba3: PDC and local admins
Hi!
I have samba 3 beta2 as PDC.
Now I need to make all mebers of the unix grop "users" local admins on
their Windows systems, because Wordperferct 8 doesn't run otherwise.
As the "domain admin group" setting from smb.conf doen't exist anymore,
I don't know, how to do the group mapping correctly. Could someone
explain the steps to do it?
Thanks in advance for
2006 Oct 20
1
mcmcsamp - How does it work?
Hello,
I am a chemical student and I make use of 'lme/lmer function'
to handle experiments in split-plot structures.
I know about the mcmcsamp and I think that it's very promissory.
I would like knowing "the concept behind" of the mcmcsamp function.
I do not want the C code of the MCMCSAMP function.
I would like to get the "pseudo-algorithm" to understanding
that
2005 Aug 17
4
How to assess significance of random effect in lme4
Dear All,
With kind help from several friends on the list, I am getting close.
Now here are something interesting I just realized: for random
effects, lmer reports standard deviation instead of standard error! Is
there a hidden option that tells lmer to report standard error of
random effects, like most other multilevel or mixed modeling software,
so that we can say something like "randome
2008 Oct 08
1
Suspicious output from lme4-mcmcsamp
Hello, R community,
I have been using the lmer and mcmcsamp functions in R with some difficulty. I do not believe this is my code or data, however, because my attempts to use the sample code and 'sleepstudy' data provided with the lme4 packaged (and used on several R-Wiki pages) do not return the same results as those indicated in the help pages. For instance:
> sessionInfo()
R
2006 Aug 08
1
fixed effects following lmer and mcmcsamp - which to present?
Dear all,
I am running a mixed model using lmer. In order to obtain CI of
individual coefficients I use mcmcsamp. However, I need advice which
values that are most appropriate to present in result section of a
paper. I have not used mixed models and lmer so much before so my
question is probably very naive. However, to avoid to much problems with
journal editors and referees addicted to
2003 Apr 18
1
MCMCpack gelman.plot and gelman.diag
Hi,
A question. When I run gelman.diag and gelman.plot
with mcmc lists obtained from MCMCregress, the results are following.
> post.R <- MCMCregress(Size~Age+Status, data = data, burnin = 5000, mcmc = 100000,
+ thin = 10, verbose = FALSE, beta.start = NA, sigma2.start = NA,
+ b0 = 0, B0 = 0, nu = 0.001, delta = 0.001)
> post1.R <- MCMCregress(Size~Age+Status, data
2007 Apr 03
2
HPDinterval problem
Hi,
Can anyone tell me why I am not getting the correct intervals for
fixed effect terms for the following generalized linear mixed model
from HPDinterval:
> sessionInfo()
R version 2.4.1 (2006-12-18)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
2010 Jan 31
2
lmer, mcmcsamp, coda, HPDinterval
Hi,
I've got a linear mixed model created using lmer:
A6mlm <- lmer(Score ~ division + (1|school), data=Age6m)
(To those of you to whom this model looks familiar, thanks for your patience
with this & my other questions.) Anyway, I was trying this to look at the
significance of my fixed effects:
A6post <- mcmcsamp(A6mlm, 50000)
library(coda)
HPDinterval(A6post)
..but I got this
2007 Mar 30
0
problem using mcmcsamp() with glmer models containing interaction terms in fixed effects
Dear All,
I've been using mcmcsamp() successfully with a few different mixed models
but I can't get it to work with the following. Is there an obvious reason
why it shouldn't work with a model of this structure ?
*brief summary of objective:
I want to test the effect of no-fishing marine reserves on the abundance of
a target species.
I have samples at coral reef sites inside and