Skip to main content

Questions tagged [singular-matrix]

A matrix is singular when its determinant is 0; for such matrices, the inverse is not defined. Also, related topics like singular fits

Filter by
Sorted by
Tagged with
1 vote
1 answer
46 views

How do I resolve singularity issues related to my random effect term in LMM

I am trying to run a linear mixed model (LMM) to observe how CH4 and CO2 fluxes change over time. I have a randomized block design with repeated measures over time. I also have an unequal sample size, ...
user avatar
3 votes
2 answers
48 views

Does Factor Analysis completely mitigate the singular covariance matrix problem?

Background I have been trying to understand Stanford CS 229’s lecture about Factor Analysis and the accompanying lecture notes. The lecturer introduced Factor Analysis as a way to mitigate the ...
fumoboy007's user avatar
0 votes
0 answers
55 views

lmer (lme4) nested random structure gives singular fit

I'm running the following model on some reaction time data: ...
Brechje van Osch's user avatar
2 votes
1 answer
68 views

Regression with single-observation dummies: F-test under heteroskedasticity

I have a linear regression model with an intercept and a few dummy variables. Each of the dummies indicate a single observation, so the fit is perfect for these observations. Having fit the model, the ...
Richard Hardy's user avatar
3 votes
1 answer
78 views

Solutions to a 'singular fit' in generalized linear mixed-effects models

What are common causes of a 'singular fit' in generalized linear mixed-effects models (GLMMs), especially when including random intercepts for grouping variables? When using the ...
Wagathu's user avatar
  • 189
0 votes
0 answers
35 views

A Trivariate Normal Distribution with a Singular Covariance Matrix

I have a very quick but subtle question. Consider a trivariate normal vector: \begin{align*} [V_1,V_2,V_3]'\sim N\left[0, \Sigma\right]\end{align*} Here, if $V_3$ is a convex combination of $V_1$ and $...
MinChul Park's user avatar
3 votes
2 answers
126 views

Mixed Model - Random Variable implies Fixed Variable

I am fitting a linear mixed model for the first time. I have a dataset that looks something like this: Surgeon Handed Illness Speed 1 Left A 8 2 Right B 15 3 Right C 12 4 Left A 10 1 Left B 10 ...
Carol Eisen's user avatar
4 votes
2 answers
367 views

R glmer poisson model and random effect singularity

I am running a Poisson model using glmer to look at the effect of a treatment on fat scores (scale from 1-5, hence the Poisson) of an animal. There are multiple timepoints in which fat scores were ...
bluebird8's user avatar
0 votes
0 answers
32 views

Is there an alternate estimator for a sample covariance matrix when n < p such that the estimator is not singular

Let's say I have $n$ samples which are vectors of length $p$. I know that the $p \times p$ sample covariance matrix is singular if $n \leq p$. Is there another estimator for the covariance that ...
David Wang's user avatar
4 votes
1 answer
322 views

Warnings for confint() in lme4

I am fitting the following model (random intercepts and slopes) on my data: lmer(MuscleActivity ~ Period+ (1 + Period|ppnr), data = df) My goal is to test whether ...
Leon164's user avatar
  • 41
3 votes
2 answers
930 views

Choosing Random Effects to Include in a Linear Mixed Model

I'm trying to run a linear mixed model (in R) but my model either never seems to finish running or (with a simpler random effects structure) there is a warning about singular effects. My full model is ...
SilvaC's user avatar
  • 512
1 vote
0 answers
70 views

Singularity in Poisson GLMM - when is it better to switch to GLM?

I am analysing count data (count of observations per day of certain mammal species) at 12 different sites. My dataset consists of ~120 days of observations at each of the different sites. For each ...
hannahdv35's user avatar
0 votes
0 answers
34 views

Sigularity of the Covariance Matrix and Absolute Continuity of the Distribution [duplicate]

