We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [mixed-model]

Mixed (aka multilevel or hierarchical) models are linear models that include both fixed effects and random effects. They are used to model longitudinal or nested data.

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

Calculating sums of squares for mixed-model ANOVA

I'm trying to get an understanding of how to calculate the sums of squares values in a mixed-model ANOVA (mathematically, not just the syntax for R or SPSS!). I've been trying to figure this out for a ...
0
votes
0answers
18 views

Likelihood Ratio Test & Bootstrapping for testing significance fixed effect Linear Mixed Model

Data: I have a continuous nested outcome (measurement) and two categorical predictors (X1 is a grouping variable; X2 is a time variable "Day" with 5 categories) and their interaction. The nesting is ...
0
votes
0answers
9 views

If I z-score all continuous variables of a linear mixed effects model, can I report the beta weights of the fixed effects as r values?

I have model that looks something like this ...
2
votes
1answer
42 views

Estimate random effects for a new individual with a linear mixed effects model

Consider repeated observations $\mathcal{Y} = (y_{i,j})_{i,j}$ obtained for $p$ individuals ($1 \leq i \leq p$), at different time points $t_{i,j}$ $(1 \leq j \leq n_i$). The "random slope and ...
0
votes
1answer
80 views

inconsistent results in two-way repeated measure analysis using mixed models

