Questions tagged [convergence]

303 questions
1
vote
0 answers

What does 'Inequality constraints incompatible' when fitting an AR-EGARCH-model mean in Python?

I am trying to fit an AR-EGARCH(1,1) model to electricity prices and forecast the day ahead. I am modelling every hour sepereatly, so I forecast the price for hour 0-1 only with the time series which consists of the prices in this hour from the past…
1
vote
1 answer

Why does an lmer model converge in one experimental condition but not another?

I am new to using linear mixed-effects models. I have a dataset where participants (ID, N = 7973) completed two experimental conditions (A and B). A subset of participants are siblings and thus nested in families (famID, N = 6908). omnibus_model <-…
1
vote
1 answer

AND OR on python

The code below works such that an array is an input in a function. This 2 element array is iterated such that it would stop if the difference between the new and previously iterated array values equals zero (or it is intended to work as such). Note…
SyntaxError101
  • 79
  • 1
  • 2
  • 11
1
vote
1 answer

Translating math to JavaScript; convergent/divergent series

I am trying calculate the following series in JavaScript: My code is as follows: var res = [] for(var i=0; i<1000; i++) { res.push(i / ((i * Math.sqrt(i + 1)) + ((i + 1) * Math.sqrt(i)))) } But this makes the series possibly converge towards 0…
Cybernetic
  • 12,628
  • 16
  • 93
  • 132
1
vote
1 answer

Specify theta.ml parameters within glmer.nb

I am trying to fit a mixed-effect negative binomial model with glmer.nb() from package lme4. m1 <- glmer.nb(NumberEvents ~ offset(log(days)) + x + (1|ID), data=dfr, nAGQ = 20) I get the following warning: Warning message: In theta.ml(Y, mu,…
Pierpaolo
  • 11
  • 2
1
vote
1 answer

What is the meaning of sol$convergence = 1 or 2 with solnp()?

I am using solnp() in R. I know the convergence output of 0 indicates successful convergence. But what is the difference between values of 1 or 2? I can't seem to find the answer in the R documentation. Thank you.
1
vote
0 answers

Cox PH on Lifelines shows convergence problem

I'm running a Cox PH model using lifelines package on Python. I find it strange that if I run the model on the whole data there is no problem running it, however when I do a cross-validation (using the package's own validation function) a…
1
vote
2 answers

glmer() converges with one factor level as baseline, but fails to converge when re-level baseline to the other level

Background: I am fitting a logistic mixed model with two fixed effects, and two crossed random effects. The two variables making up the fixed effects are both binary categorical variables (i.e., there are no numeric predictors). The data are from an…
Meg
  • 696
  • 1
  • 7
  • 20
1
vote
1 answer

R: LTM: How can I make an odd-behaving hessian matrix converge when standardization fails?

I try to fit a graded response model with the R package ltm. The issue is that the Hessian matrix does not converge, and I don't understand why. Here is the code I use: dset %>% select(Apathy5, Apathy6, Apathy7, Apathy8 ) %>% grm(IRT.param =…
Marco Meyer
  • 323
  • 2
  • 4
  • 6
1
vote
0 answers

Convergence failure while training GAN for 128x128 images

thanks for looking at this question! I attempted to train a simple DCGAN to generate room designs from a dataset of 215 coloured images of size 128x128. My attempt can be summarised as below: Generator: 5 deconvolution layers from (100x1) noise…
1
vote
1 answer

How can I check convergence of a numerical method based on the results? (Octave)

I'm writing a fixed point iteration script in Octave and need to check if the method converges. At the moment the only thing I've come up is a quite rudimentary check of the derivative of g(x) evaluated in x0. if (conv_x<=1) fprintf("\nThe method…
1
vote
0 answers

computing Gelman-Rubin Rhat/psrf diagnostic; memory concerns

My collaborator and I are finding that when we try to run coda::gelman.diag() on our model fit often leads to memory problems. We can obviously adjust this with thinning and burnin to some extent, but wondering what shortcuts might be available to…
Michael Roswell
  • 1,300
  • 12
  • 31
1
vote
1 answer

While Loops and Testing for Convergence

I have being trying to use a while loop to test convergence for X(n) = X(n-1)+((-1)^n)/n), as n tends towards infinity. I cannot seem to get my code to work. I know by definition Xn be a sequence and Xn has a limit if for all E>0 there exists K E N…
Amber
  • 43
  • 4
1
vote
2 answers

Struggling to get convergence to Euler's number

Hi there I’ve been working on trying to plot the convergence of 'e' through using the equation 1/N! with limits from 0 to 9. clc,clear terms=[1]; x=10; for i=2:x terms(i,1)=terms(i-1,1) + 1/factorial(i); end disp(terms) xplotrange =…
KC ReLoDZz
  • 33
  • 4
1
vote
0 answers

Error with nlme: nlminb problem, convergence error code = 1 message = singular convergence (7)

I have a linear mixed model lme (from package nlme) with distance (log 10 transformed) as the response variable, a factor variable pre or post translocation as a predictor, time log10 transformed as an offset fixed effect, and then two nested random…
Brooklyn
  • 11
  • 3