Suppose that X is a multivariate normal vector with the covariance matrix $\Omega$. As we know, if $\Omega$ is singular, the density of X is not defined in the usual way (because the denominator is ...
M.C. Park's user avatar
  • 935
3 votes
0 answers
247 views

GLMM and BLUPs: high correlation between random effects in a logistic GLMM

Background: In an experiment, subjects had to choose whether they wanted an immediate reward or to wait for a larger reward (dichotomous dependent variable: yes/no). This choice was made multiple ...
バシル's user avatar
  • 123
9 votes
3 answers
1k views

Is the sum of two singular covariance matrices also singular?

I have two sample covariance matrices, computed from $n$ samples, less than $p$ variables: they are singular then. I know that the sum of two covariance matrices is also a covariance matrix. My ...
Larel5000's user avatar
0 votes
0 answers
55 views

random factor variance in lmer is 0 [duplicate]

I have done an lmer with a random factor and two fixed factors in R, all orthogonal. Levels of factors: fixed.factor.1 = 3 fixed.factor.2 = 2 random.factor = 2 Replicates per group = 3 ...
Marta Román's user avatar
0 votes
1 answer
41 views

Practical significance of number of singular values in SVD

I am working on a binary classification problem. SVD is used for dimensionality reduction and the vector with reduced dimension is used as the feature vector. DNN is used as the classifier. There are ...
user7080's user avatar
1 vote
1 answer
752 views

Why are MLE for high dimensional multivariate gausian covariance matrix likely to be ill-conditioned

In a book I'm reading (Probabilistic Machine Learning: An Introduction) the author suggested that in high dimensions, the MLE estimate for the covariance matrix for multivariate gaussian is often ...
user346500's user avatar
3 votes
1 answer
857 views

What is causing the singularity in a glmm with simple random effect?

First time poster but have been very grateful over the past couple months for this forum. First and foremost, I apologize in advance if I am not following the right procedures in asking a question. I ...
user326575's user avatar
1 vote
0 answers
22 views

Breusch Godfrey test, problem with matrix singularity

I am currently conducting Breusch-Godfrey tests to see if the residuals of a regression are uncorrelated. For this purpose I am backing out the residuals of the regression: $$ X_t=B_0+B_1X_{t-1}+u_t $$...
J3lackkyy's user avatar
  • 735
0 votes
0 answers
23 views

Singularity of a modelmatrix that consists of one predictor raised to multiple powers

I was playing around a little bit with linear regression models in R and wanted to try out whether I can get a perfect fit for a linear model where I have a response $$Y = \left( \begin{array}{c} y_1\...
jonaden's user avatar
  • 87
0 votes
0 answers
67 views

How can I interpret singular value decomposition analysis?

I am trying to understand singular value decomposition analysis. I compared two gridded atmospheric data. The Mode 1 has 79.5% squared covariance fraction. Modes 2 and 3 have 3% and 2%, respectively. ...
user2543's user avatar
  • 135
1 vote
1 answer
589 views

Singular fit for model and want to retain random intercept

I've read many posts about singular fit issues and this: https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#singular-models-random-effect-variances-estimated-as-zero-or-correlations-estimated-as--...
Sjacobson1112's user avatar
1 vote
0 answers
883 views

Numpy and Statmodel issue - LinAlgError - Singular Matrix

I have seen other topics on this, but I couldn't get their solutions working for me. Perhaps someone else will know why. namely: statsmodels: error in kde on a list of repeated values However, my ...
LeFraf's user avatar
  • 111
0 votes
0 answers
81 views

Independent variable is correlated with intercept, creating singularities

I am building a logistic model with about 20 variables. I have used the following code: `fullmod = glm(cancer ~ B_SEX+BLINE_AGE_AT_BASELINE+B_BMI+B_chro+B_fdrc+B_hrt+B_LMET+ B_MET+B_FV+B_EDU+B_INC+...
Fahmida Yeasmin's user avatar
4 votes
0 answers
567 views

Cramer-Rao bound in case of non-invertible Fisher Information matrix

I am learning about the Cramer-Rao lower bound (CRLB) and Fisher Information matrix (FIM), and started trying to apply it to some simple toy models from physics. However, even for a simple example I ...
PianoEntropy's user avatar
1 vote
0 answers
353 views

Linear Mixed Effects - degenerate Hessian with 1 negative eigenvalue

I am using linear mixed effects to look at how the variable Neuro (measured at baseline only) predicts change over time in the variable Score (measured at baseline, visit 2 and for some participants ...
Monika Grigorova's user avatar
2 votes
1 answer
127 views

Largest singular values

Given the positive semi-definite, symmetric matrix $A = bb^T + \sigma^2I$ where b is a column vector is it possible to find the singular values and singular vectors of the matrix analytically? I know ...
user avatar
1 vote
1 answer
157 views

Non-zero covariance between degenerate random variable (RV) and non-degenerate RV?

Can a degenerate random variable (RV) have a non-zero covariance with a non-degenerate RV (or even degenerate, too)? My intuition says "no" because that would imply (would it?) that values ...
Geo's user avatar
  • 47
1 vote
1 answer
3k views

What to do with a singular fit with gls in R ? (mixed effect model and nested factors)

I am new to these kind of statistics and I don't understand the error I get since the same code worked before on an other set of data (with different levels in the factors). Here is my design. I have ...
Karelle Rheault's user avatar
0 votes
0 answers
63 views

Consequences for interpretation of: "Coefficients: (X not defined because of singularities)"

In the following example data, coefficients (country-year dummies) are excluded because of singularities. My question is not necessarily how to solve this (although if there is way to recategorise ...
Tom's user avatar
  • 528
2 votes
1 answer
162 views

Does $E(XX^{\top})$ being full rank imply $E(XX^{\top}\mathbf{1}(Y\in A))$ being full rank?

suppose $X=\begin{bmatrix}X_{1}\\X_{2}\end{bmatrix}$ is a discrete random vector with finite support, and $Y$ is a continuous random variable with finite support $[a,b]$, and $A$ is a subset of $[a,b]$...
ExcitedSnail's user avatar
  • 2,966
3 votes
3 answers
13k views

Logistic Regression Failed in statsmodel but works in sklearn; Breast Cancer dataset

I am learning about both the statsmodel library and sklearn. I am trying to construct a logistic model for both libraries trained on the same dataset. In sklearn, the following works: ...
finite_diffidence's user avatar
1 vote
1 answer
804 views

Why is my A.T*A (A transpose A) matrix singular?

I'm running into an wall on my intuition when using least squares. I'm trying to simulate some data, for fun, and I'm getting a result that says my (A.T * A) matrix is singular. In order to condense ...
GrantG's user avatar
  • 31
1 vote
1 answer
475 views

How to prove the determinant of covariance matrix is zero, when n≤p?

If there are n observations on p dimensions, then the covariance matrix will be: But when n≤p, its determinant will be zero. I know it is because it becomes as a singular matrix, but I do not know ...
abba's user avatar
  • 45
1 vote
0 answers
19 views

Estimating a logistic mixed model with highly dependent random effects [closed]

I want to estimate a logistic mixed model with two crossed random intercepts, (let's call the variables A and B) with the lme4 package. Unfortunately, I get the warning that my model is singular and ...
Sebastian's user avatar
  • 3,104
4 votes
2 answers
2k views

How to solve the error of singular fit in glmm in R

I am trying to fit a GLMM for binary data of whether colonies of bees perform mass flight or not. I have time when the mass flight was performed, temperature, location of the hive and species of the ...
Awanti's user avatar
  • 41
3 votes
3 answers
271 views

OLS: covariance matrix invertibility problem when rows < columns

I have read that in OLS when a number of rows (i.e. observations) is smaller than a number of columns (i.e. variables), the covariance matrix $X^{T}X$ cannot be inverted when parameters are being ...
PsychometStats's user avatar
2 votes
1 answer
784 views

Getting singular fit error on lmer model after standardizing the response variable

I'm running a mixed model with the lmerfunction in R, and am running into an issue with singular fits. My dataset is comprised of 48,538 observations of sleep ...
T.Grover's user avatar
1 vote
0 answers
145 views

Singular the contemporaneous covariance matrix of error terms in VAR

I'm interested in the case if we have i.e. VAR(1) model: $$ \mathbf{y}_t = \Phi \mathbf{y}_{t-1} + \mathbf{\epsilon}_t, \qquad \mathbb{E}[\mathbf{\epsilon}_t\mathbf{\epsilon}_t^T] = \Omega, $$ where ...
Koval  Boris's user avatar
2 votes
1 answer
292 views

Linear dependency among columns and rows

Singular matrix is defined as square matrix with the determinant of zero. The determinant of zero occurs when matrix columns are linearly dependent (i.e. one of the columns can be defined as a linear ...
PsychometStats's user avatar
4 votes
1 answer
6k views

Singular Matrix and Linear Dependency

Singular matrix is defined as a square matrix with determinant of zero. I am aware that linear dependency among columns or rows leads to determinant being equal to zero (e.g. one column is a linear ...
PsychometStats's user avatar
1 vote
1 answer
211 views

Problematic data for regression model

This is a follow-up question to Which model for my data? (testing the differences in slope for three groups). The solution from there works (big thanks to Heteroskedastic Jim!), but I have a problem ...
Kardashev3's user avatar
2 votes
1 answer
131 views

How to prove that this joint distribution is Gaussian without using probability densities?

Question: I am wondering if there was a way to prove this result without using probability densities: If $\bf x \sim \mathcal N (m, P)$ and $\bf y \;|\; x \sim \mathcal N (Hx, R)$, then $$\begin{...
user avatar
4 votes
1 answer
833 views

Are Kalman Filter recursions valid when the state noise has a singular covariance matrix?

Consider a Linear Gaussian State-Space Model where the states are denoted by $X_t$ and observations are denoted by $Y_t$: \begin{align} X_t &= A X_{t-1} + \epsilon_t, &&\epsilon_t \sim \...
user avatar
4 votes
1 answer
229 views

Linear Mixed Model equation (as of lme4 package)

I am trying to derive the equations of a linear mixed model as specified in the documentation of the lme4 package: "Fitting Linear Mixed-Effects Models using lme4" jstatsoft.org/article/view/v067i01 ...
Seiji's user avatar
  • 65
1 vote
0 answers
115 views

lme4 mixed model unbalanced error factors + singular fit

I am studying the effects of 5 treatments (CT,CCM,CCI,F, S) on grape yield. My experimental design consists in: 5 treatments and 2 farms (SG, MT) which I use as block. I created an additional ...
William WIne's user avatar
1 vote
1 answer
2k views

Singular fit error caused by random factor

I'm trying to fit a generalised mixed model for some embryo data and I am getting the error for singular fit. my model is ...
Caity's user avatar
  • 11
2 votes
1 answer
5k views

lme4 lmer() multilevel model: why do I have singular fit and a -1 correlation between random effects slope and intercept?

I'm running a varying intercepts varying slopes multilevel model with the lme4::lmer() function with no group level predictors and only one predictor: FilingFee to predict evictionfilingrate. I ...
chase171's user avatar
9 votes
0 answers
11k views

Singular fit with simplest random structure in lmer (lme4), is a Bayesian approach the only option?

I'm running a mixed model with the lmer function from the lme4 package in R and ran into some issues with singular fits. I get the warning message 'singular fit', ...
Urs's user avatar
  • 91