All Questions
128 questions
117
votes
4
answers
232k
views
What is rank deficiency, and how to deal with it?
Fitting a logistic regression using lme4 ends with
Error in mer_finalize(ans) : Downdated X'X is not positive definite.
A likely cause of this error is ...
36
votes
2
answers
43k
views
How to use ordinal logistic regression with random effects?
In my study I will be measuring workload with several metrics. With heart-rate variability (HRV), electrodermal activity (EDA) and with a subjective scale (IWS). After normalization the IWS has three ...
24
votes
2
answers
26k
views
How to apply binomial GLMM (glmer) to percentages rather than yes-no counts?
I have a repeated-measures experiment where the dependent variable is a percentage, and I have multiple factors as independent variables. I'd like to use glmer from ...
21
votes
1
answer
19k
views
How to fit a mixed model with response variable between 0 and 1?
I am trying to use lme4::glmer() to fit a binomial generalized mixed model (GLMM) with dependent variable that is not binary, but a continuous variable between zero ...
14
votes
1
answer
16k
views
Calculating ICC for random-effects logistic regression
I'm running a logistic regression model in the form:
lmer(response~1+(1|site), family=binomial, REML = FALSE)
Normally I would calculate the ICC from the ...
11
votes
2
answers
7k
views
How to deal with quasi-complete separation in a logistic GLMM?
Update: Since I now know that my problem is called quasi-complete separation I updated the question to reflect this (thanks to Aaron).
I have a dataset from an experiment in which 29 human ...
9
votes
1
answer
879
views
8
votes
1
answer
790
views
Suspiciously high shrinkage in random effects logistic regression
Consider the following simple example:
...
7
votes
2
answers
3k
views
Modelling a binary outcome when census interval varies
For a current piece of work I’m trying to model the probability of tree death for beech trees in a woodland in the UK. I have records of whether trees were alive or dead for 3 different census periods ...
7
votes
1
answer
6k
views
Specifying model in glmer() - interaction terms
I am running a generalised mixed effects model, of family logistic regression, using function glmer().
I am predicting likelihood of response (0/1) and my fixed effects to explore in my final model ...
7
votes
1
answer
1k
views
GLMM and two slopes
My outcome variable is binomial, and I have 11 independent variables and a time variable. The time variable has different slopes, so I fixed it to time-before and <...
7
votes
1
answer
1k
views
Bootstrap for random effects logistic regression to get CI for difference in proportions
Let's say I have two observations of a binary variable per patient on two different treatments for a sensible number of patients, some variable like age, and I'm fitting a model like this in R:
...
6
votes
2
answers
17k
views
Obtaining adjusted (predicted) proportions with lme4 - using the glmer-function
I aim to estimate the annual proportion of patients (% of patients) that are smokers in a population whose age and sex must be taken into account. In other words, I want to calculate the adjusted ...
6
votes
2
answers
5k
views
How to set up an intercept-only mixed logistic regression in order to test for difference from 50% chance level?
In my experiment, subjects repeatedly had to make a binary choice between A and B, and I want to test if subjects (as a group) differed from 50% chance in preferring A over B. Is there a way to test ...
6
votes
1
answer
9k
views
How to get around the glmer warning : “Downdated VtV is not positive definite”
I hope that I'm not asking a silly question but I looked at similar issues (including opened issues on github #173 and #396) and couldn't find a solution to this problem. Thanks in advance for the ...
5
votes
1
answer
6k
views
Repeated measures with lmer and logistic regression
I have a question about the lmer() function and repeated measures design with R.
In my study, each participant sees 60 trials, ...
5
votes
1
answer
39k
views
lme4_fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
I have a dataset consisting of the following: one column language containing five different languages. Two other columns ...
5
votes
1
answer
2k
views
Casewise diagnostics and testing assumptions for a mixed effect logistic regression in R
I am modelling a binary outcome (Buried), that has two predictors: Offset (a 3 level factor) and width (continuous predictor). In addition, multiple data points came from the same unit -- a chamber, ...
5
votes
0
answers
8k
views
Mixed effect logistic regression in R: choosing random effects
I conducted an experiment which measured a binary response for each subject. The subjects were in 1 of 3 groups. There were two other fixed factors, each of which were continuums (cont1, cont2) ...
4
votes
1
answer
21k
views
How to build a Mixed Effects Logistic regression Model?
I am new to data analysis and now working on a Mixed Effects Logistic Regression Model. Currently, I have the following data frame (model_data):
...
4
votes
1
answer
1k
views
Difference between multilevel logistic regression and a logistic regression with lower levels aggregated
I have a question about the differences between two forms of logistic regression.
Let's say that I have data that is collected with some nesting. For concreteness, we'll say that I've got data across ...
4
votes
1
answer
280
views
Simulating and estimating generalized mixed effects models: how to avoid convergence problems?
Basic generalized mixed effects
I am simulating data from a generalized mixed effects model
$$
P(y_{it}=1\mid x_{it})=h(\delta_0+\alpha_i+\beta_t+\gamma x_{it})
$$
where the dependent variable is ...
4
votes
1
answer
269
views
How to handle mixed-models with low sample size as well as low frequency of categorical level of interest?
Overview
I am working on analyzing data from an observational study, details of which is as follows: 18 subjects with type 1 diabetes (T1D) + 14 healthy controls were recruited for a four-week long ...
4
votes
2
answers
256
views
How to compare whether the odds of success of different levels of a predictor are different from 0
I hope I am able to word my question clearly. Suppose I have a model below:
glmer(Y~X + (1|subject), family="binomial", data=dat)
The intercept is the log odds ...
4
votes
1
answer
3k
views
Testing glmer model assumptions (optionally in R)
I have collected binary data within subjects (multiple trials per subject) and have fit a generalized mixed effect regression to these data. My model has the following structure:
fit <- glmer(Y ~ ...
4
votes
1
answer
198
views
What methods are appropriate for testing correlations between binomial count (but not presence/absence) data?
Is it appropriate to analyze the relationship between a proportional explanatory variable and a proportional response variable (as cbind(option 1, option 2), or as a proportion with weights) using ...
4
votes
1
answer
8k
views
Degrees of Freedom Calculation in Linear Mixed Model
How are degrees of freedom calculated for a linear mixed effects model? I was recently running a linear mixed effects model that contained 1 independent variable with 3 levels (1,2, and 3). The random ...
4
votes
0
answers
207
views
Mixed-effects logistic regression
I'm new to data analysis and I'm trying to perform a mixed-effect logistic regression.
My data look like this:
...
4
votes
0
answers
596
views
Intraclass correlation with binary dependent variable
I want to compute an intraclass correlation in a multilevel regression model with a binary dependent variable (i.e., using logit). When a continuous DV is used, the ICC is the proportion of variance ...
3
votes
1
answer
2k
views
Confidence intervals in probabilities for mixed effects logistic regression
A while back I was helped to get correct confidence intervals for predicted probabilities in a logistic regression model: Correct interpretation of confidence interval for logistic regression?
Now, I ...
3
votes
1
answer
978
views
Estimates radically change when including Random Slopes in Multiple Logistic Regression
I am examining the fixed effects of two within-subject experimental manipulations (i.e., Ambiguity 0 = No / 1 = Yes, and Uncertainty 0 = No / 1 = Yes) on a dichotomized variable (i.e., Punishment,
0 ...
3
votes
1
answer
1k
views
Logit link in GLM and inverse logit
I am calculating a generalized linear mixed model (GLM) with a two-column (n successes/failures) binomial response using the the lme4 package in ...
3
votes
1
answer
147
views
Interpreting intercept with centered predictors in logistic mixed model
I am running a logistic mixed model in lme4. The model is as follows
...
3
votes
1
answer
5k
views
The results of logistic regression with glmer and glm are quite different
I'm trying to analyze the longitudinal data of clinical trial.
The variables are
event: Dichotomous (1, 0) variable indicating whether event occured.
...
3
votes
1
answer
77
views
How to specify random effects in logisitc mixed effects regression with multiple observations per subject but only 1 outcome per ~50 DV measurements?
I have a dataframe that looks something like this:
Each subject got somewhere between 40-120 lesions in a given procedure, and I want to know which dependent variable was associated with "injury&...
3
votes
1
answer
3k
views
Interpreting a binned residual plot for logistic regression
I have the following mixed effect logistic regression:
ball3=glmer(Buried~Offset+Width_mm+(1|Chamber), family=binomial, data=ballData)
And I would like to ...
3
votes
0
answers
438
views
Regression of a ratio of two continuous variables (i.e. regressing continuous proportions)
I have data of the following form:
...
3
votes
0
answers
1k
views
Identifying outliers in logistic regression model
I'm looking to identify outliers in a logistic regression model, e.g.
...
3
votes
0
answers
114
views
Can a random effects intercept variable be highly but coincidentally correlated to a response variable?
Issue- I'm creating a logistic mixed model where the response variable (if a plot falls within an active bird lek area) is highly related to a term I may include as a random effects term (grazing ...
3
votes
0
answers
93
views
Estimation Procedure of Multilevel Logistic Regression
I know the estimation procedure for logistic regression is the iterative weighted least squares method.
In the book An Introduction to Generalized Linear Models written by Dobson & Barnett, in ...
3
votes
0
answers
3k
views
Best way to account for time lags in logistic regression (GLM or GLMM)
I am trying to determine the best, most conservative way to account of time lags in a logistic regression type analysis (a generalized linear model with or without mixed effects).
I am working with ...
3
votes
0
answers
2k
views
Interpreting Coefficients from Logistic Mixed Effects Model [closed]
I am trying to use glmer to create logistic mixed effects models (LMEMs) and then run a model comparison between them. Respondents can click "Yes" (coded as 1) or "No" (0), which is used as the DV. ...
2
votes
1
answer
900
views
How to predict ln(odds) with rcs term in mixed effects logistic model?
I am using "lme4" package to fit mixed-effects nonlinear logistic model to access the association of Y and X. As the response variable of my data is binary and nlmer function requires ...
2
votes
1
answer
2k
views
Problem fitting glmer model with factor and numeric predictors
I'm trying to fit logistic regression with formula like this:
...
2
votes
1
answer
3k
views
What post-hoc test should be used for a glmer model with a binary response, and a continuous and categorical predictor?
I'm a bit of a newbie with stats and R, so need a bit of direction to find a suitable post-hoc test for my glmer model. I'm trying to find if presence is affected by environmental factors for each ...
2
votes
1
answer
3k
views
How to extract predicted probabilities from glmer results for a logistic mixed effects model
I have two groups that I follow over 4 time points (Baseline, Three months, Six months, and Year). The outcome is some binary variable, lets say presence or absence of cancer.
...
2
votes
1
answer
136
views
Feasibility of running mixed-effects poisson/logistic regression with correlation structure such as AR(1), Toeplitz
I'm not aware of any R package that lets me use specify the covariance pattern model such as in the package nlme and run the mixed effects poisson/logistic ...
2
votes
1
answer
2k
views
How to account for temporal autocorrelation in mixed effects logistic regression?
Apologies if this has been asked before-I've looked around but haven't found any questions regarding my exact situation. I am conducting a study aimed at determining the climate sensitivity of a bird ...
2
votes
1
answer
3k
views
Use predicted values with or without random part to plot Residuals with binnedplot of a logistic regression in glmer (lme4 package) in R?
Which binnedplot of the glmer should I use to check the model? The residuals against the predicted values without random part(REform=NA) or residuals against the predicted values with random part(...
2
votes
1
answer
107
views
Factorial regression without significant interaction - can I consider contrasts significant?
First, I'm really sorry if this is a duplicate, I just couldn't find a definite answer.
I'm not used to analyzing categorical variables so I'm having trouble with something that is probably very basic....