Skip to main content

All Questions

Filter by
Sorted by
Tagged with
100 votes
11 answers
280k views

How to obtain the p-value (check significance) of an effect in a lme4 mixed model?

I use lme4 in R to fit the mixed model lmer(value~status+(1|experiment))) where value is continuous, status and experiment are factors, and I get ...
ECII's user avatar
  • 2,201
35 votes
3 answers
53k views

How to get an "overall" p-value and effect size for a categorical factor in a mixed model (lme4)?

I would like to get a p-value and an effect size of an independent categorical variable (with several levels) -- that is "overall" and not for each level separately, as is the normal output from ...
user3288202's user avatar
  • 1,345
29 votes
2 answers
15k views

How should mixed effects models be compared and or validated?

How are (linear) mixed effects models normally compared against each other? I know likelihood ratio tests can be used, but this doesn't work if one model is not a 'subset' of the other correct? Is ...
dcl's user avatar
  • 2,842
17 votes
3 answers
2k views

Should "City" be a fixed or a random effect variable?

I am analyzing data on "BloodSugar" level (dependent variable) and trying to find its relation with "age", "gender" and "weight" (independent variables) of ...
rnso's user avatar
  • 10.2k
15 votes
1 answer
16k views

Conflicting results of summary() and anova() for a mixed model with interactions in lmer+lmerTest

I recently came across what I think may be a problem in how the anova() function from the lmerTest packages computes its F-...
James S.'s user avatar
  • 451
15 votes
1 answer
16k views

Comparing mixed-effects and fixed-effects models (testing significance of random effects)

Given three variables, y and x, which are positive continuous, and z, which is categorical, ...
user9171's user avatar
  • 1,531
11 votes
2 answers
6k views

Comparing a mixed model (subject as random effect) to a simple linear model (subject as a fixed effect)

I am finishing up some analysis on a large set of data. I would like to take the linear model used in the first part of the work and re-fit it using an linear mixed model (LME). The LME would be very ...
MudPhud's user avatar
  • 183
11 votes
0 answers
155 views

10 % false positives from nonlinear mixed effect models : Why? [closed]

I've run a simulation study in order to estimate type I error rate of the test of group effect in a nonlinear mixed effects model, using nlmer from lme4 package. The results show there is 8-10 % false-...
Rodolphe's user avatar
  • 1,043
10 votes
4 answers
9k views

How to test random effects in a multilevel model in R

I have been reading a good book called Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence by Judith Singer and John Willet. The book shows that by modeling in 2 levels, we can ...
biostat_newbie's user avatar
10 votes
2 answers
1k views

How should I model interactions between explanatory variables when one of them may have quadratic and cubic terms?

I'm sincerely hoping that I have phrased this question in such a way that it can be definitively answered--if not, please let me know and I will try again! I should also I guess note that I will be ...
Bajcz's user avatar
  • 555
9 votes
2 answers
4k views

Obtaining p-values in a robustlmm mixed model via Satterthwaite-approximated DFs of the equivalent lme4 model?

I've used lme4 to fit a mixed model and could obtain p-values by using the lmerTest or afex packages. However due to heteroskedasticity (Levene Test) I also fit a robust model (rlmer command in the ...
Julian's user avatar
  • 383
9 votes
1 answer
773 views

Confused: Why is lme4 changing techniques from Wald F tests to Wald Chisquare?

