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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
3 votes
1 answer
696 views

Understanding Mixed Effect Models visually with some questions on P-value calculations

I've been tackling the concept of Mixed Effects Models on and off for the last 9 months. Every time I would give up and come back later to try and understand it again with my basic statistics ...
Mandem's user avatar
  • 145
3 votes
1 answer
132 views

Is it possible to test for strongest predictor, if all variables are identical within a random effect grouping?

I'm trying to understand the regression analysis done in a published study. They use GAM models to predict plant growth, and to test for the most important predictors. They have measured growth of ...
rw2's user avatar
  • 1,118
2 votes
0 answers
71 views

Hypothesis testing : Constant mean over time for two conditions within an experiment

What is an approach to testing/showing that within a particular period of time, there is no change in values. So, I have my response variable measured over 30 seconds, in two conditions. I want to ...
amarykya_ishtmella's user avatar
2 votes
1 answer
224 views

How to simulate type I error for random-effects model?

Building upon this post How to simulate type I error and type II error. I would like to simulate type I error for a random-effects model I generated. The statistic of interest is standard deviations ...
cliu's user avatar
  • 211
2 votes
1 answer
92 views

Which test would take advantage of comparing large sample groups with replicates?

So, the data is comparable to height of individuals within Africa and Europe, but each group (Europe, Africa) have multiple replicates (3 x month sampled). Each replicate is ~100,000 individuals. A ...
thh32's user avatar
  • 21
2 votes
1 answer
1k views

Mixed effect modelling with multiple, nested random variable

Goal: comparing pitch (Hz) on three types of words Dependent variable: Hz Fixed predictor variable: word-type, points (measurements taken from five points on each token, to capture Hz change within ...
Yang's user avatar
  • 33
2 votes
1 answer
220 views

single time series per participant and using random effects in mixed effect modelling

My mixed effect model design involves assessing 42 different time series via a polynomial function. that is, fixed effects of time and time^2. I've incorporated a random slope of the individual time ...
Alesi Rowland's user avatar
2 votes
0 answers
135 views

Identifying when fixed effects have changed in a GLMM

I have a dataset spanning several years, that I have analysed year by year (using the same glmm model code) to determine whether the random effect (random intercept) has altered over time. I have ...
Joe King's user avatar
  • 3,952
2 votes
0 answers
2k views

Satterthwaite degrees of freedom in lmerTest for a 3x2x2 mixed model vs. mixed ANOVA dfs

I have traditionally been running my analyses using aov and would like to switch to lmer. My questions is whether or not this is ...
mat's user avatar
  • 613
2 votes
3 answers
524 views

How can I test whether two logistic regression coefficients are identical in mixed models?

Similar to question here. 3 variables (1 continuous (X) and 2 categorical (A & B)) predict 1 dichotomous variable in generalized linear mixed models. Both variables A and B are dichotomous and ...
User33268's user avatar
  • 1,782
2 votes
1 answer
911 views

How can I test whether two logistic regression coefficients are identical?

3 variables (1 continuous (X) and 2 categorical (A & B)) predict 1 dichotomous variable in logistic regression. Both variables A and B are dichotomous and are coded with 1 (reference category) ...
User33268's user avatar
  • 1,782
1 vote
0 answers
90 views

What statistical test is appropriate to answer hypotheses on seasonal and spatial differences?

First of all, I am very new to statistics, so this might be a very basic question but I could not find any answers to my question in other topics here. I have a data set on microbial growth (...
neko's user avatar
  • 11
1 vote
0 answers
289 views

Which of the (two) conflicting p-values should I use when estimating lmer using R

I've recently started using LMM which possibly gives me better insight into my DV. Only I got some contradictory data regarding whether some variable is significant or not. The Us and Hed variables ...
Mischa's user avatar
  • 31