Questions tagged [singular]

Singularity is a mathematical term indicating an undefined point on a set (function). Singularity arises in many mathematical optimization problems with many variables.

An example of singularity is the derivative of the absolute value function |x| at x = 0.

Singularity arises in many ill-posed problems

137 questions
1
vote
1 answer

Multilevel model using glmer: Singularity issue

I'm using R to run a logistic multilevel model with random intercepts. I'm using the frequentist approach (glmer). I'm not able to use Bayesian methods due to the research centre's policy. When I run my code it says that my model is singular. I'm…
bella1998
  • 13
  • 3
1
vote
1 answer

how to make a matrix invertible for sure, in R

this link has the dput output structure of my matrix. https://pastebin.com/TsUzuF4L Error in solve() : system is computationally singular: reciprocal condition number = 4.35295e-21 in R I was wondering if there is any general method in R to…
Mathica
  • 1,241
  • 1
  • 5
  • 17
1
vote
1 answer

despite singular.ok = FALSE, lm() reports a result while solve(t(X) %*% X) %*% (t(X) %*% y) reports (correctly) an error

My test datasets are > y DLogPrice [1,] 3.4232680 [2,] -1.0099196 [3,] 0.7867983 [4,] -1.2224441 [5,] 3.5718083 [6,] -0.4550516 [7,] 1.6733032 [8,] 1.6540079 [9,] 0.6122239 [10,] -1.3530304 [11,] -18.9058749 [12,] …
Grillo
  • 75
  • 6
1
vote
1 answer

Linear regression with near singular matrix inversion

I have a regression problem to estimate the slope of y = a*x+b, and tried two different methods to a. Method 1 estimates the mean of two data clusters as two points, based on which a is calculated. Method 2 uses the standard regression…
Ken S
  • 315
  • 1
  • 3
  • 11
1
vote
1 answer

How to apply the colamd algorithm on a sparse matrix in python?

I am trying to apply the Colamd (Column approximate minimum degree permutation) on a scipy sparse matrix. A incomplete solution can be found from the scipy doc: from scipy.sparse import csc_matrix, linalg as sla A =…
Paul Shon
  • 11
  • 1
1
vote
3 answers

How to calculate running slope for rlm using runner?

I have a data frame "customers" build of customer id, month and total purchases that month. I'm trying to calculate a running slope for a window of 12 months using robust regression. I have tried the following: Coef <- function(x)…
Alex
  • 149
  • 1
  • 1
  • 11
1
vote
1 answer

Approaches for using statistics packages for maximum likelihood estimation for hundreds of covariates

I am trying to investigate the distribution of maximum likelihood estimates for specifically for a large number of covariates p and a high dimensional regime (meaning that p/n, with n the sample size, is about 1/5). I am generating the data and then…
Meep
  • 351
  • 1
  • 4
  • 15
1
vote
2 answers

HTML Canvas: Saving a graphic element to be modified later by other users

I would like to face a problem for which I haven't seen a solution looking around in Internet. This is: I need to save the elements drawn by WEB users on a canvas space not as a flat image, but each one singularly. This in order to let the same…
Federico
  • 21
  • 1
1
vote
0 answers

Defining a particular polynomial ring in some CAS (Computer Algebra System)

I'm interested in defining the following polynomial quotient ring in some CAS (Singular, GAP, Sage, etc.): R = GF(256)[x] / (x^4 + 1) Specifically, R is the set of all polynomials of degree at most 3, whose coefficients belong to GF(256). Two…
Sadeq Dousti
  • 3,346
  • 6
  • 35
  • 53
1
vote
0 answers

Synthetic control method: placebo test error: system is computationally singular

I am currently doing an analysis of the effect of taxation on the institutions of a country. I am using the synthetic controls method to determine the treatment effect on Bolivia. The synth() command works fine, the placebo (with country 8 = Bhutan…
dbmongo
  • 85
  • 6
1
vote
0 answers

Integration of a bessel function in python: subdivision issue

I am trying to integrate on a surface the following equation: intensity=(2*J1(z)/z)^2 with z=A*sqrt((x-mu1)^2+(y-mu2)^2), A(L) a constant of x and y and J1 the first order bessel function. To do so I use the dblquad function as below: resultinf =…
Vincent
  • 26
  • 5
1
vote
0 answers

SUR: Var-Cov matrix becomes singular if maxiter>1

Could you help me with following: I try to run 5eq simultaneously but I have problems with singularity. My coefficients become very small if maxiter>1. If maxiter>4, R returns the error code “Error in .solve.dgC.lu(as(a, "dgCMatrix"), b = b, tol…
jones
  • 11
  • 2
1
vote
1 answer

R: investigating singular gradient in non-linear regression

library(nls2) # Investigate singular gradient. # Note that this cannot be done with nls since the singular gradient at # the initial conditions would stop it with an error. DF1 <- data.frame(y=1:9, one=rep(1,9)) xx <- nls2(y~(a+2*b)*one, DF1, start…
Adrian
  • 9,229
  • 24
  • 74
  • 132
1
vote
2 answers

DGELS "full rank" error from lmrob

In R, I'm using lmrob from the robustbase package to fit a simple linear model of the form: lmrob(value ~ t + as.factor(r) + as.factor(c) + 0, data=subs, setting="KS2014") This works fine 95% of the time, but every once in a while the call fails…
Good Eats
  • 333
  • 3
  • 14
1
vote
1 answer

While fitting in gnuplot the error "Singular matrix in Invert_RtR" occured

I tried fitting my data in gnuplot as before. I only changed the formula but the error "Singular matrix in Invert_RtR" always occurs. I tried varying the starting values of all parameters but it didn't help. Here is my formula and parameters (I only…
user7400190