Displaying 20 results from an estimated 1100 matches similar to: "Example of mcmcsamp() failing with lmer() output"
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 Jan 28
1
yet another lmer question
I've been trying to keep track with lmer, and now I have a couple of
questions with the latest version of Matrix (0.995-4). I fit 2 very
similar models, and the results are severely rounded in one case and
rounded not at all in the other.
> y <- 1:10
> group <- rep (c(1,2), c(5,5))
> M1 <- lmer (y ~ 1 + (1 | group))
> coef(M1)
$group
(Intercept)
1 3.1
2
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
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
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
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 <-
2008 Sep 27
1
Using the mcmcsamp function
Hello,
I'm building a couple of mixed models using the lmer function.
The actual modelling is going well, but doing some reading on the use of
crossed random effects and the comparison of models with and without
random effects it is clear that I need to generate some Markov Chain Monte
Carlo samples. However, I'm struggling because everyone time I go to
generate a sample I get the
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 :
2006 Aug 08
1
fixed effects constant in mcmcsamp
I'm fitting a GLMM to some questionnaire data. The structure is J individuals,
nested within I areas, all of whom answer the same K (ordinal) questions. The
model I'm using is based on so-called continuation ratios, so that it can be
fitted using the lme4 package.
The lmer function fits the model just fine, but using mcmcsamp to judge the
variability of the parameter estimates produces
2009 Feb 24
2
lmer, estimation of p-values and mcmcsamp
(To the list moderator: I just subscribed to the list. Apologies for not
having done so longer before trying to post.)
Hi all,
I am currently using lmer to analyze data from an experiment with a
single fixed factor (treatment, 6 levels) and a single random factor
(block). I've been trying to follow the online guidance for estimating
p-values for parameter estimates on these and other
2006 Aug 16
1
How to pass an array to a javascript function.
Hi - I''m having a bit of trouble with my application. I have this view
that calls a javascript function "zip_map". I want to pass to it a
scalar array "@zip_geo" but I don''t know how to pass an array to a
javascript function in rails. This is what the code looks like:
THE .rhtml file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
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
2007 Jan 03
1
mcmcsamp and variance ratios
Hi folks,
I have assumed that ratios of variance components (Fst and Qst in
population genetics) could be estimated using the output of mcmcsamp
(the series on mcmc sample estimates of variance components).
What I have started to do is to use the matrix output that included
the log(variances), exponentiate, calculate the relevant ratio, and
apply either quantile or or HPDinterval to get
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
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:
2009 Oct 30
1
How to properly shade the background panels of an xyplot?
Dear R users,
this is a follow up of this message
http://tolstoy.newcastle.edu.au/R/e6/help/09/05/13897.html
I'm reproducing the core of it for convenience.
> //
> / data(Oats, package = "MEMSS") /
> / tp1.oats <- xyplot(yield ~ nitro | Variety + Block, /
> / data = Oats, /
> / panel = function(x, y, subscripts, ...) { /
2009 Oct 10
1
lattice auto.key drop unused levels
The following code produces a legend ("key") that mentions the unused
levels of Block.
library(MEMSS)
xyplot(yield~nitro, subset=(Block=="I" | Block=="II"), data=Oats,
group=Block, auto.key=T)
and adding "drop.unused.levels=T" does not fix it. And in fact even
the following does not solve the problem:
xyplot(yield~nitro,
2009 Oct 12
3
xyplot does not find variable in data
When we call a lattice function such as xyplot, to what extent does
the "data" designation cause the function to look inside the "data"
for variables?
In the examples below, the "subset" argument understands that
"Variety" is a variable in the data.
But the "scales" argument does not understand that "nitro" is a
variable in the data.
2005 Mar 22
3
Newbie: Matrix indexing
Hi all,
I need to compute some "occurence matrix": given a zero matrix and a set
of paired indexes, I want to store the number of occurences of each paired
index in a matrix. The paired indexes are stores as an index matrix. I
prefere not to use loops for performances purpose.
Here follows a dummy example:
> occurence <- matrix(0, 2, 2); data
[,1] [,2]
[1,] 0 0
2011 Oct 20
3
Strange R behavior for product of two sum of integers
Dear gentlemen,
Can you explain me why the following happens (any OS I think, and even
on 64 bits)?
> sum(1000:1205)^2
[1] 51581223225
> sum(1000:1205)*sum(1000:1205)
[1] NA
Warning message:
In sum(1000:1205) * sum(1000:1205) : NAs produced by integer overflow
Best,
Pierre
--
Pierre Lafaye de Micheaux
Adresse courrier:
D?partement de Math?matiques et Statistique
Universit? de