Questions tagged [singular]

A matrix is singular when its determinant is 0; for such matrices, the inverse is not defined.

84 questions
89
votes
1 answer

What correlation makes a matrix singular and what are implications of singularity or near-singularity?

I am doing some calculations on different matrices (mainly in logistic regression) and I commonly get the error "Matrix is singular", where I have to go back and remove the correlated variables. My question here is what would you consider a "highly"…
Error404
  • 1,261
  • 2
  • 13
  • 18
37
votes
2 answers

Dealing with singular fit in mixed models

Let's say we have a model mod <- Y ~ X*Condition + (X*Condition|subject) # Y = logit variable # X = continuous variable # Condition = values A and B, dummy coded; the design is repeated # so all participants go through both…
User33268
  • 1,408
  • 2
  • 10
  • 21
8
votes
1 answer

Understanding degenerate multivariate normal distribution

MVN is degenerate when the covariance matrix $\Sigma$ is singular. I am trying to understand mainly conceptual (but also theoretical) implications of this. The Wikipedia article is quite terse. It mentions the following non-trivial (atleast to me)…
8
votes
1 answer

Bayesian regression with singular $(X'X)$ - Is the posterior well-defined?

SE community, I hope to get some insights into the following problem. Given a simple linear regression model $$Y=X\beta+\epsilon\text{ , where } Y\in\mathbb{R}^T,X\in\mathbb{R}^{T \times N}.$$ Under a Gaussian likelihood function with homoscedastic…
muffin1974
  • 1,152
  • 11
  • 24
8
votes
2 answers

What is the relation between singular correlation matrix and PCA?

Can anyone kindly give me some information about the statement (last sentence) at the end of below definition. What does it mean by "It can be used when a correlation matrix is singular"? This quote is from SPSS help menu on factor…
kzmlbyrk
  • 183
  • 1
  • 4
7
votes
0 answers

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', which is specified as 'convergence code 0; 1 optimizer warnings; 0 lme4 warnings' in …
Urs
  • 71
  • 1
  • 4
7
votes
1 answer

Uniqueness for OLS linear regression

I'm implementing OLS linear regression without using the built-in functions in Matlab with normal equation: I know this is probably very basic, but I want to double check, the input X yields a unique solution, right? I just figured that there could…
Austin
  • 683
  • 7
  • 19
5
votes
2 answers

R gls() vs. SAS proc mixed with interaction: Why does R complain about a singular matrix when SAS does not?

I like to keep analyses all in SAS or all in R when I can help it and lately have been using R more and more, but there's one analysis that I do somewhat routinely that has given me trouble in R. I have repeated measures data where I would like to…
Sam Dickson
  • 561
  • 6
  • 16
5
votes
2 answers

How do I avoid computationally singular matrices in R?

I'm fitting a logistic regression model (with R's caret package) to data here. I aim to predict whether Hillary or Trump will win a given county. The relevant code: logisticSettings <- trainControl(method = "cv", number = 10, returnResamp = "all",…
Noah Walton
  • 51
  • 1
  • 1
  • 3
5
votes
2 answers

Sampling from matrix-variate normal distribution with singular covariances?

The matrix-variate normal distribution can be sampled indirectly by utilizing the Cholesky decomposition of two positive definite covariance matrices. However, if one or both of the covariance matrices are positive semi-definite and not positive…
5
votes
1 answer

Limit of Bernoulli R.V.s is a singular distribution

Working through an exercise in Probability (the question can be found in Lamperti). Let $X_1,\dots$ be independent Bernoulli random variables with $\mathbb{P}(X_i=1) = p$ and $\mathbb{P}(X_i=0)=1-p$. Let $$Z = \sum_{k=1}^\infty X_k 2^{-k}$$ and…
user89635
  • 51
  • 1
4
votes
1 answer

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 am searching for why my models come out…
user326575
  • 43
  • 4
4
votes
2 answers

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 bee as fixed effects and Hive ID as random effect.…
Awanti
  • 41
  • 2
4
votes
1 answer

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 composite of other columns). I am interested…
PsychometStats
  • 2,147
  • 1
  • 11
  • 27
4
votes
1 answer

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 In the paper, the model is described by the…
1
2 3 4 5 6