I've constructed some LMEMs that use dichotomous variables and their interactions as regressors, and I've become confused by the output. When I only assess a single interaction, using the code below (...
DegreesOfWhat's user avatar
8 votes
1 answer
8k views

Different p-values for fixed effects in summary() of glmer() and likelihood ratio test comparison in R

I'm using glmer() with a binomial response variable. My optimal model has two fixed effects (flow and DNA) which in summary() show a non-significant p value but ...
Ines's user avatar
  • 135
7 votes
1 answer
7k views

How can I obtain z-values instead of t-values in linear mixed-effect model (lmer vs glmer)?

I am wondering why in my lmer model the summary() only yields t-values rather than z-values, such as here: ...
Ping Tang's user avatar
  • 505
7 votes
1 answer
8k views

Satterthwaite degrees of freedom in a mixed model change drastically depending on the DV

I have a couple of MLM models created using lme4: y1 ~ x1 + x2 + x3 + x4 + (1+x4|id) y2 ~ x1 + x2 + x3 + x4 + (1+x4|id) ...
Simon's user avatar
  • 2,361
7 votes
2 answers
2k views

Testing the variance component in a mixed effects model

Say $y=X\beta+ Zu +\epsilon$ is our mixed effects model where $u=(u_1,..,u_r)$ and $u_{j} \stackrel{i.i.d.}{\sim} N(0, \sigma^2_{a})$ for $j=1,...,r$ and $\epsilon=(\epsilon_1,...,\epsilon_n)$ are i.i....
user22546's user avatar
  • 351
7 votes
2 answers
171 views

(Mixed-)model specification and comparison for testing hypotheses concerning continuous ratings

In a behavioral study following a within-subjects design, subjects of various levels of musicality (years of education) gave continuous liking ratings of three audio stimuli, each under three ...
z8080's user avatar
  • 2,352
7 votes
1 answer
5k views

Big difference between a t-test and a F-test in a mixed model (anova vs summary in lmerTest)

While helping someone else with their analyses, I've run into a question regarding the difference between t-tests and F-tests for linear mixed models in lme4 for R, as provided by lmerTest. I'm aware ...
Ishisht's user avatar
  • 237
7 votes
1 answer
127 views

Explaining a Mixed Effect Model to a Non Statistician/Mathematician

I'm not a statistician, but I do have a basic understanding of biostatistics in the context of medicine and clinical trials. However, recently I came across a trial that is using a statistical method ...
Mandem's user avatar
  • 145
6 votes
2 answers
2k views

How to fix the threshold for statistical validity of p-values produced by ANOVAs?

I have run experiments on a group of users under two conditions, measuring the time it took users to finish their experiments. I used a cross-over design where half of the users started in the first ...
levesque's user avatar
  • 864
6 votes
1 answer
372 views

How to test for statistical significance with multiple visits and technical replicates?

I have a data set with 100 columns that's divided between 40 normal columns and 60 MI columns. Samples from each patient were taken at two separate visits, and each sample has two technical ...
Alonso23's user avatar
6 votes
1 answer
8k views

Interpreting Two-way repeated measures ANOVA results: Post-hoc tests allowed without significant interaction?

I have conducted a study where I employed a two-way repeated measures design to investigate whether subjects respond to a main treatment effect. What I'm mainly interested in is whether subjects ...
user21985's user avatar
5 votes
2 answers
796 views

Different results between ANOVA and Linear Mixed Effects

A set of subjects from two groups are requested to perform a test after a sleep session of type A and then after a sleep session of type ...
lafinur's user avatar
  • 235
5 votes
2 answers
5k views

I want to use pvals.fnc() to get p-values for a lmer() model but cannot get rid of correlations between random factors

My problem can be summarized very simply: I'm using a linear mixed-effects model and I am trying to get p-values using pvals.fnc(). The problem is that this ...
Sol's user avatar
  • 285
5 votes
1 answer
2k views

Power Analysis for glmer using simr

I'm trying to run a power analysis based on pilot study. I'm using a glmer mixed effects model with a binomial logit link. The model's equation is: ...
J Doe's user avatar
  • 382
5 votes
1 answer
555 views

Paired and repeated measures! Now what? ANOVA or mixed model?

I have a simple setup. I have 10 patients and I would like to test the effect of a certain drug on kidney function. Each patient will serve as his own control and intervention. First for the control ...
teeniv's user avatar
  • 85
5 votes
1 answer
53 views

Is repeated measures appropriate for testing for a difference in repeated paired group measurements?

I'm new to repeated measures and am trying to understand how it maps to lmer. I have measurements from two time periods: $t_1, t_2$. At each measurement period, the same 50 different foods are scored ...
Estimate the estimators's user avatar
5 votes
1 answer
202 views

Scientific source for why reporting p-values of random effects is not meaningful?

I have read a lot about why most statistical packages do not report the significance test results of random effects (e.g. here) Is there any publication about this precise topic that I could use to ...
Maria's user avatar
  • 415
5 votes
1 answer
189 views

Statistical Significance Issue in Mixed Model

A multilevel model, with one explanatory variable at the individual level (X) and one explanatory variable at the group level (Z): $$Y_{ij}=\gamma_{00}+\gamma_{10}X_{ij}+\gamma_{01}Z_{j}+\gamma_{11}...
user81411's user avatar
  • 771
4 votes
2 answers
5k views

Contrast for hypothesis test in R (lmer)

I'm running a lmer mixed effects model with a four-level factor (levels "0","10","100","1000") as the fixed effect. lmer(free ~ reward.f + (1|S), longdata) I ...
Marianne's user avatar
4 votes
1 answer
66 views

What should I call this design?

Tha someone help with this question? A study has 3 fixed effects A, B, and C and one random factor ID. Factor C (two levels) is determined by each ID's inherent characteristic (so basically two groups)...
ksing's user avatar
  • 119
4 votes
1 answer
262 views

What kind of model is best suited for this type of data and research question?

I have data for hundreds of individuals over several (often tens) of years. My dependent variable is a binary event that may or may not have happened for each individual in some given year. The event ...
EulersNumber's user avatar
4 votes
2 answers
6k views

Linear mixed model in R; modelling fixed effects with multiple levels and interactions. Help!

I am new to R and to mixed linear modelling. I have a dataset with variables from a cross-sectional study looking at fractional anisotrophy (a property of the brains white matter) in 6 different white ...
Sigurd Uldall's user avatar
4 votes
1 answer
7k views

Differences between summary and anova function for multilevel (lmer) model

I've been working on some multilevel models using the lmer function in R and have been playing with some different ways of testing the significance of the fixed effects of my model. I have found that ...
Jake's user avatar
  • 41
4 votes
1 answer
2k views

Mixed effects model hypothesis testing

I ran a 2 x 2 x 2 full factorial repeated measures experiment where 20 participants were exposed 30 times to all combinations of the factors A, B and C in random order. This is a standard procedure in ...
Rooirokbokkie's user avatar
4 votes
1 answer
506 views

AB testing with underlying segments in population

I run ab tests with the variants applied to multiple segments, say, countries. In each country, my baseline target is very different from each other. I wonder if I should ideally model these countries ...
jcp's user avatar
  • 521
4 votes
1 answer
1k views

Random Effect Model

One factor random effect model: $$y_{ij}=\mu+\tau_{i}+\epsilon_{ij}\quad i=1,2,\ldots,a; j=1,2,\ldots,n$$ where, $y_{ij}$ is the $j$th observation of $i$th treatment effect $\mu$ is the overall ...
user 31466's user avatar
  • 1,427
4 votes
1 answer
772 views

3x2 within subjects design with covariate that is nested within factor (?)

I want to test the differences in my interval-scaled dependent variable - measured at three time intervals (within subj.), for two conditions (within subj.), while accounting for a interval-scaled ...
bs92's user avatar
  • 41
4 votes
0 answers
336 views

Testing Fixed and Random Effect of Mixed Model

This pdf illustrates nicely how is to test the random effect of multilevel model . But I am simulating data from a two-level model and estimating the parameters of the model for various combination of ...
user81411's user avatar
  • 771
4 votes
0 answers
313 views

Compare sample means of normal distribution with autocorrelation issues

Please forgive me if this is a naive question, but I haven't been able to find an answer in my stats books or online. I'm working on a fish tracking dataset that consists of detections of tagged fish ...
Maryanne's user avatar
3 votes
2 answers
324 views

What statistical test should I use with count data? [duplicate]

In my experiment, participants are shown 4 images (A, B, C, D) that they have to rate on a 5 point scale. So my data looks like this: particpant1: A 5, B 3, C 3, D 1 p2: A 4, B 3, C 2, D 4 p3: A 4, B ...
Sylja Parra's user avatar
3 votes
1 answer
204 views

What statistics can be used to analyze and understand measured outcomes of choices in binary trees?

I am conducting biological research on animal behavior. There is an arena set up like a binary tree. End nodes are sources of food (e.g. smells) or stimuli that can mix. The animal (or a group of ...
S Pr's user avatar
  • 31
3 votes
2 answers
99 views

Testing changes in echocardiogram wave before and after treatment

I saw a couple of questions, very similar but unfortunately without any answer e.g.here and here. I aim to make it clear here with a dummy data hopefully, to receive some guidance I would like to ...
Areza's user avatar
  • 1,158
3 votes
1 answer
67 views

Choose to resolve and report only some hypotheses

I have carried out a 2 x 2 x 4 x 4 experiment with 12 subjects to perform a linear mixed model. Would it be correct to perform the complete analysis but report only the results of the 2 x 2 ...
mdscience's user avatar
3 votes
1 answer
217 views

Mixed effect logistic regression model

I am very new to the world of statistics and I need some help. I am currently doing an experiment and I have to analyze the data, but I honestly do not know anything about statistics (I have tried to ...
Katherine's user avatar
  • 175