Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
50 votes
2 answers
78k views

Mixed Effects Model with Nesting

I have data collected from an experiment organized as follows: Two sites, each with 30 trees. 15 are treated, 15 are control at each site. From each tree, we sample three pieces of the stem, and ...
Erik's user avatar
  • 555
11 votes
1 answer
2k views

Minimum number of repeated measures and levels per nested random effect

I often read the guideline that a random factor should at least have 5-6 levels. However, it is not yet really clear to me if there is (i) a minimum number of levels for a nested factor within a block ...
bee guy's user avatar
  • 1,029
7 votes
3 answers
554 views

Mixed model with nested and crossed random effects

I'm new to mixed effects models and am trying to use the lmer() function from the lme4 R package to specify a random effects ...
Tim's user avatar
  • 125
7 votes
1 answer
3k views

GLMM - between, within and nested

I'm not entirely sure of fitting the model for experiment we've made. The variables and relevant description are as follows: ID - participant ID Trial - 60 for each participant Memory - between ...
Piotr Falkowski's user avatar
7 votes
1 answer
991 views

Nested Anova vs Multilevel Linear Models

I am working on a problem which revolves around individual axons / nerve cells in two treatment conditions. All relevant questions are clearly on the axon level, and dependent on properties (size, ...
vrtsig's user avatar
  • 101
6 votes
1 answer
273 views

Nesting terminology in mixed models

Suppose I have the following nested lmer structure: lmer(Y ~ X1 + X2 + X1:X2 + (1 | A) + (1 | A:B), data=d) which is the same ...
Stefan's user avatar
  • 6,551
6 votes
1 answer
617 views

GLMM model specification help gender effects + an effect that is nested only within female

Main question: "What are the contributing variates to daily movement distances?" Specifically my question today relates to: "What is the contribution related to gender, and then within ...
KalahariKev's user avatar
6 votes
1 answer
2k views

How do I analyze bimodal distibuted data with a linear mixed model

The experiment I am working on has the following design: A B C D E F B A D E F C A B E F C D B A F C D E Each Letter represents a different level of the single factor called “...
Thomas Baumgartner's user avatar
6 votes
1 answer
1k views

Can a factor be regarded as both random and fixed effect?

I have a question about nested mixed effect model. For example I have species A with different populations; these populations belong to two kinds of habitat types (with or without predators). So I ...
Bin's user avatar
  • 61
5 votes
2 answers
520 views

Glmer with count data, nested design and repeated measurements

Currently I try to fit a model for counted Individuals (response variable, integer numbers) in Different types of traps (factorial explanatory variable). I have two different Biotopes, and three ...
J_Biology's user avatar
5 votes
1 answer
194 views

is it correct to nest fixed effects within random factors?

In this post @Ben Bolker wrote in his answer that for the interaction between station and day we could write ...
locus's user avatar
  • 1,629
5 votes
1 answer
209 views

Interpreting nested random effects

I was playing around with some data and had hard time to understand the meaning of nested effects. Here's an example of a dataset (selfesteem2 from package datarium)...
User33268's user avatar
  • 1,782
5 votes
1 answer
5k views

How to model nested fixed-factor with GLMM

I am a beginner on learning in GLMM and R, please forgive me if I am not making sense or asking something that is very basic. I am trying to specify a nested fixed-factor in my GLMM model, but I don'...
Nicole K's user avatar
5 votes
1 answer
3k views

Repeated-measures linear mixed effect model

I have used a repeated-measures ANOVA in SPSS to analyse some of my data. It's the typical approach in my area, but I think it might be more appropriate to use a mixed effect model. However, I ...
A. Dent's user avatar
  • 53
5 votes
1 answer
2k views

Non-linear mixed model (nlme) with nested random effect, do not know how to include nested random effect when bootstrapping

I have fitted a nonlinear model with nested random effect, and I'm trying to estimate confidence intervals on predictions by nested bootstrapping, by following this explanation. I have edited my ...
Kes's user avatar
  • 51
4 votes
1 answer
3k views

Crossed fixed effects model specification including nesting and repeated measures using glmm in R

Background: I am interested in looking at the effects that Culture, Treatment and Time have ...
LiveLongandProsper's user avatar
4 votes
1 answer
7k views

Nested random effects in lme4 R

Background: I have data on time to infection across multiple sites across a gradient. The design involves 2 latitudes (In and Out) with sites 1 and 2 nested within “In” and sites 3 and 4 nested within ...
LiveLongandProsper's user avatar
4 votes
1 answer
406 views

Should repeated measures be included as a nested or a crossed random effect in glmer?

I have a field experiment looking at the effect of a seed-mix treatment on moth abundance and I am struggling to define the correct random effects structure. My experiment is structured like this: I ...
Dan's user avatar
  • 41
4 votes
1 answer
75 views

Cross-nested random intercepts in mixed model?

First, forgive my uncertain terminology. I think I have a cross-nested effect. I want to model mortgage origination in multiple MSAs (metropolitan statistical areas) vs. race, income, type of loan, ...
Bryan's user avatar
  • 1,291
4 votes
1 answer
60 views

nesting/crossing in lme4

My question relates to the excellent answer given to this question a couple of years ago "Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?" The answer ...
Michael Reid's user avatar
4 votes
1 answer
858 views

Mixed Effects Model with nested data

I have (in my opinion) a nested data-set, which I want to analyze with a mixed effects model (R's lme4 function). I need help with the model specification. The data-set consists of three subject ...
Costas Anastasopoulos's user avatar
4 votes
1 answer
2k views

Three-level partially nested model

I am modeling change over time in group psychotherapy subjects using R and lme4. My data have the following structure: subject (id) time (code 1-10 for equally spaced repeated measures) outcome (for ...
Claudiu Papasteri's user avatar
4 votes
1 answer
2k views

Repeated measures with nested data mixed effects model

Hi everyone: I'm hoping for help analyzing nested data in R. I measured the mass of chicks at 3 time points; chicks were in one of two treatments (P and W) and in one of two environmental conditions (...
SMM's user avatar
  • 101
4 votes
1 answer
886 views

Nesting and grouping formula confusions using lme

I've seen a fair few of these posts already, and I feel a bit silly for posting yet another question on the topic - but I just cant seem to get my head around it. I'm very new to R and esp new to lme, ...
IdaFish's user avatar
  • 41
4 votes
0 answers
593 views

notation for the regression equation in a nested and repeated measures random effects model

I'm looking for help with regard to the notation for a regression equation in a repeated measures model with nested data, $\eqref{eq:2}$, and connecting the notation back to my model specification, <...
Eric Fail's user avatar
  • 439
4 votes
0 answers
4k views

Random or fixed effects? GLM or GLMM?

I am interested in the behavioral response of floral visitors to a treatment, applied in a paired fashion within plants. That is, one stem on each plant receives the treatment, and another stem serves ...
JKO's user avatar
  • 805
3 votes
2 answers
191 views

Nested data correction with mixed models

We have collected data from n patients, with each patient having one eye treated and the other untreated. We would like to see if the treated eye progresses differently to the untreated eye using ...
JP1's user avatar
  • 201
3 votes
2 answers
481 views

Covariance structure with one or more random intercepts

I need to choose a suitable covariance structure including one or more random intercepts: If one factor B is nested in another factor ...
user3419936's user avatar
3 votes
1 answer
153 views

Mixed model with nesting

I am new to working with mixed models in R and am hoping someone can tell me if this syntax is correct. m <- lmer(y ~ maturity * type + (1|run/block)) Where ...
yaynikkiprograms's user avatar
3 votes
1 answer
57 views

Linear Mixed Models: Accounting an effect as a random intercept or slope

My goal is to test whether reaction is significantly different between tasks (a, b, and c). However, the order in which I run the tasks in my experiment may affect the reaction. But I'm not interest ...
Trudy's user avatar
  • 31
3 votes
2 answers
434 views

How to combine random effect and nested random effect with lme

I'm doing a mixed linear model. And I have subjects who have been select in 20 schools. So I want to take this to account. For this, I want to put a random intercept for the "SCHOOL" variable and a ...
Lemon3's user avatar
  • 51
3 votes
1 answer
53 views

Nesting in experimental desing

Suppose I have following results from my 2 experiments that contain 3 Block each and there are 4 treatments per Block (the example is R based) ...
Legionista's user avatar
3 votes
1 answer
544 views

Setting up a mixed model or a split-plot ANOVA for an experiment with male/female fishes in replicated tanks

I am designing an experiment with juvenile fishes. There are 12 replicated tanks. In each of the first 6 tanks there is a even mix of male and female fish (100 of each sex in each tank); 3 of these ...
GTC's user avatar
  • 51
3 votes
1 answer
891 views

model specification: crossed random effect for item and subject with fixed effect nested (??) within items

In a previous thread I got the advice to run a crossed random effects linear mixed model with my data. Whilst working on the model specification, I came across a new question. In short, all ...
grey's user avatar
  • 683
3 votes
2 answers
455 views

How to deal with nestedness of fixed factors in a linear mixed effects model (lmer in lme4)?

I am new to analyzing complex datasets using mixed models in R, so please forgive me if I am asking something very basic. I'm currently trying to write a linear mixed model using the ...
Anis's user avatar
  • 41
3 votes
1 answer
81 views

specifying random effects in an intensive longitudinal design

I conducted a study where participants made 15 decisions (which could be correct or incorrect) per trial (or block). There were 10 identical trials (so the same 15 decisions were made 10 times). All ...
Zach H's user avatar
  • 65
3 votes
1 answer
319 views

Nesting random effect within fixed effect, with additional nested random effect. Nominal logistic

Very new to R so please pardon my naivety. I am trying to run a sort of mixed effects nominal logistic regression model with my insect response data. I have 2 rearing treatments (hot and cold) and 3 ...
Anthony Macchiano's user avatar
3 votes
0 answers
46 views

nested mixed effect ANOVA (lme4): can a factor be a fixed effect AND a nesting term for a random effect? [duplicate]

I study fish in a single large river and want to know if fish length differs between 3 large sampling 'sections' of the river. To answer this question, I measured hundreds of fish lengths within five ...
stupid_grad_student's user avatar
3 votes
0 answers
743 views

Nested Fixed-effects in a GLMER. Continuous variable nested in one level of a two-level categorical variable. Is it possible? [closed]

I am not asking for help in the coding unless that may resolve the issue. I am wondering if this is even possible from a statistics standpoint and if it is, how I go about resolving it, because all my ...
Thomas Wukitsch's user avatar
3 votes
0 answers
534 views

Mixed Effects Model with Nesting - RNAseq differential expression

I'm new in the RNAseq differential expression analysis and I'd like to know which is the best way to treat my data. I have RNAseq data collected from iPSCs organized as follows: I have 2 groups of ...
user207573's user avatar
3 votes
0 answers
2k views

LMER: specify interaction between main fixed effect and nested random effect

I have an experiment where I tested the influence of mycorrhizal fungi on plant growth, in six populations of a plant species. Each population had 10 maternal lines (families, Fam) in it. I'm ...
jwb4's user avatar
  • 313
3 votes
0 answers
1k views

Can including an observation level random effect (OLRE) create nested random factors in a GLMM?

I have data from an observational study on insect parasitism rates from 42 sites. Some sites were sampled only once and others were sampled multiple times across different years. For each sampling ...
Rick's user avatar
  • 31
3 votes
1 answer
4k views

Specifying Cross-Level Interactions in LMER [closed]

I am trying to figure out if it's okay to specify cross-level interactions in a hierarchical model with fixed effect predictor variables at both levels using the ...
Miranda's user avatar
  • 31
2 votes
2 answers
2k views

mixed effects and lme4: Do I need nesting?

I am analyzing data from a field experiment, and I am interested in the effects of fauna and altitude (fixed). Altitude has two levels, and at each site I have 5 blocks for the three levels of fauna (...
Aline Quadros's user avatar
2 votes
1 answer
465 views

Estimating a random effect nested within a fixed effect for a linear mixed model [closed]

...
ashraful's user avatar
2 votes
1 answer
354 views

mixed-models in "nlme" package using lme() - nested data structure - error in model fitting - system is computationally singular

Cross-posting from stackoverflow I am working with a dataset having the following structure (download data here). The variable resp is a physiological response measured once for every subject during ...
StatisticsFanBoy's user avatar
2 votes
1 answer
653 views

ANOVA represenation of mixed model with crossed random effects and uncorrelated variance structure

I was expecting this to be simple when I started, it seems to not be the case. I am trying to model yield of bean genotypes. There were only 6 genotypes included. 3 trials were carried out in separate ...
dd_rookie's user avatar
  • 155
2 votes
1 answer
2k views

Repeatability estimation using a mixed model with repeated measures by four raters

I am a medical doctor and definitely not an expert in statistics, although I think I do okay and I am familiar with R. I have discussed the following issue with a statistician but I am still not sure ...
Dennis's user avatar
  • 21
2 votes
1 answer
1k views

Grouped/Nested data in logistic regression

Update: Added more meaningful example data Setting: In my study, each of three randomly chosen readers (A, B,...
ava's user avatar
  • 120
2 votes
1 answer
568 views

How to interprate random effects in an lme model in R [closed]

I am having trouble understanding the results of my lme model. Could someone tell me how to understand the random effects? Here is my model: ...
Dale Perkins's user avatar