Displaying 20 results from an estimated 900 matches similar to: "lme4:glmer with nested data"
2008 Feb 20
3
reshaping data frame
Dear all,
I'm having a few problems trying to reshape a data frame. I tried with
reshape{stats} and melt{reshape} but I was missing something. Any help is
very welcome. Please find details below:
#################################
# data in its original shape:
indiv <- rep(c("A","B"),c(10,10))
level.1 <- rpois(20, lambda=3)
covar.1 <- rlnorm(20, 3, 1)
level.2
2010 Feb 11
2
Unexpected output in first iteration of for-loop
Dear r-helpers,
why do I get an output in the first iteration of the for-loop
which contains the string values of the input vector,
and how can I avoid that?
Here's the output (only line 1 is wrong)
latentVariable Indiv Group
1 rPlanning rIterat rTDD
2 rPlanning 0.79 0.84
3 rIterat 0.79 0.83
4 rTDD 0.9 0.96
5 rStandup 0.83 0.82
6
2000 Mar 31
1
R: one bananna aov() question
Hello world,
I'm trying to do an
anova on data in data.set, dependent variable is a column
named "dep.var", grouping variable is in a column called "indep.var", and
is.factor(indep.var) is TRUE...
why can't I just do aov(dep.var ~ indep.var, data = data.set)?
What have I done to deserve this?! What gives? Am I missing something
totlly obvious?
R-base-1.0.0-1,
2007 Aug 07
2
GLMM: MEEM error due to dichotomous variables
I am trying to run a GLMM on some binomial data. My fixed factors include 2
dichotomous variables, day, and distance. When I run the model:
modelA<-glmmPQL(Leaving~Trial*Day*Dist,random=~1|Indiv,family="binomial")
I get the error:
iteration 1
Error in MEEM(object, conLin, control$niterEM) :
Singularity in backsolve at level 0, block 1
>From looking at previous help
2010 Nov 19
2
Question on overdispersion
I have a few questions relating to overdispersion in a sex ratio data set
that I am working with (note that I already have an analysis with GLMMs for
fixed effects, this is just to estimate dispersion). The response variable
is binomial because nestlings can only be male or female. I have samples of
1-5 nestlings from each nest (individuals within a nest are not independent,
so the response
2017 Jun 02
0
Question on interpreting glmer() results
Hello,
I originally posted this on the stats stack exchange site, but given its
focus on R software, it was removed -- so I figured I'd post here.
I'm having trouble interpreting a change in effect direction and
significance when I add an interaction term to my glmer() model.
*Part 1*
I ran an experiment in which participants made categorical decisions (out
of two categories) in one of
2013 May 18
1
glmer.nb: function not in downloaded lme4 package?
Dear R Help,
I would like to use the glmer.nb function for mixed modelling using negative binomial distribution please.
On the CRAN website apparently this function is called from the lme4 package (version 0.99999911-1).
I have downloaded the latest version of the lme4 package (version 0.999999-2) and have recently reinstalled the latest version of 64-bit R (version 3.0.1) but after
2010 Oct 04
0
glmer or not - glmer model specification
Hello,
I'm having some trouble figuring out the correct model specification for
my data. The system consists of multiple populations of an organism,
which have been genetically sampled for several years. The problem is
this: A minority of individuals are found in more than one sample,
either they have survived into the next sampling at the same location,
or have migrated to another another
2008 Aug 07
1
incorrect usage of glmer crashes R (PR#12375)
Full_Name: susscorfa
Version: 2.7.1
OS: ubuntu
Submission from: (NULL) (129.125.177.31)
Incorrect implementation of the grouping variable in the function glmer crashes
R
a small example:
require(lme4);
a<-data.frame(b=rpois(1000,10), c=gl(20,50), d=rnorm(1000,3), e=rnorm(1000,5),
f=rnorm(1000,2)+5);
glmer(b~d+f|c+(e), family=poisson, data=a)
It crashes R on debian linux (2 independant
2010 Feb 09
2
step and glmer
Is it possible to use the step() function with a glmer() as an object? I
obtain the following error message when I try to do it: "Error in x$terms :
$ operator not defined for this S4 class".
I perform the glmer correctly but I can't do the step.
Thank you so much.
--
View this message in context: http://n4.nabble.com/step-and-glmer-tp1474390p1474390.html
Sent from the R help
2008 Aug 19
1
R vs Stata on generalized linear mixed models: glmer and xtmelogit
Hello,
I have compared the potentials of R and Stata about GLMM, analysing the dataset 'ohio' in the package 'faraway' (the same dataset is analysed with GEE in the book 'Extending the linear model with R' by Julian Faraway).
Basically, I've tried the 2 commands 'glmmPQL' and 'glmer' of R and the command 'xtmelogit' of Stata. If I'm not
2009 Mar 24
1
CONFIDENCE INTERVAL FOR GLMER MODEL
I've built a poisson regression model for multiple subjects by using the
GLMER function. I've also developed some curves for defining its limits but
I did not succeed in developing confidence interval for the model's curve
(confint or predict does not work - only for glm).
Does anyone know how can I produce confidence interva for a glmer model?
I'll appriciate any help...
Liat
--
2009 Jan 07
1
how to estimate overdispersion in glmer models?
Dear all,
I am using function glmer from package lme4 to fit a generalized linear
mixed effect model. My model is as follows:
model1 <- glmer(fruitset ~ Dist*wire + (1|Site), data, binomial)
summary(model1)
Generalized linear mixed model fit by the Laplace approximation
Formula: fruitset ~ Dist * wire + (1 | Site)
Data: data
AIC BIC logLik deviance
68.23 70.65 -29.11 58.23
Random
2008 Aug 25
1
Specifying random effects distribution in glmer()
I'm trying to figure out how to carry out a Poisson regression fit to
longitudinal data with a gamma distribution with unknown shape and
scale parameters.
I've tried the 'lmer4' package's glmer() function, which fits the
Poisson regression using:
library('lme4')
fit5<- glmer(seizures ~ time + progabide + timeXprog +
offset(lnPeriod) + (1|id),
data=pdata,
2010 May 30
0
sanity-checking plans for glmer
Having briefly fallen for the notion that the negative.binomial family
in MASS could be used in glmer, I want to use these lists for a sanity
check on my final (?) plans.
I want to use glmer for logistic regression and for poisson regression
on a data set of 10,000 items. There will be two crossed random
effects.
For the logistic regression, I want odds ratios with confidence
intervals.For the
2011 May 13
1
using glmer to fit a mixed-effects model with gamma-distributed response variable
Sub: using glmer to fit a mixed-effects model with gamma-distributed
response variable
Hello,
I'm currently trying to fit a mixed effects model , i.e.:
> burnedmodel1.2<-glmer(gpost.f.crwn.length~lg.shigo.av+dbh+leaf.area+
bark.thick.bh+ht.any+ht.alive+(1|site/transect/plot), family=gaussian,
na.action=na.omit, data=rws30.BL)
If I run this code, I get the error below:
Error:
2009 Aug 28
0
Help with glmer {lme4} function: how to return F or t statistics instead of z statistics?
Hi,
I'm new to R and GLMMs, and I've been unable to find the answers to my
questions by trawling through the R help archives. I'm hoping someone
here can help me.
I'm running an analysis on Seedling survival (count data=Poisson
distribution) on restoration sites, and my main interest is in
determining whether the Nutrients (N) and water absorbing polymer Gel
(G) additions to the
2013 Dec 12
1
censored counts and glmer/glmmADMB
dear R-users,
I have to model counts where all counts above some threshold
have been censored. In the same dataset I have too many zeroes for
a Poisson or even a negative binomial distribution to make
sense, so I would need a zero-inflated-censored negative binomial
family for use in glmer (or glmmADMB?). That seems not to exist.
my question is :
how could I add a custom-built family of
2008 Nov 20
1
glmer for cauchit link function
Dear all,
A am trying to fit a generalized linear mixed effects model with a binomial
link function, my response data is binary, using the lme4 R package, for the
glmer model but with the cauchit link function (CDF of Cauchy distribution),
under the package this has not yet been coded and was wondering if anyone
knew a way in which I could incorporate this link function into the code.
Thankyou
2010 Mar 14
3
likelihood ratio test between glmer and glm
I am currently running a generalized linear mixed effect model using glmer and I want to estimate how much of the variance is explained by my random factor.
summary(glmer(cbind(female,male)~date+(1|dam),family=binomial,data= liz3"))
Generalized linear mixed model fit by the Laplace approximation
Formula: cbind(female, male) ~ date + (1 | dam)
Data: liz3
AIC BIC logLik deviance
241.3