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
90
questions
0
votes
0
answers
27
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 $...
3
votes
2
answers
113
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
...
2
votes
2
answers
110
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 ...
0
votes
0
answers
25
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 ...
4
votes
1
answer
142
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 ...
2
votes
2
answers
491
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 ...
1
vote
0
answers
56
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 ...
0
votes
0
answers
33
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 ...
3
votes
0
answers
178
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 ...
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 ...
0
votes
0
answers
53
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
...
0
votes
1
answer
39
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 ...
0
votes
1
answer
673
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 ...
3
votes
1
answer
628
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 ...
1
vote
0
answers
20
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
$$...
0
votes
0
answers
22
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\...
0
votes
0
answers
54
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. ...
1
vote
1
answer
481
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--...
1
vote
0
answers
817
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 ...
0
votes
0
answers
79
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+...
4
votes
0
answers
474
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 ...
1
vote
0
answers
326
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 ...
2
votes
1
answer
122
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 ...
1
vote
1
answer
137
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 ...
1
vote
1
answer
2k
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 ...
0
votes
0
answers
57
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 ...
2
votes
1
answer
139
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]$...
2
votes
3
answers
11k
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:
...
1
vote
1
answer
693
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 ...
1
vote
1
answer
374
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 ...
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 ...
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 ...
3
votes
3
answers
260
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 ...
2
votes
1
answer
637
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 ...
1
vote
0
answers
136
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 ...
2
votes
1
answer
237
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 ...
4
votes
1
answer
5k
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 ...
1
vote
1
answer
200
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 ...
2
votes
1
answer
126
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{...
4
votes
1
answer
766
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 \...
4
votes
1
answer
211
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
...
1
vote
0
answers
113
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 ...
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
...
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 ...
8
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', ...
3
votes
1
answer
5k
views
singular fit in lmer, despite no high correlations of random effects
I ran a mixed effects model a few weeks ago, it all went fine, no errors. Here is the model:
...
3
votes
1
answer
1k
views
Mixed Model Repeated Measures for Before & After Comparison
I'm trying to assess the effectiveness of a program by comparing employee performance before the program vs. after the program. I have 4 years (2 years before vs. 2 years after) of individual-level ...
0
votes
0
answers
688
views
lme4 singular fit non randomized design
I am analyzing a dataset with lme4. I am investigating the effects on vine yield of 5 different "Treat". We are working on-farm and we were not offered the possibility of a randomized design. So we ...
1
vote
0
answers
41
views
Approach to automatically determining the source of data matrix singularity?
When you're using R built-in glm functions (and in other languages I assume), the software has a built-in ability to automatically eliminate redundant or inestimable parameters. For example, when ...
3
votes
0
answers
143
views
Mixed effect model covariance prior
How should I choose the covariance prior for my bglmer model?
This is a model which has the singularity problem.
...