Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
217 views

Model specification in nlme: Random effects

My design has a total of 20 sites. 5 sites belong to each of four land covers: A, B, C and D. In each site, I have 5 sampling locations, 2 metres from each other. From each sampling location, I ...
0 votes
0 answers
41 views

How do I correctly formulate the random effects with repeated measures in a paired design

Sorry if this is a cross-posting, but I haven't found the exact solution for my problem yet. Let us assume I have an experiment with 20 households, with 2 people each (1 female + 1 male). Over the ...
1 vote
2 answers
46 views

Appropriate Linear Mixed Model for nested data

I'm asking for help with the structure of a linear mixed model I'm trying to run. Here is the description of my study: I am studying the effect of different stand types (Oak pure, Pine pure and Mixed) ...
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 ...
0 votes
0 answers
31 views

Mixed effect model for two levels of repeated measures

I have a repeated measures dataset that I am attempting to analyze using linear mixed effects regression. I would like to compare the effects of different products (A and B) on a dependent variable (y)...
1 vote
1 answer
84 views

Describing data structure and specifying a linear mixed model in nlme with nested and crossed effects

I am trying to specify a linear mixed model to analyse data with the following structure and have several questions about correctly describing the structure of the data and how to specify the model. ...
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 ...
1 vote
1 answer
82 views

How to deal with this very nested data

I have run so many models and am so, so confused. I've attached an image of sample data that matches my structure. I have a single score per conversation (score is ...
0 votes
0 answers
59 views

lmer (lme4) nested random structure gives singular fit

I'm running the following model on some reaction time data: ...
1 vote
1 answer
78 views

Nested effects in lmer model

I have the following data structure: ...
1 vote
1 answer
30 views

How to specify a model with multiple treatment groups, measured twice, repeatedly across a time period (lme4)?

I have 30 animals (factor: animal_id, 30 levels) which have been treated with a drug or a vehicle (factor: treatment, 2 levels). ...
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 ...
1 vote
2 answers
1k views

Random Intercept vs. Random Slope Linear Mixed Effects Model with Nested Data

I have read a lot about random intercepts vs. random slopes in linear mixed effects (LME) models, but I am confused on how to think about them when it comes to nested data. I have looked at other ...
2 votes
0 answers
139 views

Equivalence test with random effects

I am designing an experiment where I will test different subjects’ multiple times under two different conditions (lab and real life) My hypothesis Is that that the subject will perform equivalent in ...
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 ...
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 ...
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 ...
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 (...
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 ...
1 vote
1 answer
240 views

Simulation Study for a Nested Random Effect Model

I am trying to simulate data based on two random effects and no fixed effects. The simulated data table contains nP projects and within each project ...
1 vote
1 answer
183 views

linear mixed effect models: random intercept, no fixed intercept interpretation

I'm learning about linear mixed effect models and I'm having a hard time interpreting a repeated measures model that has a random intercept, but no fixed intercept. As an example: ...
1 vote
0 answers
85 views

Correct specification of a nested mixed effect model in lmer

I have experiments where we tested 4 substances at different days. We have substance 1 tested 10 times at day 1, substance 1 tested 10 times at day 2, substance 2 tested 10 times at day 3, etc. We see ...
1 vote
1 answer
61 views

How does the REML fitting procedure know when a predictor is nested

Consider an experiment with two categorical predictors, A and B, where the levels of B are nested within those of A, and thus described by the following design information: A B 1 1 1 1 1 2 1 2 2 ...
0 votes
0 answers
48 views

Double nested lmer [duplicate]

On island biology I am currently doing a research on the difference in seed fall the between island. For this research I collected plants on the islands and dropping 5 seeds for eacht plant. This ...
1 vote
2 answers
455 views

Mixed model with two fixed effects, with repeated measures for only one of them

I am using linear mixed effect models to study the effect of a physical therapy treatment on two different populations of patients (Adolescents and Adults). The treatment is the same for both ...
2 votes
0 answers
68 views

How to deal with the rank deficiency in lmer for nested variable

Data and background of the study: The data is a repeat measurement of metabolite levels in responses to 2 types of stimuli. The data measured in 4 sessions— ...
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 ...
2 votes
0 answers
98 views

Syntax for unbalanced block design with nesting?

I am trying to run a model in which I have site as a blocking factor, and two layers of nested random effects due to sub-sampling. The nesting layers are -> plant[flower[robbing status]]. My response ...
1 vote
1 answer
280 views

lme4 mixed model analysis based on sum of count data

I have a dataset with pupils (1000+) that are nested within school classes (100+). Pupils were either in group1 or group2 (different treatments) and had two measurement time points (time0, time2). The ...
2 votes
0 answers
26 views

Using multilevel modeling to test differences in the ability of trait and state measures to predict outcomes

I'm currently trying to test whether trait is better at predicting overall/mean job performance than state anxiety and whether state anxiety is better at predicting daily job performance than trait ...
1 vote
1 answer
73 views

diference between nested and crossed random effects within my study [duplicate]

dear. How are you. There is long since I have been trying to solve a doubt about diference between nested and crossed random effects within my study. So I am here to ask and seek for some information. ...
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,...
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 ...
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 ...
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 ...
1 vote
1 answer
659 views

How to specify factors nested within treatments using a glmm

I have behavioral response data (counts of acts within an hour trial) that I would like to analyze using a GLMM. I'm new to GLMM's but after months of digging through papers and forums, I've concluded ...
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 ...
1 vote
1 answer
40 views

Modeling nested data using linear mixed modeling (specifically lme4)

I'll appreciate your help with conceptually understanding the models below. I have data for 150 subjects who completed a cognitive task. Each subject responded to four types of stimuli (A, B, C, D), ...
1 vote
1 answer
253 views

Crossed random effects: how do we model multiple reciprocal transplants in lme4?

I saw the previous post on "Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?" with a very nice descriptive response from @RobertLong (...
1 vote
1 answer
127 views

LMER random effects

I have a question regarding a linear mixed-effects model, specifically the random effects. I have taken one core in each zone (three Zones (U,L,P)) across five transects (T1-T5) and three ...
2 votes
1 answer
465 views

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

...
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 ...
0 votes
0 answers
57 views

Mixed effects model specification lmer

I am quite new to mixed effects modelling but am starting to explore more complex designs for hypothesis testing using lmer in R. The model specification is ...
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: ...
0 votes
0 answers
44 views

lmer applicable for nested unbalanced experimentel design?

My experimental design causes me some headache. It consists of three sites (A, B, C). Each site contains two treatments (Treat1 and Treat2). Obtained data (resp1 and resp2) were recorded at eight ...
0 votes
0 answers
101 views

Choosing between nested and crossed design

I'm looking to use a linear mixed effects model. Each participant will rate a given item using 9 scales, 1 of which is the outcome variable. There are 6 items in total. The aim is to determine which ...
1 vote
1 answer
227 views

How to go about nested random effects if model yields convergence problems?

I've built a mixed effects logistic regression model using glmer(). I'm trying to measure clause transitivity (2 possibilities: transitive/intransitive) Each observation is a clause and clauses are ...
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 ...
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 ...
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 ...