similar to: warning inside loop

Displaying 20 results from an estimated 10000 matches similar to: "warning inside loop"

2018 Mar 06
0
Capturing warning within user-defined function
You can capture warnings by using withCallingHandlers. Here is an example, its help file has more information. dataList <- list( A = data.frame(y=c(TRUE,TRUE,TRUE,FALSE,FALSE), x=1:5), B = data.frame(y=c(TRUE,TRUE,FALSE,TRUE,FALSE), x=1:5), C = data.frame(y=c(FALSE,FALSE,TRUE,TRUE,TRUE), x=1:5)) withWarnings <- function(expr) { .warnings <- NULL # warning handler will
2018 Mar 06
4
Capturing warning within user-defined function
Hi, I am trying to automate the creation of tables for some simply analyses. There are lots and lots of tables, thus the creation of a user-defined function to make and output them to excel. My problem is that some of the analyses have convergence issues, which I want captured and included in the output so the folks looking at them know how to view those estimates. I am successfully able to do
2018 Mar 06
1
Capturing warning within user-defined function
tryCatch() is good for catching errors but not so good for warnings, as it does not let you resume evaluating the expression that emitted the warning. withCallingHandlers(), with its companion invokeRestart(), lets you collect the warnings while letting the evaluation run to completion. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Mar 6, 2018 at 2:45 PM, Bert Gunter <bgunter.4567 at
2011 Feb 18
2
How to flag those iterations which yield a warning?
Hi, I am running a simulation study with the survival::coxph. Some of the simulations result in problematic fits due to flat partial likelihood. So, you get the warning message: Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, ... : Loglik converged before variable 2 ; beta may be infinite. How can I keep track of the simulations which yield any kind of
2012 Feb 07
1
lme, lmer, convergence
Hello, all, I am running some simulations to estimate power for a complicated epidemiological study, and am using lme and lmer to get these estimates. I have to run a few thousand iterations, and once in a great while, an iteration will create fake data such that the model won't converge. I see from Google searches that this is not an uncommon situation. My question: is there a way to
2007 Jun 10
1
{nlme} Multilevel estimation heteroscedasticity
Dear All, I'm trying to model heteroscedasticity using a multilevel model. To do so, I make use of the nlme package and the weigths-parameter. Let's say that I hypothesize that the exam score of students (normexam) is influenced by their score on a standardized LR test (standLRT). Students are of course nested in "schools". These variables are contained in the
2001 Nov 25
2
another optimization question
Dear R list members, Since today seems to be the day for optimization questions, I have one that has been puzzling me: I've been doing some work on sem, my structural-equation modelling package. The models that the sem function in this package fits are essentially parametrizations of the multinormal distribution. The function uses optim and nlm sequentially to maximize a multinormal
2012 May 17
2
glm convergence warning
Hi, When I run the following code : Y <- c(rep(0,35),1,2,0,6,8,16,43) cst <- log(choose(42, 42:1)) beta <- 42:1 tau <- (beta^2)/2 fit <- glm(formula = Y ~ offset(cst) + beta + tau, family = poisson) fit fit$converged glm prints a warning saying that the algorithm did not converge. However, fit$converged takes the value TRUE. I don't understand why fit$converged is not
2009 Mar 27
1
deleting/removing previous warning message in loop
Hello R Users, I am having difficulty deleting the last warning message in a loop so that the only warning that is produced is that from the most recent line of code. I have tried options(warn=1), rm(last.warning), and resetting the last.warning using something like: > warning("Resetting warning message") This problem has been addressed in a previous listserve string,
2012 Nov 06
1
glm fitting routine and convergence
What kind of special magic does glm have? I'm working on a logistic regression solver (L-BFGS) in c and I've been using glm to check my results. I came across a data set that has a very high condition number (the data matrix transpose the data matrix) that when running my solver does not converge, but the same data set with glm was converging ( I love R :) ). I noticed that glm using
2018 Mar 06
0
Capturing warning within user-defined function
1. I did not attempt to sort through your voluminous code. But I suspect you are trying to reinvent wheels. 2. I don't understand this: "I've failed to find a solution after much searching of various R related forums." A web search on "error handling in R" **immediately** brought up ?tryCatch, which I think is what you want. If not, you should probably explain why it
2012 Jul 03
4
question
I have already fitted several models using R code; arima(rates,c(p,d,q))  As I heard, best model produce the smallest AIC value, but maximum likelihood estimation procedure optimizer should converge. How to check whether maximum likelihood estimation procedure optimizer has converged or not? [[alternative HTML version deleted]]
2003 Jun 10
5
bug in glm()? (PR#3223)
Full_Name: Bonnie Version: 1.6.1 OS: Windows Submission from: (NULL) (160.129.25.106) glm() seems to converge, even when it shouldn't. I am trying to fit a model where $converge=FALSE and I am fitting models that do not converge in SAS, but they seem to converge in R ... Thank you.
2006 Apr 19
3
isoMDS and 0 distances
Hi, I'm trying to do a non-metric multidimensional scaling using isoMDS. However, I have some '0' distances in my data, and I'm not sure how to deal with them. I'd rather not drop rows from the original data, as I am comparing several datasets (morphology and molecular data) for the same individuals, and it's interesting to see how much morphological variation can be
2005 Jan 06
1
nls - convergence problem
Dear list, I do have a problem with nls. I use the following data: >test time conc dose 0.50 5.40 1 0.75 11.10 1 1.00 8.40 1 1.25 13.80 1 1.50 15.50 1 1.75 18.00 1 2.00 17.00 1 2.50 13.90 1 3.00 11.20 1 3.50 9.90 1 4.00 4.70 1 5.00 5.00 1 6.00 1.90 1 7.00 1.90 1 9.00 1.10 1 12.00 0.95 1 14.00
2004 Sep 18
2
Covergence FLAG in glm (PR#7235)
Full_Name: Daniel R Jeske Version: 1.8.1 OS: Windows 2000 Submission from: (NULL) (138.23.228.79) We have just noticed that when you use glm() it seems the logical output 'converged' is always TRUE. The same data set that shows FALSE in version 1.7.1 shows TRUE in 1.8.1. And I know that FALSE is the correct answer...so it seems like we cannot trust the 'converged' flag for
2008 Aug 05
2
Adding .PDF files to a package
Deal all, new as I am to developing packages for R-Project, I apologize on beforehand for questions that are too obvious. I am trying to 'add' a PDF document containing some detailed information to a package. The way I understand the Rexts.pdf document, I should add my .PDF document to the /inst/doc/ folder, and links to the files should be build automatically. However, after
2010 Jun 04
2
Help with iteration using while loop
Hello everyone, I am trying to use while loop to iterate a function until convergence. But I am having problem when I try to use a fixed number of iterations. Say I want to use maximum iteration of 150. If the value don't converge within maximum iteration, show warning of no convergence. Currently I don't have non- convergence problem so I think my code works fine. But in future I may
2011 Oct 01
7
Poor performance of "Optim"
I used to consider using R and "Optim" to replace my commercial packages: Gauss and Matlab. But it turns out that "Optim" does not converge completely. The same data for Gauss and Matlab are converged very well. I see that there are too many packages based on "optim" and really doubt if they can be trusted! -- View this message in context:
2013 Aug 15
3
preskip and seeking suing Opus
Hi, I've been studying the Opus code and documentation for a while and have seen it mentioned several times that Opus uses pre-skip to allow the codec to converge. What convergence are they referring to? Rate control? Energy envelope prediction after seeking? Is there a discussion of this somewhere? Also, I'm also interested in the seeking behaviour of the decoder. If, say, I want to