I have two factors: interval with two levels, and spd_des with three levels. Each of the subjects (grouping variable ...
2
votes
0answers
15 views

How to compare model coefficients from models with different distribution family and link functions

I am trying to understand if I can compare two models with different family distributions / link functions directly, or if this does not make sense mathematically. In my example, I am measuring some ...
3
votes
1answer
79 views
+100

Should I use multilevel modeling? One between-subjects continous predictor, one within-subjects categorical predictor

I have recently collected my dissertation data. I would like to know if I should use multilevel modeling to answer my research questions. Here is a brief summary of my method: Participants (n = 392 ...
-1
votes
0answers
11 views

couldn't get the names of levels of random effects in R [on hold]

I'm trying to print the "between-event residuals" (which is the conditional modes of a random effect) from a mixed effects model to a .csv file. The thing that I couldn't get is, length of ranef ...
0
votes
1answer
28 views

Linear mixed effect model : formula and difference between random effect and within subject effect [closed]

I want to explain the variablity of my continuous dependent variable a with two independent variables: one between subjects variable ...
0
votes
1answer
17 views

How to do statistical analysis that include 2 levels of repeatedness in R? [on hold]

I know this question is a bit general, I don't have and reproducible code to share, since it's a general question, I'm trying to understand where to start the investigation about it: I would like to ...
1
vote
1answer
27 views

Interpreting the intercept of a Linear Mixed Model Results in Python - Statsmodel Package

Using python package statsmodel and the code in this link: If a linear mixed model has a random variable with x groups. then why when one would run this code: ...
0
votes
2answers
44 views

Mathematical notation (or formula) of mixed effect models

I am unsure how the correct mathematical notation of two mixed model I've estimated in R should look like. The data consists of test scores of students that were in different classes. Some of the ...
1
vote
1answer
20 views

Conditional response of a linear mixed effects model

Consider the linear mixed effects model: \begin{equation} X_i(t_{ij}) = \eta + Z_i(t_{ij})w_i + \epsilon_{ij}, \end{equation} where $\eta$ is the mean, $Z_i(t_{ij}) = [1, \log(t_{ij})]$, $w_i = (w_{...
0
votes
1answer
20 views

How to perform inference on stratified sampling data

Let's say I'm studying a population of generic emergency calls to over the course of several months, and keeping track of the following independent variables: month (when the call happened) country (...
1
vote
0answers
39 views

What is the appropriate tool for analyzing the effectiveness of an intervention by predicting an outcome

I have the following data: A random group of patients with a certain disease who receive a drug at a certain time. Dose of the drug given to the patient Four parameters that are measured before and ...
3
votes
0answers
47 views

Regression estimate outside bounds of bootstrapped 95% confidence interval

I am fitting a linear mixed effects model in R using the package lme4. The regression model is defined as such: ...
0
votes
0answers
11 views

Estimating size of effects with either ANOVA or mixed model

I have a 2^4 full factorial study with 5 replicates and with several continuous dependent variables, but only 2 of the four independent variables are continuous. The other two include one variable ...
2
votes
1answer
32 views

Why does the glmmTMB gives different fixed effects when random slopes are requested vs just intercepts?

I am trying to fit a beta regression to my data using mixed models, as there are 4 repeated observations per subject. Legend: p = (time) point: t1...t4 ID = subject ID When I try: ...
1
vote
0answers
11 views

Linear mixed model questions, with some group sizes=1 and with two time points?

I have a bit of an oddly-designed dataset, but it is a very unique population, so we are working with it. Essentially, I have: Group 1: one person; 5 time points over 1.5 year (time1->2 = ...
0
votes
0answers
7 views

Suggestions for modelling [closed]

I am looking for suggestions on a very difficult question I think, I have. Background: We have 5 types of drugs that are given in varying combinations over 6 hours. I have hourly data. All of the ...
0
votes
1answer
25 views

Explain the estimated residual variance in a Gamma mixed model, using glmer()

I am applying a generalized mix model, where the response has a gamma distribution, as below: ...
2
votes
1answer
30 views

Diagnostics in DHARMa for glmmTMB model

I am fitting models to a data set with 370 observations. It is ecological data with overdispersed counts as a response variable. I have used the DHARMa package to show this overdispersion from a ...
5
votes
3answers
85 views

How to integrate the marginal likelihood numerically?

Consider a log-likelihood function $\ell(\theta,b)$, where $b\sim F$. I want to calculate the marginal log-likelihood $$\ell(\theta) = \int\exp\left(\ell(\theta,b) \right) dF(b).$$ However, $\exp(\...
1
vote
1answer
114 views

On the properties of covariance and kernel matrices

I'm stumbling upon an example of a mixed model or a Gaussian Process, say: $Z \in\mathbb{R}^{n \times m}, m \ge n$ ie random effect $X \in\mathbb{R}^{n \times p}, p \ge 1$ ie fixed effects $K \in\...
1
vote
0answers
13 views

How to find synergistic effect of 2 exposures in mixed model?

I am now doing a impact of 2 air pollutants on mental health score decline over 1 year, (2 follow-up, and I am wondering of there are any addictive effect/synergistic effect of two pollutants. As I ...
1
vote
1answer
44 views

Difference between lm, PROC GLIMMIX and glmer

I wanted to analyze my data below to see the effect of treatments (CC,CCS, CS and ...
0
votes
0answers
32 views

Intuition about Bias in LDV / DLM with Fixed or Random Effects

Problem I am failing to obtain an intuition for why estimates from a time series model that includes a lagged dependent variable as a predictor and random (or fixed) effects for individual units are ...
0
votes
0answers
21 views

Four level mixed model (multi-level linear model) - formal model specification with mathematical annotations

I am running a mixed-model in nlme (R) with momentary assessments (5 times, L1) nested in days (4 days, L2) nested in trimester (3 Trimester, L3) nested in participants (152, L4) from a longitudinal ...
1
vote
1answer
26 views

Cross levels or interaction term for repeated measures multilevel model?

I'm new to both regression and multilevel modelling, and I'm having trouble with the analysis for my experiment design. For my study, we are having subjects come in and solve 2 problems. Each problem ...
0
votes
0answers
12 views

Partial $R^2$ for fixed terms in GLMM

I am trying to find a statistically sound and also correct way to calculate the effect size of fixed terms in generalized linear mixed models, some with Poisson, others with Gamma and others with a ...
1
vote
1answer
24 views

Can I perform a linear mixed model with multiple dependent outcomes in one model?

I would like to perform a linear mixed model with multiple dependent variables as these are correlated (same outcome measured at multiple frequencies). As fixed factor I have gender and as random ...
1
vote
0answers
12 views

Gamma GLMM Dispersion, Random Effects, and CoV (lme4)

So I know that in glm(), with the Gamma family, one can get the dispersion parameter through the MASS package with gamma.dispersion() or can even look at the summary output as a quick estimate. How ...
1
vote
1answer
22 views

Linear mixed model in clinical trials - only one is feasible?

Repeated measurements of some continuous variable of interested is very common in clinical trials. Usually patients are randomized between treatment arms. Hence it is reasonable to assume that all ...
0
votes
0answers
36 views

cross nested model R

I need help to understand how to enter a nested factor in a model. Basically, I tested 38 Italians and 35 Persian asking them to decide whether a sentence was congruent or not with an action they ...
0
votes
0answers
24 views

How to fix 'Error() model is singular' when running a mixed ANOVA in R

This is my data set I am trying to run a mixed ANOVA on in R. Subject Substrate Biomass Pb ...
1
vote
1answer
48 views

Model converges in glmmTMB but not lme4, why?

I am running what I suppose is the same mixed-effect model with a negative binomial distribution (log link) in both lme4 and the glmmTMB package in R. Code shown below: ...
4
votes
2answers
137 views

Predicting a new observation: marginal mean, estimated marginal mean, or fixed effects estimator?

I'm interesting in making predictions using a random-effects model on new data that occur in new groups. Which estimator is most appropriate? I fit a Poisson random effects model on some fake data: $...
0
votes
0answers
9 views

Should I use contrast coding( or any specific coding) for factor predictor (condition) with 2 levels : “treatment” & “Control” in brms & lme4?

This is for hypothesis testing where my hypothesis states that the dependent variable has a higher value in the treatment condition. I'm doing it both in brms & lme4 to do a comparative study ...
1
vote
0answers
23 views

problem calculating the intercept manually in a linear mixed effect model

When I run a linear mixed effect model on this dataset, the intercept coefficient does not equal the mean of the marks where the other variables are 0. ...
0
votes
1answer
33 views

Does random effects account for covariates not included in my regression model?

I am using a (Bayesian-based) mixed-effects regression model that incorporates both fixed effects and random effects.I have 3 fixed effects/covariates: 1) employment rate 2) crime rate 3) home ...
1
vote
0answers
7 views

Difference between Mixed Logit model and hierarchical bayesian logit?

I'm studying the discrete choice analysis; The utility of person $i$ for alternative $k$ is: $$U_{ik} = \beta_kx_{ik} + \epsilon_{ik}$$ where $\beta_k$ is the parameter of interest and with $\...
0
votes
0answers
17 views

How to obtain p-values when using glmer - mixed model logistic regression GLMER? [duplicate]

I have performed a mixed model logistic regression using glmer and used afex::mixed to obtain the correct pvalues. ...
3
votes
1answer
45 views

Nested Data - Mixed Linear Effects in R Assumptions

I want to make sure I'm properly accounting for the mixed effects in my model. I am measuring characteristics of patient's eye's with disease and without disease, and determining whether a certain ...
1
vote
0answers
18 views

Fit one model or several models to maximize power for significance testing of slopes in a factorial design?

Problem I need to perform a power analysis for a set of statistical tests. Each test is about a regression slope computed in a cell of a factorial experiment design. To minimize the required sample ...
5
votes
1answer
31 views

What proportion of missing data can be considered acceptable for inference with a mixed-effects model

I am wondering what proportion of missing data can be considered acceptable for use of a mixed effects model? I am analysing a clinical trial testing the efficacy of an agonist drug in reducing the ...
0
votes
0answers
37 views

Generalized linear (logit) mixed-effects model with the random (crossed) effects drawn from a bivariate normal distribution

I am trying to implement a generalized mixed-effects model specified as: Dependent variable $y = \log(\frac{p}{1 - p})$ where $p$ is a quantity measured for a pair of individuals ($i$ and $j$). $E(...
3
votes
2answers
150 views

R: linear algebra representation of the prediction operator for a mixed effects model

(See edit at the bottom for the bounty) I am trying to learn how to simulate LMM data with matrix linear algebra. So far I've managed to simulate a simple model with a random intercept: ...
2
votes
0answers
24 views

How to do principal component regression for repeated measures?

I have between-subject repeated measures data. I want to select the parameters for my regression model. PCR /PCA is one option to reduce dimensionality. How can I do this in the case of a repeated ...
3
votes
0answers
29 views

Uncorrelated random slopes in lme4? [closed]

I am trying to fit a linear mixed effects model with a response variable (y) and two categorical predictors (x1 and x2). Part of the reproducible example for this is below, ...
0
votes
0answers
14 views

How low should an ICC be to justify disaggregating (i.e. ignore clustering) a multilevel/mixed model?

It is conventional wisdom that ICCs can be used to estimate how much clustering/non-independence is occurring in data consisting of two or more levels. ICCs can inform whether a multilevel/mixed model ...